//
// sub_100752F54 from 0x100752f54 to 0x10075307c (296 bytes)
//
// 2 xrefs:
// > sub_100752D00 @ 0x100752dac
// > sub_100752D00 @ 0x100752e60
//
// 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_100752F54(__int64 a1, int a2, __int64 a3, unsigned int *a4)
{
_DWORD *v7; // x0
_DWORD *v8; // x19
__int64 result; // x0
_BYTE *v10; // x0
v7 = (_DWORD *)sub_100712A60(a1);
v8 = v7;
if ( a2 > 4096 )
{
if ( a2 == 4097 )
{
*v7 = a3;
return 1;
}
else
{
return 4294967294LL;
}
}
else
{
result = 1;
switch ( a2 )
{
case 1:
if ( (unsigned int)sub_100711408(a4) == 809 )
{
*((_QWORD *)v8 + 1) = a4;
return 1;
}
else
{
sub_10074A888(125, 108, (__int64)"gost_pmeth.c", 82);
return 0;
}
case 2:
if ( (unsigned int)a3 < 2 )
return 1;
if ( (_DWORD)a3 == 3 )
{
v8[6] = 1;
return 1;
}
if ( (_DWORD)a3 != 2 )
return 4294967294LL;
result = (unsigned int)v8[6];
break;
case 3:
case 4:
case 5:
case 7:
case 9:
case 10:
case 11:
return result;
case 8:
v10 = sub_1006AE878(a3, (__int64)"gost_pmeth.c", 109);
*((_QWORD *)v8 + 2) = v10;
memcpy(v10, a4, (int)a3);
return 1;
case 13:
*(_QWORD *)a4 = *((_QWORD *)v8 + 1);
return 1;
default:
return 4294967294LL;
}
}
return result;
}