//
// cocos2d::tgaLoadImageData from 0x7f7bf8 to 0x7f7c44 (76 bytes)
//
// 1 xrefs:
// > cocos2d::tgaLoad @ 0x7f7dd8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:01:11 +0000
//
int __fastcall cocos2d::tgaLoadImageData(int a1, unsigned int a2, int a3)
{
unsigned int v4; // r6
signed int v5; // r4
signed int v7; // r3
int v8; // r2
int v9; // r1
char v10; // r0
v4 = *(unsigned __int8 *)(a3 + 5) >> 3;
v5 = *(__int16 *)(a3 + 8) * *(__int16 *)(a3 + 6) * v4;
if ( v5 + 18 > a2 )
return 0;
memcpy(*(void **)(a3 + 12), (const void *)(a1 + 18), v5);
if ( v4 > 2 )
{
v7 = 0;
while ( v7 < v5 )
{
v8 = *(_DWORD *)(a3 + 12);
v9 = v7 + 2;
v10 = *(_BYTE *)(v8 + v7);
*(_BYTE *)(v8 + v7) = *(_BYTE *)(v8 + v7 + 2);
v7 += v4;
*(_BYTE *)(*(_DWORD *)(a3 + 12) + v9) = v10;
}
}
return 1;
}