// // sub_1000CAF40 from 0x1000caf40 to 0x1000cb0be (382 bytes) // // 1 xrefs: // > PlayLayer::createObjectsFromSetupFinished @ 0x1000b6c63 // // 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 // void __fastcall sub_1000CAF40(void **a1, unsigned __int64 a2) { char *v3; // r14 _BYTE *v4; // rax _BYTE *v5; // rdi size_t v6; // r14 unsigned __int64 v7; // r13 unsigned __int64 v8; // rax char *v9; // rcx unsigned __int64 v10; // r15 char *v11; // r12 char *v12; // r13 char *v13; // r12 void *__src; // [rsp+8h] [rbp-38h] char *v15; // [rsp+10h] [rbp-30h] v3 = (char *)a1[1]; v4 = a1[2]; if ( 0xAAAAAAAAAAAAAAABLL * (v4 - v3) >= a2 ) { if ( a2 ) { v10 = 3 * ((3 * a2 - 3) / 3); __bzero(a1[1], v10 + 3); v3 += v10 + 3; } a1[1] = v3; } else { v5 = *a1; v6 = v3 - (_BYTE *)*a1; v7 = 0xAAAAAAAAAAAAAAABLL * v6 + a2; if ( v7 > 0x5555555555555555LL ) sub_1000CB0C0(); v8 = 0xAAAAAAAAAAAAAAABLL * (v4 - v5); if ( 2 * v8 > v7 ) v7 = 2 * v8; if ( v8 >= 0x2AAAAAAAAAAAAAAALL ) v7 = 0x5555555555555555LL; __src = *a1; if ( v7 ) { if ( v7 > 0x5555555555555555LL ) sub_100054850(); v9 = (char *)operator new(3 * v7); } else { v9 = nullptr; } v11 = &v9[v6]; v15 = &v9[3 * v7]; __bzero(&v9[v6], 3 * ((3 * a2 - 3) / 3) + 3); v12 = &v11[3 * ((3 * a2 - 3) / 3) + 3]; v13 = &v11[-v6]; memcpy(v13, __src, v6); *a1 = v13; a1[1] = v12; a1[2] = v15; if ( __src ) operator delete(__src); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source