//
// sub_1005E54F8 from 0x1005e54f8 to 0x1005e5594 (156 bytes)
//
// 4 xrefs:
// > ??> @ 0x10083bc00
// > ??> @ 0x10083bc58
// > ??> @ 0x10083bcb0
// > ??> @ 0x10083bd08
//
// 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_1005E54F8(__int64 a1, unsigned __int8 *a2, __int64 a3, int a4)
{
int v7[54]; // [xsp+8h] [xbp-F8h] BYREF
if ( a4 || (sub_1005EAEDC(a1) & 0xF0007) == 4 || (sub_1005EAEDC(a1) & 0xF0007) == 3 )
{
sub_10059E3BC(a2, *(int **)(a1 + 120));
}
else
{
sub_10059E3BC(a2, v7);
sub_10059E530((signed __int64)v7, *(_DWORD **)(a1 + 120));
sub_10058A3A8((char *)v7, 0xD8u);
}
return 1;
}