{"type": "func", "start": 6443151520, "end": 6443151669, "name": "cocos2d::CCTileMapAtlas::calculateItemsToRender", "pseudocode": "// \n// cocos2d::CCTileMapAtlas::calculateItemsToRender from 0x1800ab0a0 to 0x1800ab135 (149 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTileMapAtlas::initWithTileFile @ 0x1800ab273\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b8034\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::calculateItemsToRender(cocos2d::CCTileMapAtlas *this)\n{\n  cocos2d::sImageTGA *m_pTGAInfo; // r9\n  int v2; // ebx\n  __int16 width; // r10\n  int v4; // eax\n  __int16 i; // dx\n\n  m_pTGAInfo = this->m_pTGAInfo;\n  this->m_nItemsToRender = 0;\n  v2 = 0;\n  width = m_pTGAInfo->width;\n  if ( width > 0 )\n  {\n    do\n    {\n      v4 = 0;\n      for ( i = width; v4 < m_pTGAInfo->height; width = i )\n      {\n        i = width;\n        if ( (unsigned __int8)*(_WORD *)&m_pTGAInfo->imageData[3 * v2 + 3 * v4 * width] )\n        {\n          ++this->m_nItemsToRender;\n          i = m_pTGAInfo->width;\n        }\n        ++v4;\n      }\n      ++v2;\n      width = i;\n    }\n    while ( v2 < i );\n  }\n}", "assembly": "; \n; cocos2d::CCTileMapAtlas::calculateItemsToRender from 0x1800ab0a0 to 0x1800ab135 (149 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTileMapAtlas::initWithTileFile @ 0x1800ab273\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b8034\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, 0x1800ab0a0\nmov     [rsp+arg_10], rdi                                              ; +0x5, 0x1800ab0a5\nmov     r9, [rcx+198h]                                                 ; +0xa, 0x1800ab0aa\nxor     edi, edi                                                       ; +0x11, 0x1800ab0b1\nmov     [rcx+1A8h], edi                                                ; +0x13, 0x1800ab0b3\nmov     r11, rcx                                                       ; +0x19, 0x1800ab0b9\nmov     ebx, edi                                                       ; +0x1c, 0x1800ab0bc\nmovzx   r10d, word ptr [r9+6]                                          ; +0x1e, 0x1800ab0be\ncmp     di, r10w                                                       ; +0x23, 0x1800ab0c3\njge     short loc_1800AB12A                                            ; +0x27, 0x1800ab0c7\nnop     dword ptr [rax+00000000h]                                      ; +0x29, 0x1800ab0c9\nmov     eax, edi                                                       ; +0x30, 0x1800ab0d0\nmovzx   edx, r10w                                                      ; +0x32, 0x1800ab0d2\ncmp     di, [r9+8]                                                     ; +0x36, 0x1800ab0d6\njge     short loc_1800AB11D                                            ; +0x3b, 0x1800ab0db\nnop     dword ptr [rax]                                                ; +0x3d, 0x1800ab0dd\nmovsx   ecx, r10w                                                      ; +0x40, 0x1800ab0e0\nimul    ecx, eax                                                       ; +0x44, 0x1800ab0e4\nadd     ecx, ebx                                                       ; +0x47, 0x1800ab0e7\nmovsxd  rcx, ecx                                                       ; +0x49, 0x1800ab0e9\nlea     rdx, [rcx+rcx*2]                                               ; +0x4c, 0x1800ab0ec\nmov     rcx, [r9+10h]                                                  ; +0x50, 0x1800ab0f0\nmovzx   r8d, word ptr [rdx+rcx]                                        ; +0x54, 0x1800ab0f4\nmovzx   edx, r10w                                                      ; +0x59, 0x1800ab0f9\ntest    r8b, r8b                                                       ; +0x5d, 0x1800ab0fd\njz      short loc_1800AB10E                                            ; +0x60, 0x1800ab100\ninc     dword ptr [r11+1A8h]                                           ; +0x62, 0x1800ab102\nmovzx   edx, word ptr [r9+6]                                           ; +0x69, 0x1800ab109\nmovsx   ecx, word ptr [r9+8]                                           ; +0x6e, 0x1800ab10e\ninc     eax                                                            ; +0x73, 0x1800ab113\nmovzx   r10d, dx                                                       ; +0x75, 0x1800ab115\ncmp     eax, ecx                                                       ; +0x79, 0x1800ab119\njl      short loc_1800AB0E0                                            ; +0x7b, 0x1800ab11b\ninc     ebx                                                            ; +0x7d, 0x1800ab11d\nmovsx   eax, dx                                                        ; +0x7f, 0x1800ab11f\nmovzx   r10d, dx                                                       ; +0x82, 0x1800ab122\ncmp     ebx, eax                                                       ; +0x86, 0x1800ab126\njl      short loc_1800AB0D0                                            ; +0x88, 0x1800ab128\nmov     rbx, [rsp+arg_8]                                               ; +0x8a, 0x1800ab12a\nmov     rdi, [rsp+arg_10]                                              ; +0x8f, 0x1800ab12f\nretn                                                                   ; +0x94, 0x1800ab134", "xrefs": ["cocos2d::CCTileMapAtlas::initWithTileFile @ 0x1800ab273", "<???> @ 0x1801438a8", "<???> @ 0x1801b8034"], "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"}