{"type": "func", "start": 6443166832, "end": 6443167152, "name": "cocos2d::CCTileMapAtlas::setTile", "pseudocode": "// \n// cocos2d::CCTileMapAtlas::setTile from 0x1800aec70 to 0x1800aedb0 (320 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c2334\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:22:18 +0000\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  __int64 v6; // r8\n  __int64 v7; // rdx\n  __int64 v8; // rcx\n  cocos2d::CCString *v9; // rax\n  char *CString; // rax\n  __int64 v11; // rbp\n  void *v12; // r8\n  void *Block[2]; // [rsp+38h] [rbp-40h] BYREF\n  __m128i si128; // [rsp+48h] [rbp-30h]\n\n  v6 = *((_QWORD *)this + 51);\n  v7 = 3LL * (unsigned int)(int)(float)((float)((float)*(__int16 *)(v6 + 6) * *((float *)a3 + 1)) + *(float *)a3);\n  v8 = *(_QWORD *)(v6 + 16);\n  if ( *(_BYTE *)(v7 + v8) )\n  {\n    *(_WORD *)(v7 + v8) = *(_WORD *)a2;\n    *(_BYTE *)(v7 + v8 + 2) = *((_BYTE *)a2 + 2);\n    v9 = cocos2d::CCString::createWithFormat(\"%ld,%ld\", (int)*(float *)a3, (int)*((float *)a3 + 1));\n    CString = (char *)cocos2d::CCString::getCString(v9);\n    sub_180005A10(Block, CString);\n    v11 = cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 52), (__int64)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          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free_0(v12);\n    }\n    si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);\n    LOBYTE(Block[0]) = 0;\n    cocos2d::CCTileMapAtlas::updateAtlasValueAt(this, a3, a2, *(_DWORD *)(v11 + 56));\n  }\n}", "assembly": "; \n; cocos2d::CCTileMapAtlas::setTile from 0x1800aec70 to 0x1800aedb0 (320 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c2334\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:22:18 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800aec70\npush    rbp                                                            ; +0x5, 0x1800aec75\npush    rsi                                                            ; +0x6, 0x1800aec76\npush    rdi                                                            ; +0x7, 0x1800aec77\nsub     rsp, 60h                                                       ; +0x8, 0x1800aec78\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x1800aec7c\nxor     rax, rsp                                                       ; +0x13, 0x1800aec83\nmov     [rsp+78h+var_20], rax                                          ; +0x16, 0x1800aec86\nmov     rbx, r8                                                        ; +0x1b, 0x1800aec8b\nmov     rdi, rdx                                                       ; +0x1e, 0x1800aec8e\nmov     rsi, rcx                                                       ; +0x21, 0x1800aec91\nmov     r8, [rcx+198h]                                                 ; +0x24, 0x1800aec94\nmovsx   eax, word ptr [r8+6]                                           ; +0x2b, 0x1800aec9b\nmovd    xmm0, eax                                                      ; +0x30, 0x1800aeca0\ncvtdq2ps xmm0, xmm0                                                    ; +0x34, 0x1800aeca4\nmulss   xmm0, dword ptr [rbx+4]                                        ; +0x37, 0x1800aeca7\naddss   xmm0, dword ptr [rbx]                                          ; +0x3c, 0x1800aecac\ncvttss2si rcx, xmm0                                                    ; +0x40, 0x1800aecb0\nmov     ecx, ecx                                                       ; +0x45, 0x1800aecb5\nlea     rdx, [rcx+rcx*2]                                               ; +0x47, 0x1800aecb7\nmov     rcx, [r8+10h]                                                  ; +0x4b, 0x1800aecbb\ncmp     byte ptr [rdx+rcx], 0                                          ; +0x4f, 0x1800aecbf\njz      loc_1800AED93                                                  ; +0x53, 0x1800aecc3\nmovzx   eax, word ptr [rdi]                                            ; +0x59, 0x1800aecc9\nmov     [rdx+rcx], ax                                                  ; +0x5c, 0x1800aeccc\nmovzx   eax, byte ptr [rdi+2]                                          ; +0x60, 0x1800aecd0\nmov     [rdx+rcx+2], al                                                ; +0x64, 0x1800aecd4\ncvttss2si r8d, dword ptr [rbx+4]                                       ; +0x68, 0x1800aecd8\ncvttss2si edx, dword ptr [rbx]                                         ; +0x6e, 0x1800aecde\nlea     rcx, aLdLd; \"%ld,%ld\"                                          ; +0x72, 0x1800aece2\ncall    ?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x79, 0x1800aece9\nmov     rcx, rax; this                                                 ; +0x7e, 0x1800aecee\ncall    ?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x81, 0x1800aecf1\nmov     rdx, rax; Str                                                  ; +0x86, 0x1800aecf6\nlea     rcx, [rsp+78h+Block]; void *                                   ; +0x89, 0x1800aecf9\ncall    sub_180005A10                                                  ; +0x8e, 0x1800aecfe\nnop                                                                    ; +0x93, 0x1800aed03\nlea     rdx, [rsp+78h+Block]                                           ; +0x94, 0x1800aed04\nmov     rcx, [rsi+1A0h]                                                ; +0x99, 0x1800aed09\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 &) ; +0xa0, 0x1800aed10\nmov     rbp, rax                                                       ; +0xa5, 0x1800aed15\nmov     rdx, [rsp+78h+var_28]                                          ; +0xa8, 0x1800aed18\ncmp     rdx, 0Fh                                                       ; +0xad, 0x1800aed1d\njbe     short loc_1800AED6E                                            ; +0xb1, 0x1800aed21\ninc     rdx                                                            ; +0xb3, 0x1800aed23\nmov     r8, [rsp+78h+Block]                                            ; +0xb6, 0x1800aed26\nmov     rcx, r8                                                        ; +0xbb, 0x1800aed2b\ncmp     rdx, 1000h                                                     ; +0xbe, 0x1800aed2e\njb      short loc_1800AED66                                            ; +0xc5, 0x1800aed35\nadd     rdx, 27h ; '''                                                 ; +0xc7, 0x1800aed37\nmov     r8, [r8-8]                                                     ; +0xcb, 0x1800aed3b\nsub     rcx, r8                                                        ; +0xcf, 0x1800aed3f\nsub     rcx, 8                                                         ; +0xd2, 0x1800aed42\ncmp     rcx, 1Fh                                                       ; +0xd6, 0x1800aed46\njbe     short loc_1800AED66                                            ; +0xda, 0x1800aed4a\nmov     [rsp+78h+Reserved], 0; Reserved                                ; +0xdc, 0x1800aed4c\nxor     r9d, r9d; LineNo                                               ; +0xe5, 0x1800aed55\nxor     r8d, r8d; FileName                                             ; +0xe8, 0x1800aed58\nxor     edx, edx; FunctionName                                         ; +0xeb, 0x1800aed5b\nxor     ecx, ecx; Expression                                           ; +0xed, 0x1800aed5d\ncall    cs:_invoke_watson                                              ; +0xef, 0x1800aed5f\nalign 2                                                                ; +0xf5, 0x1800aed65\nmov     rcx, r8; Block                                                 ; +0xf6, 0x1800aed66\ncall    j_j_free_0                                                     ; +0xf9, 0x1800aed69\nmovdqa  xmm0, cs:xmmword_1800EC500                                     ; +0xfe, 0x1800aed6e\nmovdqu  xmmword ptr [rsp+48h], xmm0                                    ; +0x106, 0x1800aed76\nmov     byte ptr [rsp+78h+Block], 0                                    ; +0x10c, 0x1800aed7c\nmov     r9d, [rbp+38h]; unsigned int                                   ; +0x111, 0x1800aed81\nmov     r8, rdi; struct cocos2d::_ccColor3B *                          ; +0x115, 0x1800aed85\nmov     rdx, rbx; struct cocos2d::CCPoint *                            ; +0x118, 0x1800aed88\nmov     rcx, rsi; this                                                 ; +0x11b, 0x1800aed8b\ncall    ?updateAtlasValueAt@CCTileMapAtlas@cocos2d@@AEAAXAEBVCCPoint@2@AEBU_ccColor3B@2@I@Z; cocos2d::CCTileMapAtlas::updateAtlasValueAt(cocos2d::CCPoint const &,cocos2d::_ccColor3B const &,uint) ; +0x11e, 0x1800aed8e\nmov     rcx, [rsp+78h+var_20]                                          ; +0x123, 0x1800aed93\nxor     rcx, rsp; StackCookie                                          ; +0x128, 0x1800aed98\ncall    __security_check_cookie                                        ; +0x12b, 0x1800aed9b\nmov     rbx, [rsp+78h+arg_8]                                           ; +0x130, 0x1800aeda0\nadd     rsp, 60h                                                       ; +0x138, 0x1800aeda8\npop     rdi                                                            ; +0x13c, 0x1800aedac\npop     rsi                                                            ; +0x13d, 0x1800aedad\npop     rbp                                                            ; +0x13e, 0x1800aedae\nretn                                                                   ; +0x13f, 0x1800aedaf", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801c2334"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}