//
// cocos2d::CCTMXTiledMap::layerNamed from 0x1800b1b00 to 0x1800b1bbc (188 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c2658
//
// 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
//
struct cocos2d::CCTMXLayer *__fastcall cocos2d::CCTMXTiledMap::layerNamed(cocos2d::CCTMXTiledMap *this, const char *a2)
{
__int64 v2; // rax
unsigned int *v4; // rbx
__int64 v5; // rax
_QWORD *v6; // rbx
_QWORD *v7; // rsi
__int64 v8; // rax
__int64 v9; // rdi
const char *v10; // rcx
v2 = *((_QWORD *)this + 26);
if ( v2 )
{
v4 = *(unsigned int **)(v2 + 56);
v5 = *v4;
if ( (_DWORD)v5 )
{
v6 = *((_QWORD **)v4 + 2);
v7 = &v6[v5 - 1];
if ( v6 <= v7 )
{
while ( *v6 )
{
v8 = _RTDynamicCast(
*v6,
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&cocos2d::CCTMXLayer `RTTI Type Descriptor',
0);
v9 = v8;
if ( v8 )
{
v10 = (const char *)(v8 + 408);
if ( *(_QWORD *)(v8 + 432) > 0xFu )
v10 = *(const char **)v10;
if ( !strcmp(v10, a2) )
return (struct cocos2d::CCTMXLayer *)v9;
}
if ( ++v6 > v7 )
return nullptr;
}
}
}
}
return nullptr;
}