{"type": "func", "start": 6443152464, "end": 6443152763, "name": "cocos2d::CCTileMapAtlas::setTile", "pseudocode": "// \n// cocos2d::CCTileMapAtlas::setTile from 0x1800ab450 to 0x1800ab57b (299 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b8070\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\nvoid __fastcall cocos2d::CCTileMapAtlas::setTile(\n        cocos2d::CCTileMapAtlas *this,\n        const struct cocos2d::_ccColor3B *a2,\n        const struct cocos2d::CCPoint *a3)\n{\n  cocos2d::sImageTGA *m_pTGAInfo; // rax\n  __int64 v7; // rdx\n  __int64 v8; // r8\n  cocos2d::CCString *v9; // rax\n  std::string *CString; // rax\n  __int64 v11; // rbp\n  void *v12; // rcx\n  void *Block[2]; // [rsp+28h] [rbp-40h] BYREF\n  __m128i si128; // [rsp+38h] [rbp-30h]\n\n  m_pTGAInfo = this->m_pTGAInfo;\n  v7 = (unsigned int)(int)(float)((float)((float)m_pTGAInfo->width * a3->y) + a3->x);\n  v8 = (__int64)&m_pTGAInfo->imageData[2 * v7];\n  if ( *(_BYTE *)(v7 + v8) )\n  {\n    *(_WORD *)(v7 + v8) = *(_WORD *)&a2->r;\n    *(_BYTE *)(v7 + v8 + 2) = a2->b;\n    v9 = cocos2d::CCString::createWithFormat(\"%ld,%ld\", (int)a3->x, (int)a3->y);\n    CString = cocos2d::CCString::getCString(v9);\n    sub_180005910(Block, CString);\n    v11 = cocos2d::CCDictionary::objectForKey((__int64)this->m_pPosToAtlasIndex, (unsigned __int8 *)Block);\n    if ( si128.m128i_i64[1] > 0xFuLL )\n    {\n      v12 = Block[0];\n      if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n      {\n        v12 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v12 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free_0(v12);\n    }\n    si128 = _mm_load_si128((const __m128i *)&xmmword_1800E7160);\n    LOBYTE(Block[0]) = 0;\n    cocos2d::CCTileMapAtlas::updateAtlasValueAt(this, a3, a2, *(_DWORD *)(v11 + 56));\n  }\n}", "assembly": "; \n; cocos2d::CCTileMapAtlas::setTile from 0x1800ab450 to 0x1800ab57b (299 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b8070\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, 0x1800ab450\npush    rbp                                                            ; +0x5, 0x1800ab455\npush    rsi                                                            ; +0x6, 0x1800ab456\npush    rdi                                                            ; +0x7, 0x1800ab457\nsub     rsp, 50h                                                       ; +0x8, 0x1800ab458\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x1800ab45c\nxor     rax, rsp                                                       ; +0x13, 0x1800ab463\nmov     [rsp+68h+var_20], rax                                          ; +0x16, 0x1800ab466\nmov     rbx, r8                                                        ; +0x1b, 0x1800ab46b\nmov     rdi, rdx                                                       ; +0x1e, 0x1800ab46e\nmov     rsi, rcx                                                       ; +0x21, 0x1800ab471\nmov     rax, [rcx+198h]                                                ; +0x24, 0x1800ab474\nmov     rcx, [rax+10h]                                                 ; +0x2b, 0x1800ab47b\nmovsx   eax, word ptr [rax+6]                                          ; +0x2f, 0x1800ab47f\nmovd    xmm0, eax                                                      ; +0x33, 0x1800ab483\ncvtdq2ps xmm0, xmm0                                                    ; +0x37, 0x1800ab487\nmulss   xmm0, dword ptr [r8+4]                                         ; +0x3a, 0x1800ab48a\naddss   xmm0, dword ptr [r8]                                           ; +0x40, 0x1800ab490\ncvttss2si rdx, xmm0                                                    ; +0x45, 0x1800ab495\nmov     edx, edx                                                       ; +0x4a, 0x1800ab49a\nlea     r8, [rcx+rdx*2]                                                ; +0x4c, 0x1800ab49c\ncmp     byte ptr [rdx+r8], 0                                           ; +0x50, 0x1800ab4a0\njz      loc_1800AB561                                                  ; +0x55, 0x1800ab4a5\nmovzx   eax, word ptr [rdi]                                            ; +0x5b, 0x1800ab4ab\nmov     [rdx+r8], ax                                                   ; +0x5e, 0x1800ab4ae\nmovzx   eax, byte ptr [rdi+2]                                          ; +0x63, 0x1800ab4b3\nmov     [rdx+r8+2], al                                                 ; +0x67, 0x1800ab4b7\ncvttss2si r8d, dword ptr [rbx+4]                                       ; +0x6c, 0x1800ab4bc\ncvttss2si edx, dword ptr [rbx]                                         ; +0x72, 0x1800ab4c2\nlea     rcx, aLdLd; \"%ld,%ld\"                                          ; +0x76, 0x1800ab4c6\ncall    ?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x7d, 0x1800ab4cd\nmov     rcx, rax; this                                                 ; +0x82, 0x1800ab4d2\ncall    ?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x85, 0x1800ab4d5\nmov     rdx, rax                                                       ; +0x8a, 0x1800ab4da\nlea     rcx, [rsp+68h+Block]                                           ; +0x8d, 0x1800ab4dd\ncall    sub_180005910                                                  ; +0x92, 0x1800ab4e2\nnop                                                                    ; +0x97, 0x1800ab4e7\nlea     rdx, [rsp+68h+Block]                                           ; +0x98, 0x1800ab4e8\nmov     rcx, [rsi+1A0h]                                                ; +0x9d, 0x1800ab4ed\ncall    ?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0xa4, 0x1800ab4f4\nmov     rbp, rax                                                       ; +0xa9, 0x1800ab4f9\nmov     rdx, [rsp+68h+var_28]                                          ; +0xac, 0x1800ab4fc\ncmp     rdx, 0Fh                                                       ; +0xb1, 0x1800ab501\njbe     short loc_1800AB53C                                            ; +0xb5, 0x1800ab505\ninc     rdx                                                            ; +0xb7, 0x1800ab507\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0xba, 0x1800ab50a\nmov     rax, rcx                                                       ; +0xbf, 0x1800ab50f\ncmp     rdx, 1000h                                                     ; +0xc2, 0x1800ab512\njb      short loc_1800AB537                                            ; +0xc9, 0x1800ab519\nadd     rdx, 27h ; '''                                                 ; +0xcb, 0x1800ab51b\nmov     rcx, [rcx-8]                                                   ; +0xcf, 0x1800ab51f\nsub     rax, rcx                                                       ; +0xd3, 0x1800ab523\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xd6, 0x1800ab526\ncmp     rax, 1Fh                                                       ; +0xda, 0x1800ab52a\njbe     short loc_1800AB537                                            ; +0xde, 0x1800ab52e\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xe0, 0x1800ab530\ndb 0CCh                                                                ; +0xe6, 0x1800ab536\ncall    j_j_free_0                                                     ; +0xe7, 0x1800ab537\nmovdqa  xmm0, cs:xmmword_1800E7160                                     ; +0xec, 0x1800ab53c\nmovdqu  xmmword ptr [rsp+38h], xmm0                                    ; +0xf4, 0x1800ab544\nmov     byte ptr [rsp+68h+Block], 0                                    ; +0xfa, 0x1800ab54a\nmov     r9d, [rbp+38h]; unsigned int                                   ; +0xff, 0x1800ab54f\nmov     r8, rdi; struct cocos2d::_ccColor3B *                          ; +0x103, 0x1800ab553\nmov     rdx, rbx; struct cocos2d::CCPoint *                            ; +0x106, 0x1800ab556\nmov     rcx, rsi; this                                                 ; +0x109, 0x1800ab559\ncall    ?updateAtlasValueAt@CCTileMapAtlas@cocos2d@@AEAAXAEBVCCPoint@2@AEBU_ccColor3B@2@I@Z; cocos2d::CCTileMapAtlas::updateAtlasValueAt(cocos2d::CCPoint const &,cocos2d::_ccColor3B const &,uint) ; +0x10c, 0x1800ab55c\nmov     rcx, [rsp+68h+var_20]                                          ; +0x111, 0x1800ab561\nxor     rcx, rsp; StackCookie                                          ; +0x116, 0x1800ab566\ncall    __security_check_cookie                                        ; +0x119, 0x1800ab569\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x11e, 0x1800ab56e\nadd     rsp, 50h                                                       ; +0x123, 0x1800ab573\npop     rdi                                                            ; +0x127, 0x1800ab577\npop     rsi                                                            ; +0x128, 0x1800ab578\npop     rbp                                                            ; +0x129, 0x1800ab579\nretn                                                                   ; +0x12a, 0x1800ab57a", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b8070"], "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"}