//
// sub_10066DB54 from 0x10066db54 to 0x10066dc48 (244 bytes)
//
// 1 xrefs:
// > sub_100658930 @ 0x100658ce8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:11:05 +0000
//
__int64 __fastcall sub_10066DB54(__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_100706FB0(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_100706FB0(20, 300, 337, "t1_reneg.c", v10);
*a4 = 40;
return 0;
}
*(_DWORD *)(v9 + 1188) = 1;
return 1;
}