//
// cocos2d::ZipUtils::hexToChar from 0x100206250 to 0x100206364 (276 bytes)
//
// 1 xrefs:
// > cocos2d::ZipUtils::urlDecode @ 0x100205fdd
//
// 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 cocos2d::ZipUtils::hexToChar(unsigned __int8 *a1)
{
unsigned int v1; // eax
__int64 result; // rax
_QWORD v3[2]; // [rsp+0h] [rbp-120h] BYREF
void (__cdecl **v4)(std::streambuf *__hidden); // [rsp+10h] [rbp-110h]
std::locale v5; // [rsp+18h] [rbp-108h] BYREF
char v6; // [rsp+50h] [rbp-D0h]
void *__p; // [rsp+60h] [rbp-C0h]
__int64 (__fastcall **v8)(); // [rsp+78h] [rbp-A8h] BYREF
_WORD v9[5]; // [rsp+116h] [rbp-Ah] BYREF
v9[0] = 0;
v1 = *a1;
if ( (v1 & 1) == 0 )
{
if ( v1 >> 1 )
goto LABEL_3;
LABEL_7:
LOBYTE(result) = 0;
return (unsigned __int8)result;
}
if ( !*((_QWORD *)a1 + 1) )
goto LABEL_7;
LABEL_3:
sub_100206400(v3, a1, 8);
*(_DWORD *)((char *)&v3[1] + *(_QWORD *)(v3[0] - 24LL)) = *(_DWORD *)((_BYTE *)&v3[1] + *(_QWORD *)(v3[0] - 24LL))
& 0xFFFFFFB5
| 8;
std::istream::operator>>(v3, v9);
v3[0] = &off_1008DC000;
v8 = off_1008DC028;
v4 = (void (__cdecl **)(std::streambuf *__hidden))&off_1008C3F58;
if ( (v6 & 1) != 0 )
operator delete(__p);
v4 = &`vtable for'std::streambuf.~basic_streambuf;
std::locale::~locale(&v5);
std::istream::~istream(v3, off_1008DC040);
std::ios::~ios(&v8);
LOBYTE(result) = v9[0];
return (unsigned __int8)result;
}