//
// sub_1007510D4 from 0x1007510d4 to 0x100751210 (316 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009f1f38
//
// 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:30 +0000
//
__int64 __fastcall sub_1007510D4(__int64 a1, unsigned __int64 a2)
{
__int64 v3; // x20
__int64 v4; // x8
unsigned __int64 v5; // x22
__int64 __src; // [xsp+8h] [xbp-48h] BYREF
unsigned __int8 v8[8]; // [xsp+10h] [xbp-40h] BYREF
v3 = *(_QWORD *)(a1 + 24);
if ( *(_DWORD *)(v3 + 4156) )
{
if ( !*(_DWORD *)(v3 + 4144) && *(_DWORD *)(v3 + 4152) )
{
__src = 0;
sub_100750DCC(a1, (char *)&__src, 8);
}
v4 = *(int *)(v3 + 4152);
if ( (_DWORD)v4 )
{
if ( (int)v4 <= 7 )
bzero((void *)(v3 + v4 + 4136), (unsigned int)(7 - v4) + 1LL);
if ( *(_DWORD *)(v3 + 4148) )
{
if ( *(_DWORD *)(v3 + 4144) == 1024 )
sub_10074D760((int *)v3, v8);
}
v5 = v3 + 4128;
sub_10074D124((int *)v3, (unsigned __int8 *)(v3 + 4128), (_BYTE *)(v3 + 4136));
*(_DWORD *)(v3 + 4144) = (*(_DWORD *)(v3 + 4144) & 0x3FF) + 8;
}
else
{
v5 = v3 + 4128;
}
sub_10074D568(v5, 32, a2);
return 1;
}
else
{
sub_10074A888(140, 116, (__int64)"gost_crypt.c", 569);
return 0;
}
}