//
// sub_1005479EC from 0x1005479ec to 0x100547ae0 (244 bytes)
//
// 1 xrefs:
// > sub_1005327C8 @ 0x100532b80
//
// 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_1005479EC(__int64 a1, char *__s1, int a3, _DWORD *a4)
{
char *v6; // x1
size_t v7; // x2
unsigned int v8; // t1
__int64 v9; // x20
__int64 v10; // x4
__int64 v11; // x4
if ( a3 <= 0 )
{
v11 = 154;
LABEL_8:
sub_1005E0E48(20, 300, 336, "t1_reneg.c", v11);
*a4 = 47;
return 0;
}
v8 = (unsigned __int8)*__s1;
v6 = __s1 + 1;
v7 = v8;
if ( v8 + 1 != a3 )
{
v11 = 164;
goto LABEL_8;
}
v9 = *(_QWORD *)(a1 + 128);
if ( (_DWORD)v7 != *(unsigned __int8 *)(v9 + 1120) )
{
v10 = 172;
goto LABEL_10;
}
if ( memcmp(v6, (const void *)(v9 + 1056), v7) )
{
v10 = 180;
LABEL_10:
sub_1005E0E48(20, 300, 337, "t1_reneg.c", v10);
*a4 = 40;
return 0;
}
*(_DWORD *)(v9 + 1188) = 1;
return 1;
}