//
// sub_746098 from 0x746098 to 0x7461a8 (272 bytes)
//
// 1 xrefs:
// > cocos2d::ZipUtils::hexToChar @ 0x5efbee
//
// 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
//
int *__fastcall sub_746098(int *a1, _WORD *a2)
{
_BYTE *v4; // r0
int v5; // r3
char *v6; // r3
int *v7; // r2
int v8; // r6
int v9; // r7
int v10; // r3
char v12[4]; // [sp+1Ch] [bp-28h] BYREF
int v13; // [sp+20h] [bp-24h] BYREF
int v14; // [sp+24h] [bp-20h] BYREF
char v15[8]; // [sp+28h] [bp-1Ch] BYREF
int v16; // [sp+30h] [bp-14h]
int v17; // [sp+34h] [bp-10h]
int v18; // [sp+38h] [bp-Ch]
int v19; // [sp+3Ch] [bp-8h]
v4 = sub_745FB8(v12, a1, 0);
if ( !v12[0] )
return a1;
v5 = *a1;
v13 = 0;
v6 = (char *)a1 + *(_DWORD *)(v5 - 12);
v7 = *((int **)v6 + 33);
if ( !v7 )
sub_772FE4(v4);
v18 = 0;
v8 = *((_DWORD *)v6 + 30);
v9 = *v7;
v19 = -1;
v16 = v8;
v17 = -1;
(*(void (__fastcall **)(char *, int *, int, int, _DWORD, int, char *, int *, int *))(v9 + 12))(
v15,
v7,
v8,
-1,
0,
-1,
v6,
&v13,
&v14);
v10 = v13;
if ( v14 >= -32768 )
{
if ( v14 >= 0x8000 )
{
v10 = v13 | 4;
v13 |= 4u;
*a2 = 0x7FFF;
}
else
{
*a2 = v14;
}
if ( v10 )
goto LABEL_10;
return a1;
}
v10 = v13 | 4;
*a2 = 0x8000;
v13 = v10;
LABEL_10:
sub_7446A4((int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | v10);
return a1;
}