//
// sub_1004C6F08 from 0x1004c6f08 to 0x1004c6f40 (56 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_1004C6F08(__int64 result, __int64 a2, int a3)
{
__int64 v3; // x8
__int64 v5; // x9
int v6; // w11
if ( a3 )
{
v3 = result - 1;
while ( *(_BYTE *)++v3 )
;
v5 = 0;
while ( 1 )
{
v6 = *(unsigned __int8 *)(a2 + v5);
*(_BYTE *)(v3 + v5) = v6;
if ( !v6 )
break;
if ( a3 == (_DWORD)++v5 )
{
*(_BYTE *)(v3 + v5) = 0;
return result;
}
}
}
return result;
}