//
// sub_100587120 from 0x100587120 to 0x1005871b1 (145 bytes)
//
// 1 xrefs:
// > sub_1008CD740 @ 0x1008cd930
//
// 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 12:32:22 +0000
//
std::string::pointer __fastcall sub_100587120(__int64 a1)
{
unsigned int v1; // eax
std::string::pointer result; // rax
unsigned int v3; // eax
std::string v4; // [rsp-30h] [rbp-30h] BYREF
v1 = *(unsigned __int8 *)(a1 + 1688);
if ( (v1 & 1) != 0 )
{
result = *(std::string::pointer *)(a1 + 1696);
if ( !result )
return result;
}
else
{
result = (std::string::pointer)(v1 >> 1);
if ( !result )
return result;
}
v3 = *(unsigned __int8 *)(a1 + 1664);
if ( (v3 & 1) != 0 )
{
result = *(std::string::pointer *)(a1 + 1672);
if ( result )
return result;
}
else
{
result = (std::string::pointer)(v3 >> 1);
if ( result )
return result;
}
cocos2d::ZipUtils::decompressString(&v4, (char *)(a1 + 1688), 0, 0);
if ( (*(_BYTE *)(a1 + 1664) & 1) != 0 )
operator delete(*(void **)(a1 + 1680));
result = v4.__r_.__value_.__l.__data_;
*(std::string *)(a1 + 1664) = v4;
return result;
}