//
// sub_9E038 from 0x9e038 to 0x9e1ac (372 bytes)
//
// 1 xrefs:
// > sub_9D7F4 @ 0x9d994
//
// 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 sub_9E038()
{
__int64 v0; // x19
__int64 result; // x0
__int64 v2; // x9
__int64 v3; // x0
__int64 v4; // x0
_BYTE v5[512]; // [xsp+210h] [xbp-440h] BYREF
_BYTE v6[512]; // [xsp+410h] [xbp-240h] BYREF
int v7; // [xsp+618h] [xbp-38h] BYREF
int v8; // [xsp+61Ch] [xbp-34h] BYREF
v7 = 512;
v8 = 512;
result = sub_9E898();
if ( !(_DWORD)result )
{
result = sub_9E924(result, v6, &v8);
if ( !(_DWORD)result )
{
if ( (unsigned int)sub_E3E1C("?WPL VERSION", v6) )
return 19;
do
{
v8 = 512;
result = sub_9E434(v0, v6, &v8, 0, 0);
if ( (_DWORD)result )
return result;
}
while ( (unsigned int)sub_9E978(result, v6, 3) );
while ( 1 )
{
v7 = 512;
v8 = 512;
if ( (unsigned int)sub_9E434(v0, v6, &v8, v5, &v7) )
return 0;
v2 = v7;
v6[v8] = 0;
v5[v2] = 0;
if ( (_DWORD)v2 )
break;
v4 = sub_9E588();
if ( !(unsigned int)sub_9E978(v4, v6, 8) )
{
v3 = v0;
LABEL_10:
sub_9E948(v3);
}
}
sub_E3D58(v6);
v3 = v0;
goto LABEL_10;
}
}
return result;
}