//
// sub_100745A04 from 0x100745a04 to 0x100745d7c (888 bytes)
//
// 1 xrefs:
// > sub_1007453C0 @ 0x100745478
//
// 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:13:22 +0000
//
bool __fastcall sub_100745A04(int a1, int a2, __int64 a3, char *__s, __int64 a5)
{
int v8; // w0
__int16 v9; // w2
int v10; // w4
__int64 v11; // x9
__int64 v12; // x3
__int64 v13; // x19
int v15; // w0
if ( a2 > 199 )
{
switch ( a2 )
{
case 200:
if ( qword_100A0F638 )
{
v8 = dword_100A0F5F4;
if ( !dword_100A0F5F4 )
{
v8 = sub_100707AE4();
dword_100A0F5F4 = v8;
}
v9 = 100;
v10 = 683;
goto LABEL_22;
}
if ( __s )
{
if ( qword_100A0F630 )
sub_1006AEDAC((void *)qword_100A0F630);
qword_100A0F630 = 0;
qword_100A0F630 = (__int64)sub_100700290(__s);
return qword_100A0F630 != 0;
}
v8 = dword_100A0F5F4;
if ( !dword_100A0F5F4 )
{
v8 = sub_100707AE4();
dword_100A0F5F4 = v8;
}
v9 = 67;
v10 = 687;
break;
case 201:
goto LABEL_14;
case 202:
sub_1006AE2F8(9, 30, (__int64)"e_chil.c", 750);
dword_100A0F5F8 = a3 != 0;
v12 = 752;
goto LABEL_27;
case 203:
LABEL_23:
sub_1006AE2F8(9, 30, (__int64)"e_chil.c", 714);
qword_100A0F670 = (__int64)__s;
v12 = 716;
goto LABEL_27;
case 204:
LABEL_24:
sub_1006AE2F8(9, 30, (__int64)"e_chil.c", 720);
qword_100A0F678 = (__int64)__s;
v12 = 722;
goto LABEL_27;
default:
goto LABEL_19;
}
goto LABEL_22;
}
if ( a2 <= 99 )
{
switch ( a2 )
{
case 1:
sub_1006AE2F8(9, 30, (__int64)"e_chil.c", 695);
if ( qword_100A0F660 )
{
sub_1007006BC((_DWORD *)qword_100A0F660);
qword_100A0F660 = 0;
}
if ( (int)sub_1006AE670((_DWORD *)__s + 18, 1, 21, (__int64)"e_chil.c", 700) < 2 )
{
v15 = dword_100A0F5F4;
if ( !dword_100A0F5F4 )
{
v15 = sub_100707AE4();
dword_100A0F5F4 = v15;
}
sub_100706FB0(v15, 100, 101, (__int64)"e_chil.c", 703);
}
else
{
qword_100A0F660 = (__int64)__s;
}
v12 = 705;
goto LABEL_27;
case 2:
sub_1006AE2F8(9, 30, (__int64)"e_chil.c", 708);
qword_100A0F668 = a5;
v12 = 710;
goto LABEL_27;
case 4:
goto LABEL_23;
case 5:
goto LABEL_24;
default:
goto LABEL_19;
}
}
if ( a2 != 100 )
{
if ( a2 == 101 )
{
sub_1006AE2F8(9, 30, (__int64)"e_chil.c", 745);
v13 = 1;
dword_100A0F5F8 = 1;
sub_1006AE2F8(10, 30, (__int64)"e_chil.c", 747);
return v13;
}
LABEL_19:
v8 = dword_100A0F5F4;
if ( !dword_100A0F5F4 )
{
v8 = sub_100707AE4();
dword_100A0F5F4 = v8;
}
v9 = 103;
v10 = 758;
LABEL_22:
sub_100706FB0(v8, 100, v9, (__int64)"e_chil.c", v10);
return 0;
}
LABEL_14:
sub_1006AE2F8(9, 30, (__int64)"e_chil.c", 730);
v11 = qword_1009F0C10 | 0x10;
if ( !a3 )
v11 = qword_1009F0C10 & 0xFFFFFFFFFFFFFFEFLL;
qword_1009F0C10 = v11;
v12 = 735;
LABEL_27:
sub_1006AE2F8(10, 30, (__int64)"e_chil.c", v12);
return 1;
}