// // sub_1005EA3F0 from 0x1005ea3f0 to 0x1005ea67c (652 bytes) // // 2 xrefs: // > sub_1005EA054 @ 0x1005ea18c // > sub_1005EA94C @ 0x1005eaef8 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:09:45 +0000 // __int64 __fastcall sub_1005EA3F0(__int64 a1, __int64 a2, __int64 a3, char a4) { __int64 result; // x0 __int64 v9; // x3 __int64 v10; // x4 __int64 v11; // x5 __int64 v12; // x6 __int64 v13; // x8 unsigned int *v14; // x8 char v15; // w9 char v16; // w8 int v17; // w23 __int64 v18; // x9 int v19; // w22 _QWORD *v20; // x25 __int64 v21; // x8 _QWORD *v22; // x8 int v23; // w8 int v24; // w8 unsigned int *v25; // x8 unsigned int v26; // w9 __int128 v27; // [xsp+0h] [xbp-80h] BYREF __int128 v28; // [xsp+10h] [xbp-70h] __int128 v29; // [xsp+20h] [xbp-60h] __int64 v30; // [xsp+30h] [xbp-50h] if ( (a2 & 0x80000000) != 0 || *(_DWORD *)(a1 + 176) <= (int)a2 ) return 31; if ( a3 && *(_QWORD *)(a3 + 184) ) return 61; if ( *(_QWORD *)(a1 + 168) ) return 62; if ( (**(unsigned int (__fastcall ***)(__int64))a1)(a1) && ((v13 = *(_QWORD *)(a1 + 168)) != 0 || (v18 = *(_QWORD *)(a1 + 160), v13 = a1, !v18) || (v13 = *(_QWORD *)(v18 + 8LL * *(int *)(a1 + 192))) != 0) && (v14 = (unsigned int *)(v13 + 88), v15 = atomic_load(v14), (v15 & 4) != 0) && (v16 = atomic_load(v14), (v16 & 8) == 0) ) { sub_100568CC4(*(_QWORD *)(a1 + 216), 9u); v17 = 1; } else { v17 = 0; } if ( (a4 & 1) != 0 || (unsigned int)(*(_DWORD *)(a1 + 40) - 1) > 4 ) { v19 = 0; } else { sub_100568CC4(*(_QWORD *)(a1 + 216), 3u); v19 = 1; } v20 = *(_QWORD **)(*(_QWORD *)(a1 + 160) + 8LL * (unsigned int)a2); if ( v20 ) { if ( v20[21] ) { v30 = 0; v28 = 0u; v29 = 0u; v27 = 0u; (*(void (__fastcall **)(_QWORD, __int64, __int128 *, __int64, __int64, __int64, __int64))(*(_QWORD *)(a1 + 96) + 136LL))( *(_QWORD *)(a1 + 96), a2, &v27, v9, v10, v11, v12); } if ( !a3 ) goto LABEL_31; } else if ( !a3 ) { goto LABEL_40; } *(_DWORD *)(a3 + 192) = a2; *(_QWORD *)(a3 + 184) = a1; if ( *(_QWORD *)(a3 + 168) ) { v30 = 0; v28 = 0u; v29 = 0u; v27 = 0u; (*(void (__fastcall **)(_QWORD, __int64, __int128 *))(*(_QWORD *)(a3 + 96) + 136LL))(*(_QWORD *)(a1 + 96), a2, &v27); } if ( !v20 ) { v23 = 1; goto LABEL_39; } LABEL_31: if ( (**(unsigned int (__fastcall ***)(__int64))a1)(a1) ) { v21 = *(_QWORD *)(a1 + 384); if ( v21 != v20[48] ) goto LABEL_36; v22 = (_QWORD *)(v21 + 184); } else { v22 = v20 + 12; if ( *(_QWORD *)(v20[23] + 96LL) != v20[12] ) goto LABEL_36; } *v22 = 0; LABEL_36: v20[23] = 0; if ( !a3 ) { v23 = -1; LABEL_39: *(_DWORD *)(a1 + 180) += v23; } LABEL_40: *(_QWORD *)(*(_QWORD *)(a1 + 160) + 8LL * (unsigned int)a2) = a3; v24 = *(_DWORD *)(a1 + 68); *(_DWORD *)(a1 + 76) = 0; *(_DWORD *)(a1 + 80) = v24; if ( (**(unsigned int (__fastcall ***)(__int64))a1)(a1) ) (*(void (__fastcall **)(_QWORD, _QWORD, _QWORD))(**(_QWORD **)(a1 + 376) + 144LL))( *(_QWORD *)(a1 + 376), 0, (unsigned int)(*(_DWORD *)(a1 + 68) - 1)); if ( v19 ) sub_100568CE4(*(_QWORD *)(a1 + 216), 3u); result = (**(__int64 (__fastcall ***)(__int64))a1)(a1); if ( (_DWORD)result ) { if ( a3 ) { v25 = (unsigned int *)(a1 + 88); do v26 = __ldaxr(v25); while ( __stlxr(v26 | 0x10, v25) ); } if ( v17 ) sub_100568CE4(*(_QWORD *)(a1 + 216), 9u); return 0; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source