//
// sub_1007537BC from 0x1007537bc to 0x10075392c (368 bytes)
//
// 1 xrefs:
// > sub_100752D00 @ 0x100752d34
//
// 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:31 +0000
//
__int64 __fastcall sub_1007537BC(__int64 a1, int a2, int a3, __int64 a4)
{
__int64 v8; // x20
__int64 result; // x0
__int64 v10; // x3
__int16 v11; // w1
int v12; // w3
__int64 v13; // x0
v8 = sub_100712A60(a1);
result = 1;
switch ( a2 )
{
case 1:
if ( (unsigned int)sub_100711408((unsigned int *)a4) != 815 )
{
v11 = 108;
v12 = 446;
goto LABEL_18;
}
*(_QWORD *)(v8 + 8) = a4;
return 1;
case 3:
case 4:
case 5:
return result;
case 6:
if ( a3 != 32 )
{
v11 = 111;
v12 = 464;
goto LABEL_18;
}
*(_OWORD *)(v8 + 32) = *(_OWORD *)(a4 + 16);
*(_OWORD *)(v8 + 16) = *(_OWORD *)a4;
*(_DWORD *)v8 = 1;
return 1;
case 7:
if ( *(_DWORD *)v8 )
{
v10 = v8 + 16;
return (*(__int64 (__fastcall **)(__int64, __int64, __int64, __int64))(*(_QWORD *)a4 + 112LL))(
a4,
4100,
32,
v10);
}
v13 = sub_100712A68(a1);
if ( v13 )
{
v10 = sub_10070F9B0(v13);
if ( v10 )
return (*(__int64 (__fastcall **)(__int64, __int64, __int64, __int64))(*(_QWORD *)a4 + 112LL))(
a4,
4100,
32,
v10);
v11 = 116;
v12 = 485;
}
else
{
v11 = 116;
v12 = 479;
}
LABEL_18:
sub_10074A888(128, v11, (__int64)"gost_pmeth.c", v12);
return 0;
case 13:
*(_QWORD *)a4 = *(_QWORD *)(v8 + 8);
return 1;
default:
return 4294967294LL;
}
}