//
// sub_10073A254 from 0x10073a254 to 0x10073a81c (1480 bytes)
//
// 1 xrefs:
// > sub_100739740 @ 0x10073977c
//
// 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:17 +0000
//
__int64 __fastcall sub_10073A254(__int64 a1, _QWORD *a2)
{
int v4; // w23
int v5; // w1
__int16 v6; // w2
int v7; // w4
__int64 v8; // x19
__int16 v9; // w2
int v10; // w4
__int64 v11; // x21
__int64 v12; // x8
__int64 v13; // x21
unsigned int *v14; // x22
_BYTE *v15; // x0
__int64 v16; // x8
_BYTE *v17; // x0
__int64 v18; // x21
__int64 v19; // x8
__int64 v20; // x8
int v21; // w23
__int64 v22; // x0
__int64 v23; // x25
__int64 v24; // x0
int v25; // w3
int v26; // w4
int v27; // w5
int v28; // w6
int v29; // w7
__int64 v30; // x0
_BYTE *v31; // x26
__int64 v32; // x0
int v33; // w3
int v34; // w4
int v35; // w5
int v36; // w6
int v37; // w7
_QWORD *v38; // x0
_QWORD *v39; // x19
int v40; // w20
__int64 v42; // [xsp+8h] [xbp-E8h] BYREF
int v43; // [xsp+10h] [xbp-E0h] BYREF
int v44; // [xsp+14h] [xbp-DCh] BYREF
void *v45[6]; // [xsp+18h] [xbp-D8h] BYREF
void **v46; // [xsp+48h] [xbp-A8h] BYREF
unsigned int v47; // [xsp+54h] [xbp-9Ch] BYREF
char __s[64]; // [xsp+58h] [xbp-98h] BYREF
if ( !a1 )
{
v9 = 143;
v10 = 756;
LABEL_8:
sub_100706FB0(33, 128, v9, (__int64)"pk7_doit.c", v10);
return 0;
}
if ( !*(_QWORD *)(a1 + 32) )
{
v9 = 122;
v10 = 761;
goto LABEL_8;
}
sub_100708F5C(v45);
v4 = sub_1006B0F78(*(_QWORD *)(a1 + 24));
*(_DWORD *)(a1 + 16) = 0;
switch ( v4 )
{
case 21:
v11 = *(_QWORD *)(a1 + 32);
goto LABEL_67;
case 22:
v12 = *(_QWORD *)(a1 + 32);
v14 = *(unsigned int **)(v12 + 32);
v13 = *(_QWORD *)(v12 + 40);
if ( (unsigned int)sub_1006B0F78(*(_QWORD *)(v13 + 24)) == 21 )
{
v11 = *(_QWORD *)(v13 + 32);
}
else if ( (unsigned int)sub_1006B0F78(*(_QWORD *)(v13 + 24)) - 21 < 6 )
{
v11 = 0;
}
else
{
v19 = *(_QWORD *)(v13 + 32);
if ( v19 )
{
if ( *(_DWORD *)v19 == 4 )
v11 = *(_QWORD *)(v19 + 8);
else
v11 = 0;
}
else
{
v11 = 0;
}
}
if ( (unsigned int)sub_1006B0F78(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 40LL) + 24LL)) == 21
&& *(_DWORD *)(a1 + 20) )
{
sub_100721BE0((_QWORD *)v11);
v11 = 0;
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 40LL) + 32LL) = 0;
}
goto LABEL_39;
case 23:
v11 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 16LL) + 16LL);
if ( v11 )
goto LABEL_67;
v15 = sub_100721C64(4);
v11 = (__int64)v15;
if ( v15 )
{
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 16LL) + 16LL) = v15;
goto LABEL_67;
}
v5 = 128;
v6 = 65;
v7 = 792;
goto LABEL_5;
case 24:
v16 = *(_QWORD *)(a1 + 32);
v14 = *(unsigned int **)(v16 + 32);
v11 = *(_QWORD *)(*(_QWORD *)(v16 + 40) + 16LL);
if ( v11 )
goto LABEL_39;
v17 = sub_100721C64(4);
v11 = (__int64)v17;
if ( !v17 )
{
v5 = 128;
v6 = 65;
v7 = 780;
goto LABEL_5;
}
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 40LL) + 16LL) = v17;
LABEL_39:
if ( !v14 )
{
LABEL_63:
if ( v4 == 25 )
{
v32 = sub_1006B0F78(**(_QWORD **)(*(_QWORD *)(a1 + 32) + 8LL));
if ( !sub_10073A830(&v46, a2, v32)
|| !(unsigned int)sub_100709260(v46, (__int64)__s, &v43, v33, v34, v35, v36, v37) )
{
v8 = 0;
goto LABEL_76;
}
sub_1007219B8(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 24LL), __s, v43);
}
goto LABEL_67;
}
if ( (int)sub_100704BB4(v14) < 1 )
{
LABEL_67:
if ( (unsigned int)sub_1006B0F78(*(_QWORD *)(a1 + 24)) == 22 && sub_100739838(a1, 2, 0) )
goto LABEL_73;
if ( !v11 )
{
v8 = 0;
goto LABEL_76;
}
if ( (*(_BYTE *)(v11 + 16) & 0x10) != 0 )
{
LABEL_73:
v8 = 1;
goto LABEL_76;
}
v38 = sub_1007010E4(a2, 1025);
v39 = v38;
if ( v38 )
{
v40 = sub_100700CE0(v38, 3, 0, (__int64)&v42);
sub_100700784((__int64)v39, 512);
sub_100700CE0(v39, 130, 0, 0);
sub_100721C24(v11, v42, v40);
goto LABEL_73;
}
v5 = 128;
v6 = 107;
v7 = 892;
LABEL_5:
sub_100706FB0(33, v5, v6, (__int64)"pk7_doit.c", v7);
v8 = 0;
goto LABEL_76;
}
v21 = 0;
while ( 1 )
{
v22 = sub_100704BC8((__int64)v14, v21);
v23 = v22;
if ( !*(_QWORD *)(v22 + 56) )
goto LABEL_55;
v24 = sub_1006B0F78(**(_QWORD **)(v22 + 16));
if ( !sub_10073A830(&v46, a2, v24) )
{
v8 = 0;
goto LABEL_76;
}
if ( !(unsigned int)sub_1007093D4(v45, (__int64 *)v46) )
{
v8 = 0;
goto LABEL_76;
}
if ( (int)sub_100704BB4(*(unsigned int **)(v23 + 24)) < 1 )
break;
if ( !sub_10073AAA0(*(_QWORD *)(v23 + 24), 52) && !(unsigned int)sub_10073AC78(v23, 0) )
{
v5 = 136;
v6 = 65;
v7 = 722;
goto LABEL_5;
}
if ( !(unsigned int)sub_100709260(v45, (__int64)__s, &v47, v25, v26, v27, v28, v29) )
{
v5 = 136;
v6 = 6;
v7 = 729;
goto LABEL_5;
}
if ( !(unsigned int)sub_10073ACEC(v23, __s, v47) )
{
v5 = 136;
v6 = 65;
v7 = 733;
goto LABEL_5;
}
if ( !(unsigned int)sub_10073A8F0(v23) )
{
v8 = 0;
goto LABEL_76;
}
LABEL_55:
if ( ++v21 >= (int)sub_100704BB4(v14) )
goto LABEL_67;
}
v30 = sub_10070F630(*(_QWORD *)(v23 + 56));
v44 = v30;
v31 = sub_1006AE878(v30, (__int64)"pk7_doit.c", 858);
if ( v31 )
{
if ( !(unsigned int)sub_10070F220((__int64 *)v45, (__int64)v31, &v44, *(int **)(v23 + 56)) )
{
v5 = 128;
v6 = 6;
v7 = 863;
goto LABEL_5;
}
sub_100721C24(*(_QWORD *)(v23 + 40), (__int64)v31, v44);
goto LABEL_55;
}
v8 = 0;
LABEL_76:
sub_10070930C((__int64)v45);
return v8;
case 25:
v18 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 16LL);
if ( (unsigned int)sub_1006B0F78(*(_QWORD *)(v18 + 24)) == 21 )
{
v11 = *(_QWORD *)(v18 + 32);
}
else if ( (unsigned int)sub_1006B0F78(*(_QWORD *)(v18 + 24)) - 21 < 6 )
{
v11 = 0;
}
else
{
v20 = *(_QWORD *)(v18 + 32);
if ( v20 )
{
if ( *(_DWORD *)v20 == 4 )
v11 = *(_QWORD *)(v20 + 8);
else
v11 = 0;
}
else
{
v11 = 0;
}
}
if ( (unsigned int)sub_1006B0F78(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 16LL) + 24LL)) == 21
&& *(_DWORD *)(a1 + 20) )
{
sub_100721BE0((_QWORD *)v11);
v11 = 0;
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 16LL) + 32LL) = 0;
}
goto LABEL_63;
default:
v5 = 128;
v6 = 112;
v7 = 820;
goto LABEL_5;
}
}