{"type": "func", "start": 5370858528, "end": 5370858738, "name": "GJBaseGameLayer::increaseBatchNodeCapacity", "pseudocode": "// \n// GJBaseGameLayer::increaseBatchNodeCapacity from 0x14020cc20 to 0x14020ccf2 (210 bytes)\n// \n// 3 xrefs:\n// > LevelEditorLayer::init @ 0x1402d29a4\n// > PlayLayer::setupHasCompleted @ 0x1403a6850\n// > <???> @ 0x1406ccd74\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\n// Hidden C++ exception states: #wind=1\nvoid GJBaseGameLayer::increaseBatchNodeCapacity(GJBaseGameLayer *a1)\n{\n  GameManager *v2; // rcx\n  signed int v3; // esi\n  cocos2d::CCArray *m_batchNodes; // rbx\n  cocos2d::ccArray *data; // rbx\n  __int64 num; // rax\n  cocos2d::CCSpriteBatchNode **arr; // rbx\n  cocos2d::CCSpriteBatchNode **i; // rbp\n  cocos2d::CCSpriteBatchNode *v9; // rdi\n  void *v10; // [rsp+30h] [rbp+8h]\n\n  v2 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v10 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v2 = (GameManager *)qword_1406C2ED8;\n  }\n  v3 = 200;\n  if ( GameManager::getGameVariable(v2, \"0066\") )\n    v3 = 1000;\n  m_batchNodes = a1->m_batchNodes;\n  if ( m_batchNodes )\n  {\n    data = m_batchNodes->data;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      arr = (cocos2d::CCSpriteBatchNode **)data->arr;\n      for ( i = &arr[num - 1]; arr <= i; ++arr )\n      {\n        v9 = *arr;\n        if ( !*arr )\n          break;\n        if ( cocos2d::CCSpriteBatchNode::getAtlasCapacity(*arr) < v3 )\n          cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(v9, v3);\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::increaseBatchNodeCapacity from 0x14020cc20 to 0x14020ccf2 (210 bytes)\n; \n; 3 xrefs:\n; > LevelEditorLayer::init @ 0x1402d29a4\n; > PlayLayer::setupHasCompleted @ 0x1403a6850\n; > <???> @ 0x1406ccd74\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, 0x14020cc20\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14020cc25\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14020cc2a\npush    rdi                                                            ; +0xf, 0x14020cc2f\nsub     rsp, 20h                                                       ; +0x10, 0x14020cc30\nmov     rbx, rcx                                                       ; +0x14, 0x14020cc34\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x17, 0x14020cc37\ntest    rcx, rcx                                                       ; +0x1e, 0x14020cc3e\njnz     short loc_14020CC72                                            ; +0x21, 0x14020cc41\nmov     ecx, 668h; Size                                                ; +0x23, 0x14020cc43\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x28, 0x14020cc48\nmov     [rsp+28h+arg_0], rax                                           ; +0x2d, 0x14020cc4d\nmov     rcx, rax                                                       ; +0x32, 0x14020cc52\ncall    sub_14017AB00                                                  ; +0x35, 0x14020cc55\nnop                                                                    ; +0x3a, 0x14020cc5a\nmov     cs:qword_1406C2ED8, rax                                        ; +0x3b, 0x14020cc5b\nmov     rdx, [rax]                                                     ; +0x42, 0x14020cc62\nmov     rcx, rax                                                       ; +0x45, 0x14020cc65\ncall    qword ptr [rdx+48h]                                            ; +0x48, 0x14020cc68\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x4b, 0x14020cc6b\nlea     rdx, a0066; \"0066\"                                             ; +0x52, 0x14020cc72\ncall    GameManager__getGameVariable                                   ; +0x59, 0x14020cc79\nmov     esi, 0C8h                                                      ; +0x5e, 0x14020cc7e\nmov     ecx, 3E8h                                                      ; +0x63, 0x14020cc83\ntest    al, al                                                         ; +0x68, 0x14020cc88\ncmovnz  esi, ecx                                                       ; +0x6a, 0x14020cc8a\nmov     rbx, [rbx+1028h]                                               ; +0x6d, 0x14020cc8d\ntest    rbx, rbx                                                       ; +0x74, 0x14020cc94\njz      short loc_14020CCDD                                            ; +0x77, 0x14020cc97\nmov     rbx, [rbx+38h]                                                 ; +0x79, 0x14020cc99\nmov     eax, [rbx]                                                     ; +0x7d, 0x14020cc9d\ntest    eax, eax                                                       ; +0x7f, 0x14020cc9f\njz      short loc_14020CCDD                                            ; +0x81, 0x14020cca1\nmov     rbx, [rbx+10h]                                                 ; +0x83, 0x14020cca3\nlea     rbp, [rax-1]                                                   ; +0x87, 0x14020cca7\nlea     rbp, [rbx+rbp*8]                                               ; +0x8b, 0x14020ccab\ncmp     rbx, rbp                                                       ; +0x8f, 0x14020ccaf\nja      short loc_14020CCDD                                            ; +0x92, 0x14020ccb2\nmov     rdi, [rbx]                                                     ; +0x94, 0x14020ccb4\ntest    rdi, rdi                                                       ; +0x97, 0x14020ccb7\njz      short loc_14020CCDD                                            ; +0x9a, 0x14020ccba\nmov     rcx, rdi                                                       ; +0x9c, 0x14020ccbc\ncall    cs:?getAtlasCapacity@CCSpriteBatchNode@cocos2d@@QEAAHXZ; cocos2d::CCSpriteBatchNode::getAtlasCapacity(void) ; +0x9f, 0x14020ccbf\ncmp     eax, esi                                                       ; +0xa5, 0x14020ccc5\njge     short loc_14020CCD4                                            ; +0xa7, 0x14020ccc7\nmov     edx, esi                                                       ; +0xa9, 0x14020ccc9\nmov     rcx, rdi                                                       ; +0xab, 0x14020cccb\ncall    cs:?increaseAtlasCapacity@CCSpriteBatchNode@cocos2d@@QEAAXI@Z; cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(uint) ; +0xae, 0x14020ccce\nadd     rbx, 8                                                         ; +0xb4, 0x14020ccd4\ncmp     rbx, rbp                                                       ; +0xb8, 0x14020ccd8\njbe     short loc_14020CCB4                                            ; +0xbb, 0x14020ccdb\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xbd, 0x14020ccdd\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xc2, 0x14020cce2\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xc7, 0x14020cce7\nadd     rsp, 20h                                                       ; +0xcc, 0x14020ccec\npop     rdi                                                            ; +0xd0, 0x14020ccf0\nretn                                                                   ; +0xd1, 0x14020ccf1", "xrefs": ["LevelEditorLayer::init @ 0x1402d29a4", "PlayLayer::setupHasCompleted @ 0x1403a6850", "<???> @ 0x1406ccd74"], "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"}