//
// sub_1005E2334 from 0x1005e2334 to 0x1005e2488 (340 bytes)
//
// 1 xrefs:
// > ??> @ 0x10083b868
//
// 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_1005E2334(__int64 a1)
{
__int64 v2; // x8
__int64 v3; // x20
char *v4; // x19
bool v5; // zf
__int64 i; // x20
char *v7; // x22
void *v8; // x0
char *v9; // x21
__int64 v10; // [xsp+8h] [xbp-28h] BYREF
v2 = qword_100883228;
if ( !qword_100883228 )
{
sub_100588190(9, 1, (__int64)"err.c", 295);
if ( !qword_100883228 )
qword_100883228 = (__int64)off_10083B820;
sub_100588190(10, 1, (__int64)"err.c", 298);
v2 = qword_100883228;
}
v3 = (*(__int64 (__fastcall **)(_QWORD))(v2 + 40))(0);
v10 = v3;
if ( v3 )
{
sub_100588190(9, 1, (__int64)"err.c", 535);
v4 = (char *)sub_1005DEFC4(v3, a1);
v5 = dword_100883224 != 1 || qword_100883238 == 0;
if ( !v5 && !sub_1005DF388(qword_100883238) )
{
sub_1005DECCC(qword_100883238);
qword_100883238 = 0;
}
sub_100588190(10, 1, (__int64)"err.c", 543);
(*(void (__fastcall **)(__int64 *))(qword_100883228 + 48))(&v10);
if ( v4 )
{
for ( i = 0; i != 16; ++i )
{
v7 = &v4[8 * i];
v8 = *((void **)v7 + 26);
v9 = &v4[4 * i];
if ( v8 )
{
if ( (v9[336] & 1) != 0 )
{
sub_100588C44(v8);
*((_QWORD *)v7 + 26) = 0;
}
}
*((_DWORD *)v9 + 84) = 0;
}
sub_100588C44(v4);
}
}
}