// // sub_1002F5020 from 0x1002f5020 to 0x1002f526c (588 bytes) // // 1 xrefs: // > GJEffectManager::runDeathTrigger @ 0x1002e9c5a // // 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_1002F5020(_QWORD *a1, int *a2, _BYTE *a3, __int64 a4, _DWORD *a5, _DWORD *a6) { _QWORD *v6; // r14 _QWORD *v7; // r13 __int64 v8; // rbx unsigned __int64 v9; // r12 _BYTE *v10; // rax __int64 v11; // r10 int v12; // r11d char v13; // si int v14; // edi int v15; // r8d _QWORD *v16; // rcx char *v17; // r15 __int64 v18; // r12 __int64 v19; // rax __int64 v20; // rcx void *v21; // rdi char *v23; // [rsp+8h] [rbp-78h] char *v24; // [rsp+10h] [rbp-70h] char *v25; // [rsp+18h] [rbp-68h] __int64 v26; // [rsp+28h] [rbp-58h] _DWORD *v27; // [rsp+30h] [rbp-50h] _DWORD *v28; // [rsp+38h] [rbp-48h] _BYTE *v29; // [rsp+40h] [rbp-40h] v6 = (_QWORD *)*a1; v7 = (_QWORD *)a1[1]; v8 = (__int64)v7 - *a1; v9 = 0xAAAAAAAAAAAAAAABLL * (v8 >> 4) + 1; if ( v9 > 0x555555555555555LL ) sub_1002F5300(); if ( 0x5555555555555556LL * ((__int64)(a1[2] - (_QWORD)v6) >> 4) > v9 ) v9 = 0x5555555555555556LL * ((__int64)(a1[2] - (_QWORD)v6) >> 4); if ( 0xAAAAAAAAAAAAAAABLL * ((__int64)(a1[2] - (_QWORD)v6) >> 4) >= 0x2AAAAAAAAAAAAAALL ) v9 = 0x555555555555555LL; if ( v9 ) { v29 = a3; v28 = a5; v27 = a6; v26 = a4; if ( v9 > 0x555555555555555LL ) sub_100054850(); v10 = operator new(48 * v9); a4 = v26; a6 = v27; a5 = v28; a3 = v29; } else { v10 = nullptr; } v11 = 16 * (v8 >> 4); v24 = &v10[v11]; v23 = &v10[v11]; v25 = &v10[48 * v9]; v12 = *a2; v13 = *a3; v14 = *a5; v15 = *a6; v10[v11] = 0; *(_OWORD *)&v10[v11 + 24] = 0; *(_QWORD *)&v10[v11 + 40] = 0; *(_DWORD *)&v10[v11 + 4] = v12; v10[v11 + 8] = v13; *(_DWORD *)&v10[v11 + 12] = v14; *(_DWORD *)&v10[v11 + 16] = v15; if ( v23 + 24 == (char *)a4 ) { v16 = a1; v17 = &v10[v11 - v8]; v18 = (__int64)&v10[v11 + 48]; if ( v6 == v7 ) goto LABEL_21; } else { sub_1000C51C0( (char **)&v10[v11 + 24], *(char **)a4, *(_QWORD *)(a4 + 8), (__int64)(*(_QWORD *)(a4 + 8) - *(_QWORD *)a4) >> 2); v16 = a1; v6 = (_QWORD *)*a1; v7 = (_QWORD *)a1[1]; v17 = (char *)(v23 - ((char *)v7 - *a1)); v18 = (__int64)(v24 + 48); if ( (_QWORD *)*a1 == v7 ) goto LABEL_21; } v19 = 0; do { *(_DWORD *)&v17[v19 * 8 + 16] = v6[v19 + 2]; *(_OWORD *)&v17[v19 * 8] = *(_OWORD *)&v6[v19]; *(_OWORD *)&v17[v19 * 8 + 24] = 0; *(_QWORD *)&v17[v19 * 8 + 40] = 0; *(_OWORD *)&v17[v19 * 8 + 24] = *(_OWORD *)&v6[v19 + 3]; *(_QWORD *)&v17[v19 * 8 + 40] = v6[v19 + 5]; *(_OWORD *)&v6[v19 + 3] = 0; v6[v19 + 5] = 0; v20 = (__int64)&v6[v19 + 6]; v19 += 6; } while ( (_QWORD *)v20 != v7 ); do { v21 = (void *)v6[3]; if ( v21 ) { v6[4] = v21; operator delete(v21); } v6 += 6; } while ( v6 != v7 ); v16 = a1; v6 = (_QWORD *)*a1; LABEL_21: *v16 = v17; v16[1] = v18; v16[2] = v25; if ( v6 ) operator delete(v6); return v18; }
GD Web Decomp Icon

GD Web Decomp

Raw Source