//
// sub_1005C0260 from 0x1005c0260 to 0x1005c0431 (465 bytes)
//
// 1 xrefs:
// > sub_1005C14D0 @ 0x1005c175a
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:32:46 +0000
//
__int64 __fastcall sub_1005C0260(__int64 a1, __int64 a2)
{
_QWORD *v2; // r13
_QWORD *v3; // rcx
_QWORD *v4; // rax
bool v5; // zf
void *v7[3]; // [rsp+8h] [rbp-278h] BYREF
int v8; // [rsp+24h] [rbp-25Ch] BYREF
_QWORD v9[2]; // [rsp+28h] [rbp-258h] BYREF
void *v10; // [rsp+38h] [rbp-248h]
_BYTE v11[504]; // [rsp+40h] [rbp-240h] BYREF
__int16 v12; // [rsp+238h] [rbp-48h]
char v13; // [rsp+23Ah] [rbp-46h]
void *v14; // [rsp+248h] [rbp-38h]
v9[0] = 0;
v9[1] = 500;
v10 = v11;
v12 = 31746;
v13 = 0;
v8 = *(_DWORD *)(a2 + 16);
sub_1005BE520((__int64)v9, &v8);
v2 = *(_QWORD **)a2;
if ( *(_QWORD *)a2 != a2 + 8 )
{
do
{
LODWORD(v7[0]) = *((_DWORD *)v2 + 7);
sub_1005BE520((__int64)v9, (int *)v7);
sub_1005BE140((__int64)v9, (float *)v2 + 9);
sub_1005BE140((__int64)v9, (float *)v2 + 10);
sub_1005BE140((__int64)v9, (float *)v2 + 11);
sub_1005BE140((__int64)v9, (float *)v2 + 12);
sub_1005BE520((__int64)v9, (int *)v2 + 13);
sub_1005BE140((__int64)v9, (float *)v2 + 14);
sub_1005BE520((__int64)v9, (int *)v2 + 15);
v3 = (_QWORD *)v2[1];
if ( v3 )
{
do
{
v4 = v3;
v3 = (_QWORD *)*v3;
}
while ( v3 );
}
else
{
do
{
v4 = (_QWORD *)v2[2];
v5 = *v4 == (_QWORD)v2;
v2 = v4;
}
while ( !v5 );
}
v2 = v4;
}
while ( v4 != (_QWORD *)(a2 + 8) );
}
sub_1005BED90(v7, (__int64)v9);
sub_1005BEEA0(a1, (unsigned __int8 *)v7);
if ( ((__int64)v7[0] & 1) != 0 )
operator delete(v7[2]);
if ( (v12 & 1) != 0 )
operator delete(v14);
if ( v10 != v11 && v10 != nullptr )
operator delete[](v10);
return __stack_chk_guard;
}