//
// sub_100632C3C from 0x100632c3c to 0x100632d28 (236 bytes)
//
// 6 xrefs:
// > sub_100564430 @ 0x100564820
// > sub_10056CFB8 @ 0x10056d1b4
// > sub_100618A60 @ 0x100618c34
// > sub_100618A60 @ 0x100618cb8
// > sub_100618A60 @ 0x100618dd4
// > sub_10062EC90 @ 0x10062ee20
//
// 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:10:29 +0000
//
__int64 __fastcall sub_100632C3C(__int16 *a1, char *a2, int a3, int a4, int a5)
{
int v6; // w15
char *v7; // x0
__int64 v8; // x9
__int64 v10; // x10
__int64 v11; // x8
__int64 v12; // x15
__int64 v13; // x16
int v14; // s0
if ( a5 )
v6 = a5;
else
v6 = a4;
v7 = *((char **)a1 + 1);
if ( !v7 )
return 30;
if ( !a2 )
return 31;
v8 = (unsigned int)a1[1];
if ( v6 == a4 && (_DWORD)v8 == a3 && *a1 == a4 )
{
memcpy(v7, a2, 4LL * a4 * a3);
}
else if ( (int)v8 >= 1 )
{
v10 = 0;
v11 = *a1;
v12 = 4LL * v6;
do
{
if ( (int)v11 >= 1 )
{
v13 = 0;
do
{
v14 = 0;
if ( v10 < a3 && v13 < a4 )
v14 = *(_DWORD *)&a2[4 * v13];
*(_DWORD *)&v7[4 * v13++] = v14;
}
while ( (unsigned int)v11 != v13 );
}
++v10;
v7 += 4 * v11;
a2 += v12;
}
while ( v10 != v8 );
}
return 0;
}