// // sub_1004C45B4 from 0x1004c45b4 to 0x1004c46e0 (300 bytes) // // 3 xrefs: // > sub_100458AC0 @ 0x100458cec // > sub_1004C1EA0 @ 0x1004c2200 // > sub_1004C2240 @ 0x1004c22ac // // 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_1004C45B4(__int64 a1, int a2, int a3) { int v3; // w19 int v4; // w20 unsigned int v6; // w9 int v7; // w9 unsigned int v8; // w22 __int64 result; // x0 int v10; // w23 unsigned int v11; // [xsp+8h] [xbp-48h] BYREF unsigned int v12; // [xsp+Ch] [xbp-44h] BYREF void *v13; // [xsp+10h] [xbp-40h] BYREF void *v14; // [xsp+18h] [xbp-38h] BYREF v3 = a3; v4 = a2; if ( (*(_BYTE *)(a1 + 45) & 2) == 0 ) { v6 = *(_DWORD *)(a1 + 40) - 2; if ( v6 > 3 ) v7 = 1; else v7 = dword_100647DD0[v6]; v8 = v7 * *(_DWORD *)(a1 + 104); *(_DWORD *)(a1 + 64) = a2; if ( a3 ) goto LABEL_8; return 0; } v8 = 1; *(_DWORD *)(a1 + 64) = a2; if ( !a3 ) return 0; LABEL_8: while ( 1 ) { result = (*(__int64 (__fastcall **)(__int64, _QWORD, _QWORD, void **, void **, unsigned int *, unsigned int *))(*(_QWORD *)a1 + 40LL))( a1, v4 * v8, v3 * v8, &v14, &v13, &v12, &v11); if ( (_DWORD)result ) break; v10 = 0; if ( v14 && v12 ) { bzero(v14, v12); v10 = v12 / v8; } if ( v13 ) { if ( v11 ) { bzero(v13, v11); v10 += v11 / v8; } } result = (*(__int64 (__fastcall **)(__int64, void *))(*(_QWORD *)a1 + 48LL))(a1, v14); if ( (_DWORD)result ) break; v4 += v10; v3 -= v10; if ( !v3 ) return 0; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source