{"type": "func", "start": 6442457376, "end": 6442457533, "name": "cocos2d::CCAtlasNode::calculateMaxItems", "pseudocode": "// \n// cocos2d::CCAtlasNode::calculateMaxItems from 0x180001920 to 0x1800019bd (157 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCAtlasNode::initWithTexture @ 0x180001cf1\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ad0c0\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::CCAtlasNode::calculateMaxItems(cocos2d::CCAtlasNode *this)\n{\n  __int64 v2; // rax\n  cocos2d::CCTexture2D *v3; // rax\n  const struct cocos2d::CCSize *ContentSizeInPixels; // rax\n  float v5; // xmm1_4\n  float v6; // [rsp+30h] [rbp+8h] BYREF\n  float v7; // [rsp+34h] [rbp+Ch]\n\n  v2 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getTexture)(this->m_pTextureAtlas);\n  (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v2 + 136LL))(v2, &v6);\n  if ( this->m_bIgnoreContentScaleFactor )\n  {\n    v3 = (cocos2d::CCTexture2D *)((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pTextureAtlas->getTexture)(this->m_pTextureAtlas);\n    ContentSizeInPixels = cocos2d::CCTexture2D::getContentSizeInPixels(v3);\n    cocos2d::CCSize::operator=(&v6, ContentSizeInPixels);\n  }\n  v5 = v6;\n  this->m_uItemsPerColumn = (int)(float)(v7 / (float)(int)this->m_uItemHeight);\n  this->m_uItemsPerRow = (int)(float)(v5 / (float)(int)this->m_uItemWidth);\n}", "assembly": "; \n; cocos2d::CCAtlasNode::calculateMaxItems from 0x180001920 to 0x1800019bd (157 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCAtlasNode::initWithTexture @ 0x180001cf1\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ad0c0\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\npush    rbx                                                            ; +0x0, 0x180001920\nsub     rsp, 20h                                                       ; +0x2, 0x180001922\nmov     rbx, rcx                                                       ; +0x6, 0x180001926\nmov     rcx, [rcx+178h]                                                ; +0x9, 0x180001929\nmov     rax, [rcx]                                                     ; +0x10, 0x180001930\ncall    qword ptr [rax+58h]                                            ; +0x13, 0x180001933\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x16, 0x180001936\nmov     rcx, rax                                                       ; +0x1b, 0x18000193b\nmov     r8, [rax]                                                      ; +0x1e, 0x18000193e\ncall    qword ptr [r8+88h]                                             ; +0x21, 0x180001941\ncmp     byte ptr [rbx+194h], 0                                         ; +0x28, 0x180001948\njz      short loc_180001973                                            ; +0x2f, 0x18000194f\nmov     rcx, [rbx+178h]                                                ; +0x31, 0x180001951\nmov     rax, [rcx]                                                     ; +0x38, 0x180001958\ncall    qword ptr [rax+58h]                                            ; +0x3b, 0x18000195b\nmov     rcx, rax; this                                                 ; +0x3e, 0x18000195e\ncall    ?getContentSizeInPixels@CCTexture2D@cocos2d@@QEAAAEBVCCSize@2@XZ; cocos2d::CCTexture2D::getContentSizeInPixels(void) ; +0x41, 0x180001961\nmov     rdx, rax                                                       ; +0x46, 0x180001966\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x49, 0x180001969\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x4e, 0x18000196e\nmov     eax, [rbx+16Ch]                                                ; +0x53, 0x180001973\nxorps   xmm0, xmm0                                                     ; +0x59, 0x180001979\nmovss   xmm1, [rsp+28h+arg_4]                                          ; +0x5c, 0x18000197c\ncvtsi2ss xmm0, rax                                                     ; +0x62, 0x180001982\ndivss   xmm1, xmm0                                                     ; +0x67, 0x180001987\nxorps   xmm0, xmm0                                                     ; +0x6b, 0x18000198b\ncvttss2si eax, xmm1                                                    ; +0x6e, 0x18000198e\nmovss   xmm1, [rsp+28h+arg_0]                                          ; +0x72, 0x180001992\nmov     [rbx+164h], eax                                                ; +0x78, 0x180001998\nmov     eax, [rbx+168h]                                                ; +0x7e, 0x18000199e\ncvtsi2ss xmm0, rax                                                     ; +0x84, 0x1800019a4\ndivss   xmm1, xmm0                                                     ; +0x89, 0x1800019a9\ncvttss2si eax, xmm1                                                    ; +0x8d, 0x1800019ad\nmov     [rbx+160h], eax                                                ; +0x91, 0x1800019b1\nadd     rsp, 20h                                                       ; +0x97, 0x1800019b7\npop     rbx                                                            ; +0x9b, 0x1800019bb\nretn                                                                   ; +0x9c, 0x1800019bc", "xrefs": ["cocos2d::CCAtlasNode::initWithTexture @ 0x180001cf1", "<???> @ 0x1801438a8", "<???> @ 0x1801ad0c0"], "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"}