// // sub_1005DE538 from 0x1005de538 to 0x1005de618 (224 bytes) // // 3 xrefs: // > sub_1005D6588 @ 0x1005d65e8 // > sub_1005D9670 @ 0x1005d99bc // > sub_100602980 @ 0x100602a60 // // 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_1005DE538(void **a1, __int64 a2, int a3) { int v6; // w9 int v7; // w8 _BYTE *v8; // x0 _QWORD *v9; // x9 __int64 result; // x0 __int64 v11; // x11 __int64 v12; // x10 if ( !a1 ) return 0; v6 = *((_DWORD *)a1 + 5); v7 = *(_DWORD *)a1; if ( v6 <= *(_DWORD *)a1 + 1 ) { v8 = sub_10058890C(a1[1], (unsigned int)(16 * v6), (__int64)"stack.c", 187); if ( !v8 ) return 0; a1[1] = v8; *((_DWORD *)a1 + 5) *= 2; v7 = *(_DWORD *)a1; } if ( a3 < 0 || v7 <= a3 ) { *((_QWORD *)a1[1] + v7) = a2; } else { v9 = a1[1]; if ( v7 < a3 ) { v12 = a3; } else { v11 = v7; v12 = a3; do v9[v11 + 1] = v9[v11]; while ( v11-- > a3 ); v9 = a1[1]; } v9[v12] = a2; } result = (unsigned int)(v7 + 1); *(_DWORD *)a1 = result; *((_DWORD *)a1 + 4) = 0; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source