{"type": "func", "start": 4296102928, "end": 4296103074, "name": "GJBaseGameLayer::increaseBatchNodeCapacity", "pseudocode": "// \n// GJBaseGameLayer::increaseBatchNodeCapacity from 0x100115410 to 0x1001154a2 (146 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::setupHasCompleted @ 0x1000ade06\n// > LevelEditorLayer::init @ 0x1000dbd48\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 GJBaseGameLayer::increaseBatchNodeCapacity(GJBaseGameLayer *a1)\n{\n  GameManager *v1; // rax\n  signed int v2; // ebx\n  cocos2d::CCArray *m_batchNodes; // rax\n  cocos2d::ccArray *data; // rax\n  cocos2d::CCSpriteBatchNode **arr; // r15\n  unsigned __int64 v6; // r12\n  cocos2d::CCSpriteBatchNode *v7; // r14\n\n  v1 = GameManager::sharedState();\n  v2 = 200;\n  if ( GameManager::getGameVariable(v1, \"0066\") )\n    v2 = 1000;\n  m_batchNodes = a1->m_batchNodes;\n  if ( m_batchNodes )\n  {\n    data = m_batchNodes->data;\n    if ( data->num )\n    {\n      arr = (cocos2d::CCSpriteBatchNode **)data->arr;\n      v6 = (unsigned __int64)&arr[data->num - 1];\n      do\n      {\n        v7 = *arr;\n        if ( !*arr )\n          break;\n        if ( cocos2d::CCSpriteBatchNode::getAtlasCapacity(*arr) < v2 )\n          cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(v7, v2);\n        ++arr;\n      }\n      while ( (unsigned __int64)arr <= v6 );\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::increaseBatchNodeCapacity from 0x100115410 to 0x1001154a2 (146 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::setupHasCompleted @ 0x1000ade06\n; > LevelEditorLayer::init @ 0x1000dbd48\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    rbp                                                            ; +0x0, 0x100115410\nmov     rbp, rsp                                                       ; +0x1, 0x100115411\npush    r15                                                            ; +0x4, 0x100115414\npush    r14                                                            ; +0x6, 0x100115416\npush    r12                                                            ; +0x8, 0x100115418\npush    rbx                                                            ; +0xa, 0x10011541a\nmov     r14, rdi                                                       ; +0xb, 0x10011541b\ncall    GameManager__sharedState                                       ; +0xe, 0x10011541e\nlea     rsi, a0066; \"0066\"                                             ; +0x13, 0x100115423\nmov     rdi, rax                                                       ; +0x1a, 0x10011542a\ncall    GameManager__getGameVariable                                   ; +0x1d, 0x10011542d\ntest    al, al                                                         ; +0x22, 0x100115432\nmov     eax, 3E8h                                                      ; +0x24, 0x100115434\nmov     ebx, 0C8h                                                      ; +0x29, 0x100115439\ncmovnz  ebx, eax                                                       ; +0x2e, 0x10011543e\nmov     rax, [r14+0EF8h]                                               ; +0x31, 0x100115441\ntest    rax, rax                                                       ; +0x38, 0x100115448\njz      short loc_100115499                                            ; +0x3b, 0x10011544b\nmov     rax, [rax+38h]                                                 ; +0x3d, 0x10011544d\nmov     ecx, [rax]                                                     ; +0x41, 0x100115451\ntest    rcx, rcx                                                       ; +0x43, 0x100115453\njz      short loc_100115499                                            ; +0x46, 0x100115456\nmov     r15, [rax+10h]                                                 ; +0x48, 0x100115458\nlea     r12, [r15+rcx*8]                                               ; +0x4c, 0x10011545c\nadd     r12, 0FFFFFFFFFFFFFFF8h                                        ; +0x50, 0x100115460\njmp     short loc_100115479                                            ; +0x54, 0x100115464\nalign 10h                                                              ; +0x56, 0x100115466\nadd     r15, 8                                                         ; +0x60, 0x100115470\ncmp     r15, r12                                                       ; +0x64, 0x100115474\nja      short loc_100115499                                            ; +0x67, 0x100115477\nmov     r14, [r15]                                                     ; +0x69, 0x100115479\ntest    r14, r14                                                       ; +0x6c, 0x10011547c\njz      short loc_100115499                                            ; +0x6f, 0x10011547f\nmov     rdi, r14                                                       ; +0x71, 0x100115481\ncall    cocos2d__CCSpriteBatchNode__getAtlasCapacity                   ; +0x74, 0x100115484\ncmp     eax, ebx                                                       ; +0x79, 0x100115489\njge     short loc_100115470                                            ; +0x7b, 0x10011548b\nmov     rdi, r14                                                       ; +0x7d, 0x10011548d\nmov     esi, ebx                                                       ; +0x80, 0x100115490\ncall    cocos2d__CCSpriteBatchNode__increaseAtlasCapacity              ; +0x82, 0x100115492\njmp     short loc_100115470                                            ; +0x87, 0x100115497\npop     rbx                                                            ; +0x89, 0x100115499\npop     r12                                                            ; +0x8a, 0x10011549a\npop     r14                                                            ; +0x8c, 0x10011549c\npop     r15                                                            ; +0x8e, 0x10011549e\npop     rbp                                                            ; +0x90, 0x1001154a0\nretn                                                                   ; +0x91, 0x1001154a1", "xrefs": ["PlayLayer::setupHasCompleted @ 0x1000ade06", "LevelEditorLayer::init @ 0x1000dbd48"], "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"}