// // sub_1004BE108 from 0x1004be108 to 0x1004be268 (352 bytes) // // 1 xrefs: // > @ 0x100828728 // // 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_1004BE108( __int64 a1, unsigned int a2, unsigned int a3, _QWORD *a4, _QWORD *a5, unsigned int *a6, unsigned int *a7) { int v14; // w8 int v15; // w11 unsigned int v16; // w9 int v17; // w12 __int64 v18; // x10 unsigned int v19; // w26 unsigned int v20; // w12 unsigned int v21; // w11 bool v22; // cc const void *v25; // x1 int v26; // w9 unsigned int v27; // w10 __int64 v28; // x9 __int64 result; // x0 unsigned int v30; // w8 v14 = *(_DWORD *)(a1 + 104); v15 = *(_DWORD *)(a1 + 40); v16 = v15 - 2; if ( (unsigned int)(v15 - 2) > 3 ) v17 = 8; else v17 = dword_1006488E0[v16]; v18 = *(unsigned int *)(a1 + 384); v19 = a3 + a2; v20 = v18 + v17 * v14; v21 = v15 - 1; if ( (_DWORD)v18 ) v22 = v19 > (unsigned int)v18; else v22 = 0; if ( v22 && v20 > a2 && v21 <= 4 ) { v25 = *(const void **)(a1 + 368); if ( v25 ) { if ( v16 > 3 ) v26 = 8; else v26 = dword_1006488E0[v16]; memcpy((void *)(*(_QWORD *)(a1 + 352) + v18), v25, (unsigned int)(v26 * v14)); *(_DWORD *)(a1 + 384) = 0; } } v27 = *(_DWORD *)(a1 + 72); if ( v27 <= a2 || v27 < a3 ) { *a4 = 0; if ( a5 ) *a5 = 0; if ( a6 ) *a6 = 0; result = 31; if ( a7 ) { v30 = 0; goto LABEL_39; } } else { v28 = *(_QWORD *)(a1 + 352); *a4 = v28 + a2; if ( v19 <= v27 ) { if ( a6 ) *a6 = a3; if ( a5 ) *a5 = 0; v30 = 0; result = 0; if ( a7 ) goto LABEL_39; } else { if ( a6 ) *a6 = v27 - a2; if ( a5 ) *a5 = v28; result = 0; if ( a7 ) { v30 = v19 - *(_DWORD *)(a1 + 72); LABEL_39: *a7 = v30; } } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source