//
// sub_1005D62C0 from 0x1005d62c0 to 0x1005d63b4 (244 bytes)
//
// 1 xrefs:
// > sub_1005D9670 @ 0x1005d99e0
//
// 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
//
_BYTE *__fastcall sub_1005D62C0(__int64 a1, char *__s)
{
char *v2; // x19
__int64 (*v3)(void); // x8
_BYTE *v4; // x20
int v5; // w0
__int64 v6; // x2
__int64 v7; // x4
v2 = __s;
if ( !a1 )
{
v6 = 67;
v7 = 391;
goto LABEL_13;
}
if ( !__s )
{
v2 = *(char **)(a1 + 56);
if ( !v2 )
{
v6 = 111;
v7 = 397;
goto LABEL_13;
}
}
if ( (*(_BYTE *)(a1 + 20) & 1) != 0
|| (v3 = *(__int64 (**)(void))(a1 + 40)) == nullptr && (v3 = *(__int64 (**)(void))(*(_QWORD *)a1 + 48LL)) == nullptr
|| (v4 = (_BYTE *)v3()) == nullptr )
{
v5 = strlen(v2);
v4 = sub_100588710((unsigned int)(v5 + 1), (__int64)"dso_lib.c", 407);
if ( v4 )
{
strlen(v2);
sub_1005DA340((int)v4, v2);
return v4;
}
v6 = 65;
v7 = 409;
LABEL_13:
sub_1005E0E48(37, 126, v6, "dso_lib.c", v7);
return nullptr;
}
return v4;
}