//
// sub_49100 from 0x49100 to 0x49164 (100 bytes)
//
// 2 xrefs:
// > sub_49100 @ 0x49156
// > sub_49540 @ 0x4963c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_49100(_DWORD *a1, _QWORD *a2)
{
int v2; // r12
int v4; // r2
int i; // r3
int v6; // r5
int v7; // r1
_DWORD *v8; // r5
_DWORD *j; // r6
v2 = a1[2];
if ( v2 )
{
v4 = a1[3];
for ( i = 0; i < v4; ++i )
{
v6 = *(_DWORD *)(v2 + 4 * i);
*(_QWORD *)(v6 + 8) = *a2;
*(_QWORD *)(v6 + 16) = a2[1];
}
}
else
{
v7 = a1[14];
*(_QWORD *)(v7 + 8) = *a2;
*(_QWORD *)(v7 + 16) = a2[1];
}
v8 = a1 + 73;
for ( j = a1 + 73; ; sub_49100(j[2], a2) )
{
j = (_DWORD *)*j;
if ( j == v8 )
break;
}
return 0;
}