//
// sub_1005E3A10 from 0x1005e3a10 to 0x1005e3a9c (140 bytes)
//
// 18 xrefs:
// > sub_1005215B0 @ 0x10052172c
// > sub_1005215B0 @ 0x100521908
// > sub_100528C80 @ 0x100528e88
// > sub_10053414C @ 0x10053441c
// > sub_10053414C @ 0x10053442c
// > sub_10053414C @ 0x100534544
// > sub_10053414C @ 0x1005345a0
// > sub_10053414C @ 0x1005345ac
// > sub_100535924 @ 0x100535b48
// > sub_10053E050 @ 0x10053e068
// > sub_10053E050 @ 0x10053e080
// > sub_1005EA584 @ 0x1005ea5a0
// > sub_1005FDE38 @ 0x1005fdf50
// > sub_1005FDE38 @ 0x1005fdfa8
// > sub_1005FE014 @ 0x1005fe37c
// > sub_1005FE014 @ 0x1005fe39c
// > sub_100615014 @ 0x100615190
// > sub_1006199F8 @ 0x100619a10
//
// 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_1005E3A10(void **__b)
{
unsigned int (__fastcall *v2)(void **); // x8
char *v3; // x0
void **v4; // x20
__int64 v5; // x0
if ( *__b )
{
v2 = *((unsigned int (__fastcall **)(void **))*__b + 5);
if ( v2 && !v2(__b) )
return 0;
v4 = __b + 15;
v3 = (char *)__b[15];
if ( v3 )
sub_10058A3A8(v3, *((int *)*__b + 12));
}
else
{
v4 = __b + 15;
}
if ( *v4 )
sub_100588C44(*v4);
v5 = (__int64)__b[1];
if ( v5 )
sub_1005D70C4(v5);
memset(__b, 0, 0xA8u);
return 1;
}