//
// sub_100578B84 from 0x100578b84 to 0x100578cbc (312 bytes)
//
// 2 xrefs:
// > sub_100578294 @ 0x100578794
// > sub_100578A6C @ 0x100578b20
//
// 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_100578B84(__int64 a1)
{
void **v2; // x20
__int64 v3; // x24
char *v4; // x20
__int64 result; // x0
char v6[33]; // [xsp+17h] [xbp-69h] BYREF
_BYTE v7[16]; // [xsp+38h] [xbp-48h] BYREF
if ( *(_BYTE *)(a1 + 741) )
{
v2 = (void **)sub_100570050((__int64)&off_10082E098);
if ( v2 )
{
strlen(*(const char **)(a1 + 1512));
nullsub_1();
sub_1005700D0(v2);
strlen(*(const char **)(a1 + 376));
nullsub_1();
sub_1005700D0(v2);
sub_1005700F0(v2, (__int64)v7);
v3 = 0;
v4 = v6;
do
{
sub_100562884(v4, 3, "%02x", (unsigned __int8)v7[v3++]);
v4 += 2;
}
while ( v3 != 16 );
result = sub_10057A8EC(a1 + 1336, "APOP %s %s", *(const char **)(a1 + 368), v6);
if ( !(_DWORD)result )
{
*(_DWORD *)(a1 + 1448) = 6;
return 0;
}
}
else
{
return 27;
}
}
else
{
*(_DWORD *)(a1 + 1448) = 0;
return 0;
}
return result;
}