//
// sub_100739838 from 0x100739838 to 0x100739954 (284 bytes)
//
// 2 xrefs:
// > sub_100739AC4 @ 0x10073a07c
// > sub_10073A254 @ 0x10073a6c0
//
// 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:16 +0000
//
__int64 __fastcall sub_100739838(__int64 a1, int a2, int a3)
{
__int64 v3; // x20
int v6; // w0
__int64 v7; // x8
__int16 v8; // w2
int v9; // w4
LODWORD(v3) = a3;
v6 = sub_1006B0F78(*(_QWORD *)(a1 + 24));
if ( a2 == 2 )
{
if ( v6 == 22 )
{
v7 = *(_QWORD *)(a1 + 32);
v3 = 1;
if ( v7 )
v3 = *(_QWORD *)(*(_QWORD *)(v7 + 40) + 32LL) == 0;
*(_DWORD *)(a1 + 20) = v3;
return v3;
}
v8 = 104;
v9 = 99;
goto LABEL_14;
}
if ( a2 != 1 )
{
v8 = 110;
v9 = 105;
LABEL_14:
sub_100706FB0(33, 104, v8, (__int64)"pk7_lib.c", v9);
return 0;
}
if ( v6 != 22 )
{
v8 = 104;
v9 = 85;
goto LABEL_14;
}
*(_DWORD *)(a1 + 20) = v3;
if ( !(_DWORD)v3 )
return 0;
v3 = (int)v3;
if ( (unsigned int)sub_1006B0F78(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 40LL) + 24LL)) == 21 )
{
sub_10071F088(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 40LL) + 32LL));
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 40LL) + 32LL) = 0;
}
return v3;
}