{"type": "func", "start": 4296418336, "end": 4296418507, "name": "GJBaseGameLayer::orderSpawnObjects", "pseudocode": "// \n// GJBaseGameLayer::orderSpawnObjects from 0x100162420 to 0x1001624cb (171 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::createObjectsFromSetupFinished @ 0x1000b6bbe\n// > LevelEditorLayer::onPlaytest @ 0x1000f2679\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::orderSpawnObjects(GJBaseGameLayer *a1)\n{\n  __int64 v1; // rax\n  cocos2d::CCArray *m_spawnObjectsArray; // rdi\n  cocos2d::ccArray *data; // rax\n  cocos2d::CCObject **arr; // r12\n  unsigned __int64 v6; // r13\n  __int64 v7[6]; // [rsp+0h] [rbp-30h] BYREF\n\n  v7[0] = v1;\n  cocos2d::CCDictionary::removeAllObjects(a1->m_spawnObjects);\n  m_spawnObjectsArray = a1->m_spawnObjectsArray;\n  if ( m_spawnObjectsArray )\n  {\n    data = m_spawnObjectsArray->data;\n    if ( data->num )\n    {\n      arr = data->arr;\n      v6 = (unsigned __int64)&arr[data->num - 1];\n      do\n      {\n        if ( !*arr )\n          break;\n        ((void (__fastcall *)(__int64 *, cocos2d::CCObject *))(*arr)->__vftable[22].update)(v7, *arr);\n        sub_10028CC90();\n        ++arr;\n      }\n      while ( (unsigned __int64)arr <= v6 );\n      m_spawnObjectsArray = a1->m_spawnObjectsArray;\n    }\n  }\n  else\n  {\n    m_spawnObjectsArray = nullptr;\n  }\n  LevelTools::sortChannelOrderObjects(m_spawnObjectsArray, a1->m_spawnObjects, 0);\n}", "assembly": "; \n; GJBaseGameLayer::orderSpawnObjects from 0x100162420 to 0x1001624cb (171 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::createObjectsFromSetupFinished @ 0x1000b6bbe\n; > LevelEditorLayer::onPlaytest @ 0x1000f2679\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, 0x100162420\nmov     rbp, rsp                                                       ; +0x1, 0x100162421\npush    r15                                                            ; +0x4, 0x100162424\npush    r14                                                            ; +0x6, 0x100162426\npush    r13                                                            ; +0x8, 0x100162428\npush    r12                                                            ; +0xa, 0x10016242a\npush    rbx                                                            ; +0xc, 0x10016242c\npush    rax                                                            ; +0xd, 0x10016242d\nmov     rbx, rdi                                                       ; +0xe, 0x10016242e\nmov     rdi, [rdi+0CD0h]                                               ; +0x11, 0x100162431\ncall    cocos2d__CCDictionary__removeAllObjects                        ; +0x18, 0x100162438\nmov     rdi, [rbx+0CC8h]                                               ; +0x1d, 0x10016243d\ntest    rdi, rdi                                                       ; +0x24, 0x100162444\njz      short loc_1001624AC                                            ; +0x27, 0x100162447\nmov     rax, [rdi+38h]                                                 ; +0x29, 0x100162449\nmov     ecx, [rax]                                                     ; +0x2d, 0x10016244d\ntest    rcx, rcx                                                       ; +0x2f, 0x10016244f\njz      short loc_1001624AE                                            ; +0x32, 0x100162452\nmov     r12, [rax+10h]                                                 ; +0x34, 0x100162454\nlea     r13, [r12+rcx*8]                                               ; +0x38, 0x100162458\nadd     r13, 0FFFFFFFFFFFFFFF8h                                        ; +0x3c, 0x10016245c\nlea     r14, [rbp+var_30]                                              ; +0x40, 0x100162460\nnop     word ptr [rax+rax+00000000h]                                   ; +0x44, 0x100162464\nmov     r15, [r12]                                                     ; +0x50, 0x100162470\ntest    r15, r15                                                       ; +0x54, 0x100162474\njz      short loc_1001624A3                                            ; +0x57, 0x100162477\nmov     rax, [r15]                                                     ; +0x59, 0x100162479\nmov     rdi, r14                                                       ; +0x5c, 0x10016247c\nmov     rsi, r15                                                       ; +0x5f, 0x10016247f\ncall    qword ptr [rax+708h]                                           ; +0x62, 0x100162482\nadd     r15, 6F8h                                                      ; +0x68, 0x100162488\nmov     rdi, r15                                                       ; +0x6f, 0x10016248f\nmov     rsi, r14                                                       ; +0x72, 0x100162492\ncall    sub_10028CC90                                                  ; +0x75, 0x100162495\nadd     r12, 8                                                         ; +0x7a, 0x10016249a\ncmp     r12, r13                                                       ; +0x7e, 0x10016249e\njbe     short loc_100162470                                            ; +0x81, 0x1001624a1\nmov     rdi, [rbx+0CC8h]                                               ; +0x83, 0x1001624a3\njmp     short loc_1001624AE                                            ; +0x8a, 0x1001624aa\nxor     edi, edi                                                       ; +0x8c, 0x1001624ac\nmov     rsi, [rbx+0CD0h]                                               ; +0x8e, 0x1001624ae\nxor     edx, edx                                                       ; +0x95, 0x1001624b5\ncall    LevelTools__sortChannelOrderObjects                            ; +0x97, 0x1001624b7\nadd     rsp, 8                                                         ; +0x9c, 0x1001624bc\npop     rbx                                                            ; +0xa0, 0x1001624c0\npop     r12                                                            ; +0xa1, 0x1001624c1\npop     r13                                                            ; +0xa3, 0x1001624c3\npop     r14                                                            ; +0xa5, 0x1001624c5\npop     r15                                                            ; +0xa7, 0x1001624c7\npop     rbp                                                            ; +0xa9, 0x1001624c9\nretn                                                                   ; +0xaa, 0x1001624ca", "xrefs": ["PlayLayer::createObjectsFromSetupFinished @ 0x1000b6bbe", "LevelEditorLayer::onPlaytest @ 0x1000f2679"], "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"}