//
// sub_10074775C from 0x10074775c to 0x100747b30 (980 bytes)
//
// 1 xrefs:
// > sub_100747514 @ 0x1007475b4
//
// 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:23 +0000
//
__int64 __fastcall sub_10074775C(__int64 a1)
{
int v2; // w0
__int16 v3; // w2
int v4; // w4
__int64 *v5; // x0
__int64 (__fastcall *v6)(_QWORD, _QWORD); // x20
void *v7; // x21
void *v8; // x22
void *v9; // x23
void *v10; // x24
void *v11; // x25
void *v12; // x26
__int64 v13; // x8
void *v14; // x0
void *v16; // [xsp+8h] [xbp-C8h]
void *v17; // [xsp+10h] [xbp-C0h]
void *v18; // [xsp+18h] [xbp-B8h]
void *v19; // [xsp+20h] [xbp-B0h]
void *v20; // [xsp+28h] [xbp-A8h]
_OWORD v21[4]; // [xsp+30h] [xbp-A0h] BYREF
v21[0] = *(_OWORD *)"ENGINE_init";
memset(&v21[1], 0, 48);
if ( qword_100A0F6E0 )
{
v2 = dword_100A0F6A4;
if ( !dword_100A0F6A4 )
{
v2 = sub_100707AE4();
dword_100A0F6A4 = v2;
}
v3 = 100;
v4 = 473;
LABEL_29:
sub_100706FB0(v2, 104, v3, (__int64)"e_sureware.c", v4);
if ( qword_100A0F6E0 )
sub_1006FC01C((__int64 *)qword_100A0F6E0);
qword_100A0F6E0 = 0;
off_100A0F6E8 = nullptr;
off_100A0F6F0 = nullptr;
off_100A0F6D0 = nullptr;
off_100A0F6D8 = nullptr;
off_100A0F6F8 = nullptr;
off_100A0F700 = nullptr;
off_100A0F708 = nullptr;
off_100A0F6B8 = nullptr;
off_100A0F6A8 = nullptr;
off_100A0F6C8 = nullptr;
off_100A0F710 = nullptr;
off_100A0F718 = nullptr;
off_100A0F6C0 = nullptr;
return 0;
}
v5 = sub_1006FC118(nullptr, "SureWareHook", 0, 0);
qword_100A0F6E0 = (__int64)v5;
if ( !v5 )
{
v2 = dword_100A0F6A4;
if ( !dword_100A0F6A4 )
{
v2 = sub_100707AE4();
dword_100A0F6A4 = v2;
}
v3 = 104;
v4 = 479;
goto LABEL_29;
}
v6 = (__int64 (__fastcall *)(_QWORD, _QWORD))sub_1006FC348((__int64)v5, (__int64)"SureWareHook_Init");
if ( !v6 )
goto LABEL_23;
v7 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Finish");
if ( !v7 )
goto LABEL_23;
v8 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Rand_Bytes");
if ( !v8 )
goto LABEL_23;
v9 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Rand_Seed");
if ( !v9 )
goto LABEL_23;
v10 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Load_Privkey");
if ( !v10 )
goto LABEL_23;
v11 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Load_Rsa_Pubkey");
if ( !v11 )
goto LABEL_23;
v12 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Free");
if ( !v12
|| (v20 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Rsa_Priv_Dec")) == nullptr
|| (v19 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Rsa_Sign")) == nullptr
|| (v18 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Dsa_Sign")) == nullptr
|| (v17 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Info_Pubkey")) == nullptr
|| (v13 = sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Load_Dsa_Pubkey")) == 0
|| (v16 = (void *)v13, (v14 = (void *)sub_1006FC348(qword_100A0F6E0, (__int64)"SureWareHook_Mod_Exp")) == nullptr) )
{
LABEL_23:
v2 = dword_100A0F6A4;
if ( !dword_100A0F6A4 )
{
v2 = sub_100707AE4();
dword_100A0F6A4 = v2;
}
v3 = 104;
v4 = 521;
goto LABEL_29;
}
off_100A0F6E8 = v6;
off_100A0F6F0 = v7;
off_100A0F6D0 = v9;
off_100A0F6D8 = v8;
off_100A0F6F8 = v10;
off_100A0F700 = v11;
off_100A0F708 = v12;
off_100A0F6B8 = v20;
off_100A0F6A8 = v19;
off_100A0F6C8 = v18;
off_100A0F710 = v17;
off_100A0F718 = v16;
off_100A0F6C0 = v14;
if ( (unsigned int)v6(v21, (unsigned __int8)byte_100A0F6A1 ^ 1u) == -3 )
{
v2 = dword_100A0F6A4;
if ( !dword_100A0F6A4 )
{
v2 = sub_100707AE4();
dword_100A0F6A4 = v2;
}
v3 = 104;
v4 = 540;
goto LABEL_29;
}
if ( (unsigned int)off_100A0F6E8(v21, (unsigned __int8)byte_100A0F6A1 ^ 1u) == -3 )
{
v2 = dword_100A0F6A4;
if ( !dword_100A0F6A4 )
{
v2 = sub_100707AE4();
dword_100A0F6A4 = v2;
}
v3 = 104;
v4 = 544;
goto LABEL_29;
}
sub_100747D4C(a1, 0, 0, 0);
if ( dword_1009F1050 == -1 )
dword_1009F1050 = sub_1006EDDE0(0, (__int64)"SureWareHook RSA key handle", 0, 0, (__int64)sub_100748BCC);
if ( dword_1009F1054 == -1 )
dword_1009F1054 = sub_1006F4DEC(0, (__int64)"SureWareHook DSA key handle", 0, 0, (__int64)sub_100748BCC);
return 1;
}