//
// sub_18007F7A0 from 0x18007f7a0 to 0x18007f83c (156 bytes)
//
// 2 xrefs:
// > cocos2d::CCImage::_initWithTiffData @ 0x18007ebed
// > ??> @ 0x1801bf0e8
//
// 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 11:22:01 +0000
//
__int64 __fastcall sub_18007F7A0(__int64 a1, char *a2, unsigned __int64 a3)
{
__int64 v3; // r14
unsigned __int64 v4; // rsi
int v7; // ecx
unsigned int v8; // ebx
v3 = 0;
v4 = a3;
if ( !a3 )
return v3;
v7 = *(_DWORD *)(a1 + 12);
while ( 1 )
{
v8 = 0x80000000;
if ( v4 < 0x80000000 )
v8 = v4;
if ( (signed int)(v7 + v8) > *(_DWORD *)(a1 + 8) )
break;
memcpy(a2, (const void *)(*(_QWORD *)a1 + v7), v8);
*(_DWORD *)(a1 + 12) += v8;
a2 += v8;
v7 = *(_DWORD *)(a1 + 12);
v3 += v8;
v4 -= v8;
if ( !v4 )
return v3;
}
return 0;
}