{"type": "func", "start": 6443152848, "end": 6443153589, "name": "cocos2d::CCTileMapAtlas::updateAtlasValueAt", "pseudocode": "// \n// cocos2d::CCTileMapAtlas::updateAtlasValueAt from 0x1800ab5d0 to 0x1800ab8b5 (741 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCTileMapAtlas::setTile @ 0x1800ab55c\n// > cocos2d::CCTileMapAtlas::updateAtlasValues @ 0x1800ab993\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b807c\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\nvoid __fastcall cocos2d::CCTileMapAtlas::updateAtlasValueAt(\n        cocos2d::CCTileMapAtlas *this,\n        const struct cocos2d::CCPoint *a2,\n        const struct cocos2d::_ccColor3B *a3,\n        unsigned int a4)\n{\n  __int64 v7; // r15\n  __int64 v8; // rax\n  int x; // esi\n  __int64 v10; // r14\n  int y; // ebp\n  __int64 v12; // rax\n  float v13; // xmm6_4\n  __int64 v14; // rax\n  float v15; // xmm7_4\n  cocos2d::CCDirector *v16; // rax\n  float v17; // xmm8_4\n  cocos2d::CCDirector *v18; // rax\n  float v19; // xmm2_4\n  float v20; // xmm1_4\n  float v21; // xmm0_4\n  float v22; // xmm8_4\n  float v23; // xmm2_4\n  signed int v24; // eax\n  signed int v25; // eax\n  signed int v26; // eax\n  signed int v27; // ecx\n  unsigned int v28; // eax\n  int v29; // [rsp+98h] [rbp+20h]\n\n  v7 = a4;\n  ((void (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getCapacity)(this->m_pTextureAtlas);\n  v8 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getQuads)(this->m_pTextureAtlas);\n  x = (int)a2->x;\n  v10 = v8 + 96 * v7;\n  y = (int)a2->y;\n  LODWORD(a2) = a3->r;\n  LODWORD(a3) = this->m_uItemsPerRow;\n  v12 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getTexture)(this->m_pTextureAtlas);\n  v13 = (float)(*(int (__fastcall **)(__int64))(*(_QWORD *)v12 + 80LL))(v12);\n  v14 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getTexture)(this->m_pTextureAtlas);\n  v15 = (float)(*(int (__fastcall **)(__int64))(*(_QWORD *)v14 + 88LL))(v14);\n  v16 = cocos2d::CCDirector::sharedDirector();\n  v17 = cocos2d::CCDirector::getContentScaleFactor(v16) * (float)(int)this->m_uItemWidth;\n  v18 = cocos2d::CCDirector::sharedDirector();\n  v19 = cocos2d::CCDirector::getContentScaleFactor(v18) * (float)(int)this->m_uItemHeight;\n  v20 = (float)((float)(int)((unsigned int)a2 % (unsigned int)a3) * v17) / v13;\n  v21 = (float)((float)(int)((unsigned int)a2 / (unsigned int)a3) * v19) / v15;\n  v22 = (float)(v17 / v13) + v20;\n  *(float *)(v10 + 16) = v20;\n  v23 = (float)(v19 / v15) + v21;\n  *(float *)(v10 + 20) = v21;\n  *(float *)(v10 + 68) = v21;\n  *(float *)(v10 + 40) = v20;\n  *(float *)(v10 + 64) = v22;\n  *(float *)(v10 + 44) = v23;\n  *(float *)(v10 + 92) = v23;\n  *(float *)(v10 + 88) = v22;\n  *(float *)(v10 + 24) = (float)(this->m_uItemWidth * x);\n  v24 = this->m_uItemHeight * y;\n  *(_DWORD *)(v10 + 32) = 0;\n  *(float *)(v10 + 28) = (float)v24;\n  *(float *)(v10 + 72) = (float)(this->m_uItemWidth * (x + 1));\n  v25 = this->m_uItemHeight * y;\n  *(_DWORD *)(v10 + 80) = 0;\n  *(float *)(v10 + 76) = (float)v25;\n  *(float *)v10 = (float)(this->m_uItemWidth * x);\n  v26 = this->m_uItemHeight * (y + 1);\n  *(_DWORD *)(v10 + 8) = 0;\n  *(float *)(v10 + 4) = (float)v26;\n  *(float *)(v10 + 48) = (float)(this->m_uItemWidth * (x + 1));\n  v27 = this->m_uItemHeight * (y + 1);\n  *(_DWORD *)(v10 + 56) = 0;\n  *(float *)(v10 + 52) = (float)v27;\n  *(cocos2d::ccColor3B *)&v29 = this->_displayedColor;\n  HIBYTE(v29) = this->_displayedOpacity;\n  *(_DWORD *)(v10 + 60) = v29;\n  *(_DWORD *)(v10 + 12) = v29;\n  *(_DWORD *)(v10 + 84) = v29;\n  *(_DWORD *)(v10 + 36) = v29;\n  this->m_pTextureAtlas->m_bDirty = 1;\n  v28 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getTotalQuads)(this->m_pTextureAtlas);\n  if ( (int)v7 + 1 > v28 )\n    cocos2d::CCTextureAtlas::increaseTotalQuadsWith(this->m_pTextureAtlas, v7 - v28 + 1);\n}", "assembly": "; \n; cocos2d::CCTileMapAtlas::updateAtlasValueAt from 0x1800ab5d0 to 0x1800ab8b5 (741 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCTileMapAtlas::setTile @ 0x1800ab55c\n; > cocos2d::CCTileMapAtlas::updateAtlasValues @ 0x1800ab993\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b807c\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_0], rbx                                               ; +0x0, 0x1800ab5d0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800ab5d5\npush    rsi                                                            ; +0xa, 0x1800ab5da\npush    rdi                                                            ; +0xb, 0x1800ab5db\npush    r13                                                            ; +0xc, 0x1800ab5dc\npush    r14                                                            ; +0xe, 0x1800ab5de\npush    r15                                                            ; +0x10, 0x1800ab5e0\nsub     rsp, 50h                                                       ; +0x12, 0x1800ab5e2\nmovaps  [rsp+78h+var_38], xmm6                                         ; +0x16, 0x1800ab5e6\nmov     r13, rcx                                                       ; +0x1b, 0x1800ab5eb\nmov     rcx, [rcx+178h]                                                ; +0x1e, 0x1800ab5ee\nmov     rdi, r8                                                        ; +0x25, 0x1800ab5f5\nmovaps  [rsp+78h+var_48], xmm7                                         ; +0x28, 0x1800ab5f8\nmov     rbx, rdx                                                       ; +0x2d, 0x1800ab5fd\nmovaps  [rsp+78h+var_58], xmm8                                         ; +0x30, 0x1800ab600\nmov     r15d, r9d                                                      ; +0x36, 0x1800ab606\nmov     rax, [rcx]                                                     ; +0x39, 0x1800ab609\ncall    qword ptr [rax+50h]                                            ; +0x3c, 0x1800ab60c\nmov     rcx, [r13+178h]                                                ; +0x3f, 0x1800ab60f\nmov     rax, [rcx]                                                     ; +0x46, 0x1800ab616\ncall    qword ptr [rax+68h]                                            ; +0x49, 0x1800ab619\nmov     rcx, [r13+178h]                                                ; +0x4c, 0x1800ab61c\nlea     r14, [r15+r15*2]                                               ; +0x53, 0x1800ab623\ncvttss2si esi, dword ptr [rbx]                                         ; +0x57, 0x1800ab627\nshl     r14, 5                                                         ; +0x5b, 0x1800ab62b\nadd     r14, rax                                                       ; +0x5f, 0x1800ab62f\nmov     rdx, [rcx]                                                     ; +0x62, 0x1800ab632\ncvttss2si ebp, dword ptr [rbx+4]                                       ; +0x65, 0x1800ab635\nmovzx   ebx, byte ptr [rdi]                                            ; +0x6a, 0x1800ab63a\nmov     edi, [r13+160h]                                                ; +0x6d, 0x1800ab63d\ncall    qword ptr [rdx+58h]                                            ; +0x74, 0x1800ab644\nmov     rcx, rax                                                       ; +0x77, 0x1800ab647\nmov     rdx, [rax]                                                     ; +0x7a, 0x1800ab64a\ncall    qword ptr [rdx+50h]                                            ; +0x7d, 0x1800ab64d\nmov     rcx, [r13+178h]                                                ; +0x80, 0x1800ab650\nxorps   xmm6, xmm6                                                     ; +0x87, 0x1800ab657\nmov     eax, eax                                                       ; +0x8a, 0x1800ab65a\ncvtsi2ss xmm6, rax                                                     ; +0x8c, 0x1800ab65c\nmov     rax, [rcx]                                                     ; +0x91, 0x1800ab661\ncall    qword ptr [rax+58h]                                            ; +0x94, 0x1800ab664\nmov     rcx, rax                                                       ; +0x97, 0x1800ab667\nmov     rdx, [rax]                                                     ; +0x9a, 0x1800ab66a\ncall    qword ptr [rdx+58h]                                            ; +0x9d, 0x1800ab66d\nmov     eax, eax                                                       ; +0xa0, 0x1800ab670\nxorps   xmm7, xmm7                                                     ; +0xa2, 0x1800ab672\ncvtsi2ss xmm7, rax                                                     ; +0xa5, 0x1800ab675\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xaa, 0x1800ab67a\nmov     rcx, rax; this                                                 ; +0xaf, 0x1800ab67f\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0xb2, 0x1800ab682\nmov     eax, [r13+168h]                                                ; +0xb7, 0x1800ab687\nxorps   xmm1, xmm1                                                     ; +0xbe, 0x1800ab68e\nmovaps  xmm8, xmm0                                                     ; +0xc1, 0x1800ab691\ncvtsi2ss xmm1, rax                                                     ; +0xc5, 0x1800ab695\nmulss   xmm8, xmm1                                                     ; +0xca, 0x1800ab69a\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xcf, 0x1800ab69f\nmov     rcx, rax; this                                                 ; +0xd4, 0x1800ab6a4\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0xd7, 0x1800ab6a7\nmov     eax, [r13+16Ch]                                                ; +0xdc, 0x1800ab6ac\nxorps   xmm1, xmm1                                                     ; +0xe3, 0x1800ab6b3\nmovaps  xmm2, xmm0                                                     ; +0xe6, 0x1800ab6b6\nxor     edx, edx                                                       ; +0xe9, 0x1800ab6b9\nxorps   xmm0, xmm0                                                     ; +0xeb, 0x1800ab6bb\ncvtsi2ss xmm1, rax                                                     ; +0xee, 0x1800ab6be\nmov     eax, ebx                                                       ; +0xf3, 0x1800ab6c3\ndiv     edi                                                            ; +0xf5, 0x1800ab6c5\nmulss   xmm2, xmm1                                                     ; +0xf7, 0x1800ab6c7\nxorps   xmm1, xmm1                                                     ; +0xfb, 0x1800ab6cb\nmov     ecx, edx                                                       ; +0xfe, 0x1800ab6ce\nmov     edx, eax                                                       ; +0x100, 0x1800ab6d0\nmov     eax, esi                                                       ; +0x102, 0x1800ab6d2\ncvtsi2ss xmm1, rcx                                                     ; +0x104, 0x1800ab6d4\ncvtsi2ss xmm0, rdx                                                     ; +0x109, 0x1800ab6d9\nmulss   xmm1, xmm8                                                     ; +0x10e, 0x1800ab6de\nmulss   xmm0, xmm2                                                     ; +0x113, 0x1800ab6e3\ndivss   xmm1, xmm6                                                     ; +0x117, 0x1800ab6e7\ndivss   xmm0, xmm7                                                     ; +0x11b, 0x1800ab6eb\ndivss   xmm8, xmm6                                                     ; +0x11f, 0x1800ab6ef\ndivss   xmm2, xmm7                                                     ; +0x124, 0x1800ab6f4\naddss   xmm8, xmm1                                                     ; +0x128, 0x1800ab6f8\nmovss   dword ptr [r14+10h], xmm1                                      ; +0x12d, 0x1800ab6fd\naddss   xmm2, xmm0                                                     ; +0x133, 0x1800ab703\nmovss   dword ptr [r14+14h], xmm0                                      ; +0x137, 0x1800ab707\nmovss   dword ptr [r14+44h], xmm0                                      ; +0x13d, 0x1800ab70d\nmovss   dword ptr [r14+28h], xmm1                                      ; +0x143, 0x1800ab713\nmovss   dword ptr [r14+40h], xmm8                                      ; +0x149, 0x1800ab719\nmovss   dword ptr [r14+2Ch], xmm2                                      ; +0x14f, 0x1800ab71f\nmovss   dword ptr [r14+5Ch], xmm2                                      ; +0x155, 0x1800ab725\nmovss   dword ptr [r14+58h], xmm8                                      ; +0x15b, 0x1800ab72b\nimul    eax, [r13+168h]                                                ; +0x161, 0x1800ab731\nxorps   xmm0, xmm0                                                     ; +0x169, 0x1800ab739\nlea     edx, [rsi+1]                                                   ; +0x16c, 0x1800ab73c\ncvtsi2ss xmm0, rax                                                     ; +0x16f, 0x1800ab73f\nmov     eax, ebp                                                       ; +0x174, 0x1800ab744\nlea     ecx, [rbp+1]                                                   ; +0x176, 0x1800ab746\nxor     r8d, r8d                                                       ; +0x179, 0x1800ab749\nmovss   dword ptr [r14+18h], xmm0                                      ; +0x17c, 0x1800ab74c\nxorps   xmm0, xmm0                                                     ; +0x182, 0x1800ab752\nimul    eax, [r13+16Ch]                                                ; +0x185, 0x1800ab755\nmov     [r14+20h], r8d                                                 ; +0x18d, 0x1800ab75d\ncvtsi2ss xmm0, rax                                                     ; +0x191, 0x1800ab761\nmov     eax, edx                                                       ; +0x196, 0x1800ab766\nmovss   dword ptr [r14+1Ch], xmm0                                      ; +0x198, 0x1800ab768\nxorps   xmm0, xmm0                                                     ; +0x19e, 0x1800ab76e\nimul    eax, [r13+168h]                                                ; +0x1a1, 0x1800ab771\ncvtsi2ss xmm0, rax                                                     ; +0x1a9, 0x1800ab779\nmov     eax, ebp                                                       ; +0x1ae, 0x1800ab77e\nmovss   dword ptr [r14+48h], xmm0                                      ; +0x1b0, 0x1800ab780\nxorps   xmm0, xmm0                                                     ; +0x1b6, 0x1800ab786\nimul    eax, [r13+16Ch]                                                ; +0x1b9, 0x1800ab789\nmov     [r14+50h], r8d                                                 ; +0x1c1, 0x1800ab791\ncvtsi2ss xmm0, rax                                                     ; +0x1c5, 0x1800ab795\nmovss   dword ptr [r14+4Ch], xmm0                                      ; +0x1ca, 0x1800ab79a\nxorps   xmm0, xmm0                                                     ; +0x1d0, 0x1800ab7a0\nimul    esi, [r13+168h]                                                ; +0x1d3, 0x1800ab7a3\nmov     eax, esi                                                       ; +0x1db, 0x1800ab7ab\ncvtsi2ss xmm0, rax                                                     ; +0x1dd, 0x1800ab7ad\nmov     eax, ecx                                                       ; +0x1e2, 0x1800ab7b2\nmovss   dword ptr [r14], xmm0                                          ; +0x1e4, 0x1800ab7b4\nxorps   xmm0, xmm0                                                     ; +0x1e9, 0x1800ab7b9\nimul    eax, [r13+16Ch]                                                ; +0x1ec, 0x1800ab7bc\nmov     [r14+8], r8d                                                   ; +0x1f4, 0x1800ab7c4\ncvtsi2ss xmm0, rax                                                     ; +0x1f8, 0x1800ab7c8\nmovss   dword ptr [r14+4], xmm0                                        ; +0x1fd, 0x1800ab7cd\nxorps   xmm0, xmm0                                                     ; +0x203, 0x1800ab7d3\nimul    edx, [r13+168h]                                                ; +0x206, 0x1800ab7d6\nmov     eax, edx                                                       ; +0x20e, 0x1800ab7de\ncvtsi2ss xmm0, rax                                                     ; +0x210, 0x1800ab7e0\nmovss   dword ptr [r14+30h], xmm0                                      ; +0x215, 0x1800ab7e5\nxorps   xmm0, xmm0                                                     ; +0x21b, 0x1800ab7eb\nimul    ecx, [r13+16Ch]                                                ; +0x21e, 0x1800ab7ee\nmov     [r14+38h], r8d                                                 ; +0x226, 0x1800ab7f6\nmov     eax, ecx                                                       ; +0x22a, 0x1800ab7fa\ncvtsi2ss xmm0, rax                                                     ; +0x22c, 0x1800ab7fc\nmovss   dword ptr [r14+34h], xmm0                                      ; +0x231, 0x1800ab801\nmovzx   eax, byte ptr [r13+14Ah]                                       ; +0x237, 0x1800ab807\nmov     byte ptr [rsp+78h+arg_18], al                                  ; +0x23f, 0x1800ab80f\nmovzx   eax, byte ptr [r13+14Bh]                                       ; +0x246, 0x1800ab816\nmov     byte ptr [rsp+78h+arg_18+1], al                                ; +0x24e, 0x1800ab81e\nmovzx   eax, byte ptr [r13+14Ch]                                       ; +0x255, 0x1800ab825\nmov     byte ptr [rsp+78h+arg_18+2], al                                ; +0x25d, 0x1800ab82d\nmovzx   eax, byte ptr [r13+148h]                                       ; +0x264, 0x1800ab834\nmov     byte ptr [rsp+78h+arg_18+3], al                                ; +0x26c, 0x1800ab83c\nmov     eax, [rsp+78h+arg_18]                                          ; +0x273, 0x1800ab843\nmov     [r14+3Ch], eax                                                 ; +0x27a, 0x1800ab84a\nmov     [r14+0Ch], eax                                                 ; +0x27e, 0x1800ab84e\nmov     [r14+54h], eax                                                 ; +0x282, 0x1800ab852\nmov     [r14+24h], eax                                                 ; +0x286, 0x1800ab856\nmov     rax, [r13+178h]                                                ; +0x28a, 0x1800ab85a\nmov     byte ptr [rax+48h], 1                                          ; +0x291, 0x1800ab861\nmov     rcx, [r13+178h]                                                ; +0x295, 0x1800ab865\nmov     rax, [rcx]                                                     ; +0x29c, 0x1800ab86c\ncall    qword ptr [rax+48h]                                            ; +0x29f, 0x1800ab86f\nlea     ecx, [r15+1]                                                   ; +0x2a2, 0x1800ab872\ncmp     ecx, eax                                                       ; +0x2a6, 0x1800ab876\njbe     short loc_1800AB88D                                            ; +0x2a8, 0x1800ab878\nmov     rcx, [r13+178h]; this                                          ; +0x2aa, 0x1800ab87a\nsub     r15d, eax                                                      ; +0x2b1, 0x1800ab881\nlea     edx, [r15+1]; unsigned int                                     ; +0x2b4, 0x1800ab884\ncall    ?increaseTotalQuadsWith@CCTextureAtlas@cocos2d@@QEAAXI@Z; cocos2d::CCTextureAtlas::increaseTotalQuadsWith(uint) ; +0x2b8, 0x1800ab888\nmovaps  xmm6, [rsp+78h+var_38]                                         ; +0x2bd, 0x1800ab88d\nlea     r11, [rsp+78h+var_28]                                          ; +0x2c2, 0x1800ab892\nmov     rbx, [r11+30h]                                                 ; +0x2c7, 0x1800ab897\nmov     rbp, [r11+38h]                                                 ; +0x2cb, 0x1800ab89b\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x2cf, 0x1800ab89f\nmovaps  xmm7, [rsp+78h+var_48]                                         ; +0x2d4, 0x1800ab8a4\nmov     rsp, r11                                                       ; +0x2d9, 0x1800ab8a9\npop     r15                                                            ; +0x2dc, 0x1800ab8ac\npop     r14                                                            ; +0x2de, 0x1800ab8ae\npop     r13                                                            ; +0x2e0, 0x1800ab8b0\npop     rdi                                                            ; +0x2e2, 0x1800ab8b2\npop     rsi                                                            ; +0x2e3, 0x1800ab8b3\nretn                                                                   ; +0x2e4, 0x1800ab8b4", "xrefs": ["cocos2d::CCTileMapAtlas::setTile @ 0x1800ab55c", "cocos2d::CCTileMapAtlas::updateAtlasValues @ 0x1800ab993", "<???> @ 0x1801438a8", "<???> @ 0x1801b807c"], "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"}