{"type": "func", "start": 5371931920, "end": 5371932133, "name": "GJBaseGameLayer::increaseBatchNodeCapacity", "pseudocode": "// \n// GJBaseGameLayer::increaseBatchNodeCapacity from 0x140312d10 to 0x140312de5 (213 bytes)\n// \n// 3 xrefs:\n// > LevelEditorLayer::init @ 0x1403ee89b\n// > PlayLayer::setupHasCompleted @ 0x140504a66\n// > <???> @ 0x14091e854\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:30:16 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall GJBaseGameLayer::increaseBatchNodeCapacity(__int64 a1)\n{\n  __int64 v2; // rcx\n  signed int v3; // esi\n  __int64 v4; // rbx\n  unsigned int *v5; // rbx\n  __int64 v6; // rax\n  cocos2d::CCSpriteBatchNode **v7; // rbx\n  cocos2d::CCSpriteBatchNode **i; // rbp\n  cocos2d::CCSpriteBatchNode *v9; // rdi\n  void *v10; // [rsp+30h] [rbp+8h]\n\n  v2 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v10 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager((__int64)v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v2 = qword_14090BFD0;\n  }\n  v3 = 200;\n  if ( GameManager::getGameVariable(v2, \"0066\") )\n    v3 = 1000;\n  v4 = *(_QWORD *)(a1 + 4360);\n  if ( v4 )\n  {\n    v5 = *(unsigned int **)(v4 + 56);\n    v6 = *v5;\n    if ( (_DWORD)v6 )\n    {\n      v7 = *((cocos2d::CCSpriteBatchNode ***)v5 + 2);\n      for ( i = &v7[v6 - 1]; v7 <= i; ++v7 )\n      {\n        v9 = *v7;\n        if ( !*v7 )\n          break;\n        if ( cocos2d::CCSpriteBatchNode::getAtlasCapacity(*v7) < v3 )\n          cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(v9, v3);\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::increaseBatchNodeCapacity from 0x140312d10 to 0x140312de5 (213 bytes)\n; \n; 3 xrefs:\n; > LevelEditorLayer::init @ 0x1403ee89b\n; > PlayLayer::setupHasCompleted @ 0x140504a66\n; > <???> @ 0x14091e854\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:30:16 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140312d10\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140312d15\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140312d1a\npush    rdi                                                            ; +0xf, 0x140312d1f\nsub     rsp, 20h                                                       ; +0x10, 0x140312d20\nmov     rbx, rcx                                                       ; +0x14, 0x140312d24\nmov     rcx, cs:qword_14090BFD0                                        ; +0x17, 0x140312d27\ntest    rcx, rcx                                                       ; +0x1e, 0x140312d2e\njnz     short loc_140312D65                                            ; +0x21, 0x140312d31\nmov     ecx, 6E8h; Size                                                ; +0x23, 0x140312d33\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x28, 0x140312d38\nmov     [rsp+28h+arg_0], rax                                           ; +0x2d, 0x140312d3d\nmov     rcx, rax                                                       ; +0x32, 0x140312d42\ncall    GameManager__GameManager                                       ; +0x35, 0x140312d45\nnop                                                                    ; +0x3a, 0x140312d4a\nmov     cs:qword_14090BFD0, rax                                        ; +0x3b, 0x140312d4b\nmov     rcx, [rax]                                                     ; +0x42, 0x140312d52\nmov     rdx, [rcx+48h]                                                 ; +0x45, 0x140312d55\nmov     rcx, rax                                                       ; +0x49, 0x140312d59\ncall    rdx                                                            ; +0x4c, 0x140312d5c\nmov     rcx, cs:qword_14090BFD0                                        ; +0x4e, 0x140312d5e\nlea     rdx, a0066; \"0066\"                                             ; +0x55, 0x140312d65\ncall    GameManager__getGameVariable                                   ; +0x5c, 0x140312d6c\nmov     esi, 0C8h                                                      ; +0x61, 0x140312d71\nmov     ecx, 3E8h                                                      ; +0x66, 0x140312d76\ntest    al, al                                                         ; +0x6b, 0x140312d7b\ncmovnz  esi, ecx                                                       ; +0x6d, 0x140312d7d\nmov     rbx, [rbx+1108h]                                               ; +0x70, 0x140312d80\ntest    rbx, rbx                                                       ; +0x77, 0x140312d87\njz      short loc_140312DD0                                            ; +0x7a, 0x140312d8a\nmov     rbx, [rbx+38h]                                                 ; +0x7c, 0x140312d8c\nmov     eax, [rbx]                                                     ; +0x80, 0x140312d90\ntest    eax, eax                                                       ; +0x82, 0x140312d92\njz      short loc_140312DD0                                            ; +0x84, 0x140312d94\nmov     rbx, [rbx+10h]                                                 ; +0x86, 0x140312d96\nlea     rbp, [rax-1]                                                   ; +0x8a, 0x140312d9a\nlea     rbp, [rbx+rbp*8]                                               ; +0x8e, 0x140312d9e\ncmp     rbx, rbp                                                       ; +0x92, 0x140312da2\nja      short loc_140312DD0                                            ; +0x95, 0x140312da5\nmov     rdi, [rbx]                                                     ; +0x97, 0x140312da7\ntest    rdi, rdi                                                       ; +0x9a, 0x140312daa\njz      short loc_140312DD0                                            ; +0x9d, 0x140312dad\nmov     rcx, rdi                                                       ; +0x9f, 0x140312daf\ncall    cs:?getAtlasCapacity@CCSpriteBatchNode@cocos2d@@QEAAHXZ; cocos2d::CCSpriteBatchNode::getAtlasCapacity(void) ; +0xa2, 0x140312db2\ncmp     eax, esi                                                       ; +0xa8, 0x140312db8\njge     short loc_140312DC7                                            ; +0xaa, 0x140312dba\nmov     edx, esi                                                       ; +0xac, 0x140312dbc\nmov     rcx, rdi                                                       ; +0xae, 0x140312dbe\ncall    cs:?increaseAtlasCapacity@CCSpriteBatchNode@cocos2d@@QEAAXI@Z; cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(uint) ; +0xb1, 0x140312dc1\nadd     rbx, 8                                                         ; +0xb7, 0x140312dc7\ncmp     rbx, rbp                                                       ; +0xbb, 0x140312dcb\njbe     short loc_140312DA7                                            ; +0xbe, 0x140312dce\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xc0, 0x140312dd0\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xc5, 0x140312dd5\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xca, 0x140312dda\nadd     rsp, 20h                                                       ; +0xcf, 0x140312ddf\npop     rdi                                                            ; +0xd3, 0x140312de3\nretn                                                                   ; +0xd4, 0x140312de4", "xrefs": ["LevelEditorLayer::init @ 0x1403ee89b", "PlayLayer::setupHasCompleted @ 0x140504a66", "<???> @ 0x14091e854"], "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"}