//
// sub_1006F992C from 0x1006f992c to 0x1006f9a84 (344 bytes)
//
// 2 xrefs:
// > ??> @ 0x1009be960
// > ??> @ 0x1009bea30
//
// 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:12:44 +0000
//
__int64 __fastcall sub_1006F992C(__int64 a1, __int64 a2)
{
__int64 v4; // x22
__int64 v5; // x0
_DWORD *v6; // x19
__int64 v7; // x1
int v8; // w0
__int64 v9; // x4
__int64 v10; // x0
__int64 v11; // x23
__int64 v12; // x22
char **v13; // x0
void *v15; // [xsp+8h] [xbp-38h] BYREF
v15 = nullptr;
v4 = *(_QWORD *)(a2 + 32);
v5 = sub_100721B84();
v6 = (_DWORD *)v5;
if ( !v5 )
{
v9 = 164;
LABEL_13:
sub_100706FB0(5, 109, 65, "dh_ameth.c", v9);
goto LABEL_14;
}
v7 = v5 + 8;
if ( *(_UNKNOWN **)(a2 + 16) == &unk_1009BEA08 )
v8 = sub_1006F84CC(v4, v7);
else
v8 = sub_1006F83D8(v4, v7);
*v6 = v8;
if ( v8 <= 0 )
{
v9 = 169;
goto LABEL_13;
}
v10 = sub_100716208(*(_QWORD *)(v4 + 32), 0);
v11 = v10;
if ( !v10 )
goto LABEL_14;
v12 = sub_10071F004(v10, &v15);
sub_10071F01C(v11);
if ( (int)v12 <= 0 )
{
v9 = 183;
goto LABEL_13;
}
v13 = sub_1006B0D04(**(_DWORD **)(a2 + 16));
if ( (unsigned int)sub_100718F58(a1, v13, 16, v6, v15, v12) )
return 1;
LABEL_14:
if ( v15 )
sub_1006AEDAC(v15);
if ( v6 )
sub_100721BE0(v6);
return 0;
}