//
// sub_100747D40 from 0x100747d40 to 0x100747db8 (120 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 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 12:36:32 +0000
//
__int64 __fastcall sub_100747D40(unsigned int *a1, unsigned int *a2)
{
__int64 v2; // rax
int v3; // ecx
__int64 v4; // rdx
__int64 v5; // r8
__int64 v6; // r10
__int64 v7; // r11
__int64 v8; // r14
__int64 result; // rax
v2 = *a1;
v3 = 0;
if ( *a1 )
{
v4 = *a2;
if ( *a2 )
{
v5 = 0;
v3 = 0;
do
{
LABEL_5:
v6 = *((_QWORD *)a1 + 2);
v7 = *(_QWORD *)(v6 + 8 * v5);
v8 = 0;
while ( *(_QWORD *)(*((_QWORD *)a2 + 2) + 8 * v8) != v7 )
{
if ( v4 == ++v8 )
{
LABEL_4:
*(_QWORD *)(v6 + 8LL * (unsigned int)(v5++ - v3)) = v7;
if ( v5 == v2 )
goto LABEL_11;
goto LABEL_5;
}
}
if ( v8 == 0xFFFFFFFFLL )
goto LABEL_4;
++v3;
++v5;
}
while ( v5 != v2 );
}
}
LABEL_11:
result = (unsigned int)(v2 - v3);
*a1 = result;
return result;
}