//
// cocos2d::CCTMXTiledMap::objectGroupNamed from 0x1800b1bc0 to 0x1800b1d07 (327 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c2664
//
// 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 11:22:19 +0000
//
// Hidden C++ exception states: #wind=1
struct cocos2d::CCTMXObjectGroup *__fastcall cocos2d::CCTMXTiledMap::objectGroupNamed(
cocos2d::CCTMXTiledMap *this,
char *a2)
{
cocos2d::CCArray *v3; // rcx
void *v4; // r13
void **v5; // r15
__int64 v6; // rax
unsigned int *v7; // rbx
__int64 v8; // rax
__int64 *v9; // rbx
__int64 *v10; // r14
void *v11; // rbp
__int64 v12; // rdi
const char *v13; // rsi
size_t v14; // rax
void **v15; // rcx
void **v16; // rax
void *Buf1[4]; // [rsp+30h] [rbp-58h] BYREF
sub_180005A10(Buf1, a2);
v3 = *((cocos2d::CCArray **)this + 43);
v4 = Buf1[3];
v5 = (void **)Buf1[0];
if ( v3 )
{
if ( (unsigned int)cocos2d::CCArray::count(v3) )
{
v6 = *((_QWORD *)this + 43);
if ( v6 )
{
v7 = *(unsigned int **)(v6 + 56);
v8 = *v7;
if ( (_DWORD)v8 )
{
v9 = *((__int64 **)v7 + 2);
v10 = &v9[v8 - 1];
if ( v9 <= v10 )
{
v11 = Buf1[2];
do
{
v12 = *v9;
if ( !*v9 )
break;
v13 = (const char *)(v12 + 80);
if ( *(_QWORD *)(v12 + 104) > 0xFu )
v13 = *(const char **)v13;
v14 = strlen(v13);
v15 = Buf1;
if ( (unsigned __int64)v4 > 0xF )
v15 = v5;
if ( v11 == (void *)v14 && (!v11 || !memcmp(v15, v13, (size_t)v11)) )
goto LABEL_17;
++v9;
}
while ( v9 <= v10 );
}
}
}
}
}
v12 = 0;
LABEL_17:
if ( (unsigned __int64)v4 > 0xF )
{
v16 = v5;
if ( (unsigned __int64)v4 + 1 >= 0x1000 )
{
v5 = (void **)*(v5 - 1);
if ( (unsigned __int64)((char *)v16 - (char *)v5 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v5);
}
return (struct cocos2d::CCTMXObjectGroup *)v12;
}