//
// sub_100745610 from 0x100745610 to 0x100745928 (792 bytes)
//
// 1 xrefs:
// > sub_1007453C0 @ 0x100745450
//
// 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
//
double sub_100745610()
{
int v0; // w0
__int16 v1; // w2
int v2; // w4
char *v3; // x1
__int64 *v4; // x0
__int64 (__fastcall *v5)(_QWORD, _QWORD, _QWORD, _QWORD); // x19
void *v6; // x20
void *v7; // x21
__int64 v8; // x22
void *v9; // x23
void *v10; // x24
void *v11; // x25
void *v12; // x26
__int64 v13; // x0
double result; // d0
_QWORD v15[2]; // [xsp+8h] [xbp-468h] BYREF
char v16; // [xsp+18h] [xbp-458h] BYREF
if ( qword_100A0F638 )
{
v0 = dword_100A0F5F4;
if ( !dword_100A0F5F4 )
{
v0 = sub_100707AE4();
dword_100A0F5F4 = v0;
}
v1 = 100;
v2 = 550;
LABEL_33:
sub_100706FB0(v0, 103, v1, (__int64)"e_chil.c", v2);
if ( qword_100A0F638 )
sub_1006FC01C((__int64 *)qword_100A0F638);
qword_100A0F638 = 0;
off_100A0F640 = nullptr;
off_100A0F648 = nullptr;
off_100A0F618 = nullptr;
off_100A0F650 = nullptr;
off_100A0F658 = nullptr;
off_100A0F620 = nullptr;
xmmword_100A0F608 = 0u;
off_100A0F628 = nullptr;
return 0.0;
}
if ( qword_100A0F630 )
v3 = (char *)qword_100A0F630;
else
v3 = "nfhwcrhk";
v4 = sub_1006FC118(nullptr, v3, 0, 0);
qword_100A0F638 = (__int64)v4;
if ( !v4 )
{
v0 = dword_100A0F5F4;
if ( !dword_100A0F5F4 )
{
v0 = sub_100707AE4();
dword_100A0F5F4 = v0;
}
v1 = 104;
v2 = 556;
goto LABEL_33;
}
v5 = (__int64 (__fastcall *)(_QWORD, _QWORD, _QWORD, _QWORD))sub_1006FC348((__int64)v4, (__int64)"HWCryptoHook_Init");
if ( !v5 )
goto LABEL_27;
v6 = (void *)sub_1006FC348(qword_100A0F638, (__int64)"HWCryptoHook_Finish");
if ( !v6
|| (v7 = (void *)sub_1006FC348(qword_100A0F638, (__int64)"HWCryptoHook_ModExp")) == nullptr
|| (v8 = sub_1006FC348(qword_100A0F638, (__int64)"HWCryptoHook_RSA")) == 0
|| (v9 = (void *)sub_1006FC348(qword_100A0F638, (__int64)"HWCryptoHook_RSALoadKey")) == nullptr
|| (v10 = (void *)sub_1006FC348(qword_100A0F638, (__int64)"HWCryptoHook_RSAGetPublicKey")) == nullptr
|| (v11 = (void *)sub_1006FC348(qword_100A0F638, (__int64)"HWCryptoHook_RSAUnloadKey")) == nullptr
|| (v12 = (void *)sub_1006FC348(qword_100A0F638, (__int64)"HWCryptoHook_RandomBytes")) == nullptr
|| (v13 = sub_1006FC348(qword_100A0F638, (__int64)"HWCryptoHook_ModExpCRT")) == 0 )
{
LABEL_27:
v0 = dword_100A0F5F4;
if ( !dword_100A0F5F4 )
{
v0 = sub_100707AE4();
dword_100A0F5F4 = v0;
}
v1 = 104;
v2 = 579;
goto LABEL_33;
}
off_100A0F640 = v5;
off_100A0F648 = v6;
off_100A0F618 = v7;
*(_QWORD *)&xmmword_100A0F608 = v8;
off_100A0F650 = v9;
off_100A0F658 = v10;
off_100A0F620 = v11;
off_100A0F628 = v12;
*((_QWORD *)&xmmword_100A0F608 + 1) = v13;
if ( !dword_100A0F5F8 && sub_1006AE580() && sub_1006AE590() && sub_1006AE5A0() )
{
qword_1009F0C40 = (__int64)sub_100746958;
qword_1009F0C48 = (__int64)sub_100746984;
qword_1009F0C50 = (__int64)sub_1007469B0;
qword_1009F0C58 = (__int64)sub_1007469C8;
}
v15[0] = &v16;
v15[1] = 1024;
qword_100A0F600 = off_100A0F640(&qword_1009F0C10, 152, v15, &qword_100A0F668);
if ( !qword_100A0F600 )
{
v0 = dword_100A0F5F4;
if ( !dword_100A0F5F4 )
{
v0 = sub_100707AE4();
dword_100A0F5F4 = v0;
}
v1 = 113;
v2 = 614;
goto LABEL_33;
}
if ( dword_1009F0B00 == -1 )
dword_1009F0B00 = sub_1006EDDE0(0, (__int64)"nFast HWCryptoHook RSA key handle", 0, 0, 0);
return result;
}