//
// sub_10058AD3C from 0x10058ad3c to 0x10058ae10 (212 bytes)
//
// 8 xrefs:
// > sub_1005E7F44 @ 0x1005e7f80
// > sub_1005E7FA8 @ 0x1005e7fe4
// > sub_1005E7FA8 @ 0x1005e8030
// > sub_1005F1C24 @ 0x1005f1f00
// > sub_100611000 @ 0x100611260
// > sub_100629098 @ 0x1006290e0
// > sub_100629A68 @ 0x100629c04
// > sub_100629C34 @ 0x100629e50
//
// 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
//
char *__fastcall sub_10058AD3C(unsigned int a1)
{
__int64 v1; // x8
__int64 v2; // x4
__int64 v3; // x0
char v5; // [xsp+8h] [xbp-38h] BYREF
unsigned int v6; // [xsp+18h] [xbp-28h]
int v7; // [xsp+30h] [xbp-10h] BYREF
char *v8; // [xsp+38h] [xbp-8h]
if ( a1 <= 0x3BD )
{
if ( a1 )
{
v1 = (int)a1;
if ( !LODWORD(off_10082EF78[5 * (int)a1 + 2]) )
{
v2 = 374;
LABEL_11:
sub_1005E0E48(8, 102, 101, "obj_dat.c", v2);
return nullptr;
}
}
else
{
v1 = 0;
}
return off_10082EF78[5 * v1 + 1];
}
if ( qword_100882CB8 )
{
v7 = 3;
v8 = &v5;
v6 = a1;
v3 = sub_1005DF1B8(qword_100882CB8, &v7);
if ( v3 )
return *(char **)(*(_QWORD *)(v3 + 8) + 8LL);
v2 = 388;
goto LABEL_11;
}
return nullptr;
}