//
// sub_1006B635C from 0x1006b635c to 0x1006b6514 (440 bytes)
//
// 2 xrefs:
// > sub_1006AC5F0 @ 0x1006ac630
// > sub_10070F0D8 @ 0x10070f0e4
//
// 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:11:57 +0000
//
__int64 __fastcall sub_1006B635C(_DWORD *a1, unsigned int *a2)
{
_QWORD *v4; // x21
__int64 v5; // x8
__int64 v6; // x9
unsigned int v7; // w8
unsigned int v8; // w8
__int64 v10; // x8
v4 = a2 + 10;
v5 = a2[26];
*((_BYTE *)a2 + v5 + 40) = 0x80;
v6 = v5 + 1;
if ( (unsigned __int64)(v5 + 1) >= 0x39 )
{
bzero((char *)v4 + v6, 63 - v5);
sub_1006B6514(a2, v4, 1);
v6 = 0;
}
bzero((char *)v4 + v6, 56 - v6);
v7 = bswap32(a2[8]);
a2[24] = bswap32(a2[9]);
a2[25] = v7;
sub_1006B6514(a2, v4, 1);
a2[26] = 0;
v4[6] = 0;
v4[7] = 0;
v4[4] = 0;
v4[5] = 0;
v4[2] = 0;
v4[3] = 0;
*v4 = 0;
v4[1] = 0;
v8 = a2[27];
if ( v8 == 28 )
{
*a1 = bswap32(*a2);
a1[1] = bswap32(a2[1]);
a1[2] = bswap32(a2[2]);
a1[3] = bswap32(a2[3]);
a1[4] = bswap32(a2[4]);
a1[5] = bswap32(a2[5]);
a1[6] = bswap32(a2[6]);
}
else if ( v8 == 32 )
{
*a1 = bswap32(*a2);
a1[1] = bswap32(a2[1]);
a1[2] = bswap32(a2[2]);
a1[3] = bswap32(a2[3]);
a1[4] = bswap32(a2[4]);
a1[5] = bswap32(a2[5]);
a1[6] = bswap32(a2[6]);
a1[7] = bswap32(a2[7]);
}
else
{
if ( v8 > 0x20 )
return 0;
if ( v8 >= 4 )
{
v10 = 0;
do
{
a1[v10] = bswap32(a2[v10]);
++v10;
}
while ( (unsigned int)v10 < a2[27] >> 2 );
}
}
return 1;
}