// // sub_1004C51B4 from 0x1004c51b4 to 0x1004c5314 (352 bytes) // // 4 xrefs: // > @ 0x100828620 // > @ 0x1008287c8 // > @ 0x100828970 // > @ 0x100828b00 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // __int64 __fastcall sub_1004C51B4(__int64 a1, __int64 a2, _QWORD *a3) { __int64 result; // x0 unsigned int v6; // w21 __int64 v7; // x22 __int64 v8; // x8 char v9; // w10 char v10; // w9 unsigned int v11; // w10 unsigned int v12; // w9 unsigned int v13; // w9 int v14; // w10 int v15; // w8 char v16; // w12 int v17; // w12 int v18; // w8 __int64 v21; // x0 _QWORD v22[2]; // [xsp+8h] [xbp-38h] BYREF int v23; // [xsp+18h] [xbp-28h] result = 31; if ( (a2 & 0x80000000) == 0 && a3 ) { v6 = a2; if ( *(_DWORD *)(a1 + 176) <= (int)a2 ) return 31; *a3 = 0; v7 = *(_QWORD *)(*(_QWORD *)(a1 + 160) + 8LL * (unsigned int)a2); if ( !v7 || !*(_QWORD *)(v7 + 168) ) goto LABEL_27; v8 = *(_QWORD *)(v7 + 184); v9 = atomic_load((unsigned int *)(v7 + 88)); if ( (v9 & 4) == 0 || (v10 = atomic_load((unsigned int *)(v7 + 88)), (v10 & 0x40) != 0) ) { if ( (*(_BYTE *)(a1 + 46) & 1) == 0 ) { result = sub_1004C53AC(v7, a2); if ( (_DWORD)result ) return result; if ( *(_DWORD *)(v7 + 192) != *(_DWORD *)(*(_QWORD *)(v7 + 96) + 284LL) && !(unsigned int)sub_1004C22D4(v7, 0, 2) ) { sub_1004C2240(v7); } goto LABEL_27; } v11 = atomic_load((unsigned int *)(v7 + 272)); if ( v11 != 5 ) { v12 = atomic_load((unsigned int *)(v7 + 272)); if ( v12 != 7 ) { v13 = *(_DWORD *)(*(_QWORD *)(v7 + 384) + 68LL); if ( *(_DWORD *)(v7 + 68) < v13 ) v13 = *(_DWORD *)(v7 + 68); v14 = *(_DWORD *)(v8 + 192); v15 = *(_DWORD *)(v8 + 404); v16 = atomic_load((unsigned int *)(v7 + 88)); v17 = v16 & 0x10; v18 = v15 + v13; if ( v14 != (_DWORD)a2 || *(_DWORD *)(v7 + 64) != v18 || v17 != 0 ) { v21 = *(_QWORD *)(*(_QWORD *)(v7 + 264) + 16LL); v22[0] = a1; v22[1] = v7; v23 = a2; sub_1004C5314(v21, v7, v22); } LABEL_27: *a3 = *(_QWORD *)(*(_QWORD *)(a1 + 160) + 8LL * v6); return 0; } } } return 46; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source