//
// sub_1000C4F50 from 0x1000c4f50 to 0x1000c5051 (257 bytes)
//
// 1 xrefs:
// > sub_1000C4E40 @ 0x1000c4e6c
//
// 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
//
void __fastcall sub_1000C4F50(__int64 **a1, _QWORD *a2, _QWORD *a3)
{
_QWORD *v4; // r12
_QWORD *v5; // rax
_QWORD *v6; // rcx
_QWORD *v7; // r15
char *v8; // rax
__int128 v9; // xmm1
__int64 v10; // rcx
__int64 *v11; // rcx
_QWORD *v12; // rax
bool v13; // zf
__int64 v14; // [rsp-48h] [rbp-48h] BYREF
__int64 v15; // [rsp-40h] [rbp-40h] BYREF
__int64 **v16; // [rsp-38h] [rbp-38h]
if ( a2 != a3 )
{
v4 = a2;
v16 = a1 + 1;
do
{
v5 = (_QWORD *)sub_1000C5060(a1, v16, &v15, &v14, (char *)v4 + 28);
if ( *v5 )
{
v6 = (_QWORD *)v4[1];
if ( v6 )
goto LABEL_10;
}
else
{
v7 = v5;
v8 = (char *)operator new(0x40u);
v9 = *(_OWORD *)((char *)v4 + 44);
*(_OWORD *)(v8 + 28) = *(_OWORD *)((char *)v4 + 28);
*(_OWORD *)(v8 + 44) = v9;
*((_DWORD *)v8 + 15) = *((_DWORD *)v4 + 15);
v10 = v15;
*(_OWORD *)v8 = 0;
*((_QWORD *)v8 + 2) = v10;
*v7 = v8;
v11 = (__int64 *)**a1;
if ( v11 )
*a1 = v11;
sub_100054DD0(a1[1], (__int64 *)v8);
a1[2] = (__int64 *)((char *)a1[2] + 1);
v6 = (_QWORD *)v4[1];
if ( v6 )
{
do
{
LABEL_10:
v12 = v6;
v6 = (_QWORD *)*v6;
}
while ( v6 );
goto LABEL_3;
}
}
do
{
v12 = (_QWORD *)v4[2];
v13 = *v12 == (_QWORD)v4;
v4 = v12;
}
while ( !v13 );
LABEL_3:
v4 = v12;
}
while ( v12 != a3 );
}
}