//
// sub_776110 from 0x776110 to 0x776150 (64 bytes)
//
// 3 xrefs:
// > cocos2d::CCDictMaker::textHandler @ 0x5df030
// > cocos2d::CCTMXMapInfo::textHandler @ 0x5f8a22
// > sub_776158 @ 0x776166
//
// 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
//
void **__fastcall sub_776110(void **a1, int *a2, unsigned int a3, unsigned int a4)
{
int v4; // r1
unsigned int v6; // r0
unsigned int v8; // r2
_BYTE *v9; // r0
unsigned int v10; // r4
v4 = *a2;
v6 = *(_DWORD *)(v4 - 12);
if ( a3 > v6 )
sub_7732C4(
"%s: __pos (which is %zu) > this->size() (which is %zu)",
"basic_string::basic_string",
a3,
*(_DWORD *)(v4 - 12));
v8 = v6 - a3;
v9 = (_BYTE *)(v4 + a3);
if ( v8 > a4 )
v10 = a3 + a4;
else
v10 = a3 + v8;
*a1 = sub_776040(v9, (_BYTE *)(v4 + v10));
return a1;
}