{"type": "func", "start": 6443151952, "end": 6443152183, "name": "cocos2d::CCTileMapAtlas::initWithTileFile", "pseudocode": "// \n// cocos2d::CCTileMapAtlas::initWithTileFile from 0x1800ab250 to 0x1800ab337 (231 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTileMapAtlas::create @ 0x1800ab1d6\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b804c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n// Hidden C++ exception states: #wind=1\nchar __fastcall cocos2d::CCTileMapAtlas::initWithTileFile(\n        cocos2d::CCTileMapAtlas *this,\n        const char *a2,\n        const char *a3,\n        unsigned int a4,\n        unsigned int a5)\n{\n  cocos2d::CCDictionary *v8; // rax\n  cocos2d::CCTileMapAtlas_vtbl *v9; // rbx\n  float *v10; // rax\n  cocos2d::CCDictionary *v12; // [rsp+40h] [rbp+8h] BYREF\n\n  cocos2d::CCTileMapAtlas::loadTGAfile(this, a3);\n  cocos2d::CCTileMapAtlas::calculateItemsToRender(this);\n  if ( !cocos2d::CCAtlasNode::initWithTileFile(this, a2, a4, a5, this->m_nItemsToRender) )\n    return 0;\n  v8 = (cocos2d::CCDictionary *)operator new(0x48u);\n  v12 = v8;\n  if ( v8 )\n    v8 = cocos2d::CCDictionary::CCDictionary(v8);\n  this->m_pPosToAtlasIndex = v8;\n  ((void (__fastcall *)(cocos2d::CCTileMapAtlas *))this->updateAtlasValues)(this);\n  v9 = this->cocos2d::CCAtlasNode::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v10 = kmVec2Fill(\n          (float *)&v12,\n          (float)(this->m_uItemWidth * this->m_pTGAInfo->width),\n          (float)(this->m_uItemHeight * this->m_pTGAInfo->height));\n  ((void (__fastcall *)(cocos2d::CCTileMapAtlas *, float *))v9->setContentSize)(this, v10);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCTileMapAtlas::initWithTileFile from 0x1800ab250 to 0x1800ab337 (231 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTileMapAtlas::create @ 0x1800ab1d6\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b804c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800ab250\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1800ab255\npush    rdi                                                            ; +0xa, 0x1800ab25a\nsub     rsp, 30h                                                       ; +0xb, 0x1800ab25b\nmov     edi, r9d                                                       ; +0xf, 0x1800ab25f\nmov     rbx, rdx                                                       ; +0x12, 0x1800ab262\nmov     rsi, rcx                                                       ; +0x15, 0x1800ab265\nmov     rdx, r8; char *                                                ; +0x18, 0x1800ab268\ncall    ?loadTGAfile@CCTileMapAtlas@cocos2d@@AEAAXPEBD@Z; cocos2d::CCTileMapAtlas::loadTGAfile(char const *) ; +0x1b, 0x1800ab26b\nmov     rcx, rsi; this                                                 ; +0x20, 0x1800ab270\ncall    ?calculateItemsToRender@CCTileMapAtlas@cocos2d@@AEAAXXZ; cocos2d::CCTileMapAtlas::calculateItemsToRender(void) ; +0x23, 0x1800ab273\nmov     eax, [rsi+1A8h]                                                ; +0x28, 0x1800ab278\nmov     [rsp+38h+var_18], eax; unsigned int                            ; +0x2e, 0x1800ab27e\nmov     r9d, [rsp+38h+arg_20]; unsigned int                            ; +0x32, 0x1800ab282\nmov     r8d, edi; unsigned int                                         ; +0x37, 0x1800ab287\nmov     rdx, rbx; char *                                               ; +0x3a, 0x1800ab28a\nmov     rcx, rsi; this                                                 ; +0x3d, 0x1800ab28d\ncall    ?initWithTileFile@CCAtlasNode@cocos2d@@QEAA_NPEBDIII@Z; cocos2d::CCAtlasNode::initWithTileFile(char const *,uint,uint,uint) ; +0x40, 0x1800ab290\ntest    al, al                                                         ; +0x45, 0x1800ab295\njz      loc_1800AB325                                                  ; +0x47, 0x1800ab297\nmov     ecx, 48h ; 'H'; Size                                           ; +0x4d, 0x1800ab29d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x52, 0x1800ab2a2\nmov     [rsp+38h+arg_0], rax                                           ; +0x57, 0x1800ab2a7\ntest    rax, rax                                                       ; +0x5c, 0x1800ab2ac\njz      short loc_1800AB2BA                                            ; +0x5f, 0x1800ab2af\nmov     rcx, rax; this                                                 ; +0x61, 0x1800ab2b1\ncall    ??0CCDictionary@cocos2d@@QEAA@XZ; cocos2d::CCDictionary::CCDictionary(void) ; +0x64, 0x1800ab2b4\nnop                                                                    ; +0x69, 0x1800ab2b9\nmov     [rsi+1A0h], rax                                                ; +0x6a, 0x1800ab2ba\nmov     rax, [rsi]                                                     ; +0x71, 0x1800ab2c1\nmov     rcx, rsi                                                       ; +0x74, 0x1800ab2c4\ncall    qword ptr [rax+388h]                                           ; +0x77, 0x1800ab2c7\nmov     rbx, [rsi]                                                     ; +0x7d, 0x1800ab2cd\nmov     rcx, [rsi+198h]                                                ; +0x80, 0x1800ab2d0\nmovsx   eax, word ptr [rcx+8]                                          ; +0x87, 0x1800ab2d7\nimul    eax, [rsi+16Ch]                                                ; +0x8b, 0x1800ab2db\nxorps   xmm2, xmm2                                                     ; +0x92, 0x1800ab2e2\ncvtsi2ss xmm2, rax                                                     ; +0x95, 0x1800ab2e5\nmovsx   eax, word ptr [rcx+6]                                          ; +0x9a, 0x1800ab2ea\nimul    eax, [rsi+168h]                                                ; +0x9e, 0x1800ab2ee\nxorps   xmm1, xmm1                                                     ; +0xa5, 0x1800ab2f5\ncvtsi2ss xmm1, rax                                                     ; +0xa8, 0x1800ab2f8\nlea     rcx, [rsp+38h+arg_0]                                           ; +0xad, 0x1800ab2fd\ncall    kmVec2Fill                                                     ; +0xb2, 0x1800ab302\nmov     rdx, rax                                                       ; +0xb7, 0x1800ab307\nmov     rcx, rsi                                                       ; +0xba, 0x1800ab30a\ncall    qword ptr [rbx+128h]                                           ; +0xbd, 0x1800ab30d\nmov     al, 1                                                          ; +0xc3, 0x1800ab313\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xc5, 0x1800ab315\nmov     rsi, [rsp+38h+arg_10]                                          ; +0xca, 0x1800ab31a\nadd     rsp, 30h                                                       ; +0xcf, 0x1800ab31f\npop     rdi                                                            ; +0xd3, 0x1800ab323\nretn                                                                   ; +0xd4, 0x1800ab324\nxor     al, al                                                         ; +0xd5, 0x1800ab325\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xd7, 0x1800ab327\nmov     rsi, [rsp+38h+arg_10]                                          ; +0xdc, 0x1800ab32c\nadd     rsp, 30h                                                       ; +0xe1, 0x1800ab331\npop     rdi                                                            ; +0xe5, 0x1800ab335\nretn                                                                   ; +0xe6, 0x1800ab336", "xrefs": ["cocos2d::CCTileMapAtlas::create @ 0x1800ab1d6", "<???> @ 0x1801438a8", "<???> @ 0x1801b804c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}