// // sub_C05CB8 from 0xc05cb8 to 0xc05ec8 (528 bytes) // // 1 xrefs: // > sub_C04E90 @ 0xc0525c // // 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_C05CB8(__int64 a1, _QWORD *a2) { __int64 v3; // x21 int v4; // w2 __int64 v5; // x26 __int64 v6; // x23 int v7; // w20 __int64 v8; // x22 _BYTE *v9; // x27 _BYTE *v10; // x25 int v11; // w27 _BYTE *v12; // x19 int v13; // w25 int v14; // w0 __int64 v16; // x0 void (__fastcall *v17)(__int64, __int64); // x3 int v18; // [xsp+64h] [xbp+64h] __int64 v19; // [xsp+68h] [xbp+68h] _QWORD *v20; // [xsp+68h] [xbp+68h] v3 = *(_QWORD *)(a1 + 624); if ( *(_DWORD *)(a1 + 372) ) { v4 = *(_DWORD *)(v3 + 76); if ( !v4 ) { v20 = a2; sub_C052A4(a1); v4 = *(_DWORD *)(v3 + 76); a2 = v20; } *(_DWORD *)(v3 + 76) = v4 - 1; } if ( *(_DWORD *)(v3 + 40) != -1 ) { v5 = *(_QWORD *)(a1 + 560); v6 = *(int *)(*(_QWORD *)(a1 + 456) + 24LL); v7 = *(_DWORD *)(a1 + 540) - 1; v19 = *a2; v8 = 8 * v6; do { v9 = (_BYTE *)(*(_QWORD *)(v3 + v8 + 208) + 3 * v7); if ( (unsigned int)sub_C053BC((void (__fastcall ***)(_QWORD))a1, v9) ) break; while ( 1 ) { ++v7; if ( (unsigned int)sub_C053BC((void (__fastcall ***)(_QWORD))a1, v9 + 1) ) break; v9 += 3; if ( v7 >= *(_DWORD *)(a1 + 544) ) { LABEL_24: v17 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 8LL); *(_DWORD *)(*(_QWORD *)a1 + 40LL) = 117; v17(a1, 0xFFFFFFFFLL); *(_DWORD *)(v3 + 40) = -1; return 1; } } v10 = v9 + 2; v18 = sub_C053BC((void (__fastcall ***)(_QWORD))a1, (_BYTE *)(v3 + 336)); v11 = sub_C053BC((void (__fastcall ***)(_QWORD))a1, v9 + 2); if ( v11 && (unsigned int)sub_C053BC((void (__fastcall ***)(_QWORD))a1, v10) ) { v11 *= 2; v16 = 189; if ( *(unsigned __int8 *)(a1 + v6 + 356) < v7 ) v16 = 217; v10 = (_BYTE *)(*(_QWORD *)(v3 + v8 + 208) + v16); while ( (unsigned int)sub_C053BC((void (__fastcall ***)(_QWORD))a1, v10) ) { v11 *= 2; ++v10; if ( v11 == 0x8000 ) goto LABEL_24; } } v12 = v10 + 14; v13 = v11; while ( 1 ) { v13 >>= 1; if ( !v13 ) break; if ( (unsigned int)sub_C053BC((void (__fastcall ***)(_QWORD))a1, v12) ) v11 |= v13; } v14 = *(_DWORD *)(a1 + 544); *(_WORD *)(v19 + 2LL * *(int *)(v5 + 4LL * v7)) = (((v11 + 1) ^ -(v18 != 0)) + (v18 != 0)) << *(_DWORD *)(a1 + 552); } while ( v14 > v7 ); } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source