//
// sub_100644580 from 0x100644580 to 0x100644663 (227 bytes)
//
// 0 xrefs:
//
// 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
//
__int64 __fastcall sub_100644580(__int64 a1, const char *a2, __int64 a3)
{
unsigned int v3; // ebx
__int64 v5; // rax
char *v6; // r12
char *v7; // r13
size_t v8; // r14
__int64 v9; // rdi
_OWORD *v10; // r15
__int64 v12; // r13
_OWORD *v13; // rax
__int64 v14; // rdi
__int64 v15; // [rsp+0h] [rbp-30h]
v5 = sub_100644280(a1, a2, 1);
if ( v5 && *(_DWORD *)v5 == 1 )
{
LOBYTE(v3) = 1;
if ( v5 + 16 != a3 )
{
*(_DWORD *)(v5 + 16) = *(_DWORD *)a3;
v6 = *(char **)(a3 + 24);
v7 = *(char **)(a3 + 32);
if ( v6 > v7 )
sub_1007CD7D0(a1);
v8 = v7 - v6;
if ( (unsigned __int64)(v7 - v6) <= 0x10 )
{
v9 = *(_QWORD *)(v5 + 40);
v10 = (_OWORD *)(v5 + 24);
if ( v9 != v5 + 24 )
{
v15 = v5;
off_10099E668(v9);
v5 = v15;
}
if ( v6 != v7 )
*v10 = *(_OWORD *)v6;
LABEL_15:
*(_QWORD *)(v5 + 40) = v10;
*(_QWORD *)(v5 + 48) = (char *)v10 + v8;
return v3;
}
v12 = v5;
v13 = (_OWORD *)off_10099E670();
if ( v13 )
{
v10 = v13;
memcpy(v13, v6, v8);
v5 = v12;
v14 = *(_QWORD *)(v12 + 40);
if ( v14 != v12 + 24 )
{
off_10099E668(v14);
v5 = v12;
}
goto LABEL_15;
}
}
}
else
{
return 0;
}
return v3;
}