{"type": "func", "start": 4296285072, "end": 4296285243, "name": "GJBaseGameLayer::orderSpawnObjects", "pseudocode": "// \n// GJBaseGameLayer::orderSpawnObjects from 0x100141b90 to 0x100141c3b (171 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::createObjectsFromSetupFinished @ 0x1000844be\n// > LevelEditorLayer::onPlaytest @ 0x1000c5e79\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 12:24:55 +0000\n// \n\n__int64 __fastcall GJBaseGameLayer::orderSpawnObjects(__int64 a1)\n{\n  __int64 v1; // rax\n  __int64 v3; // rdi\n  unsigned int *v4; // rax\n  _QWORD *v5; // r12\n  unsigned __int64 v6; // r13\n  __int64 v7; // r15\n  _QWORD v9[6]; // [rsp+0h] [rbp-30h] BYREF\n\n  v9[0] = v1;\n  cocos2d::CCDictionary::removeAllObjects(*(_QWORD *)(a1 + 3312));\n  v3 = *(_QWORD *)(a1 + 3304);\n  if ( v3 )\n  {\n    v4 = *(unsigned int **)(v3 + 56);\n    if ( *v4 )\n    {\n      v5 = *((_QWORD **)v4 + 2);\n      v6 = (unsigned __int64)&v5[*v4 - 1];\n      do\n      {\n        v7 = *v5;\n        if ( !*v5 )\n          break;\n        (*(void (__fastcall **)(_QWORD *, _QWORD))(*(_QWORD *)v7 + 1816LL))(v9, *v5);\n        sub_100278300(v7 + 1784, v9);\n        ++v5;\n      }\n      while ( (unsigned __int64)v5 <= v6 );\n      v3 = *(_QWORD *)(a1 + 3304);\n    }\n  }\n  else\n  {\n    v3 = 0;\n  }\n  return LevelTools::sortChannelOrderObjects(v3, *(_QWORD *)(a1 + 3312), 0);\n}", "assembly": "; \n; GJBaseGameLayer::orderSpawnObjects from 0x100141b90 to 0x100141c3b (171 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::createObjectsFromSetupFinished @ 0x1000844be\n; > LevelEditorLayer::onPlaytest @ 0x1000c5e79\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 12:24:55 +0000\n; \npush    rbp                                                            ; +0x0, 0x100141b90\nmov     rbp, rsp                                                       ; +0x1, 0x100141b91\npush    r15                                                            ; +0x4, 0x100141b94\npush    r14                                                            ; +0x6, 0x100141b96\npush    r13                                                            ; +0x8, 0x100141b98\npush    r12                                                            ; +0xa, 0x100141b9a\npush    rbx                                                            ; +0xc, 0x100141b9c\npush    rax                                                            ; +0xd, 0x100141b9d\nmov     rbx, rdi                                                       ; +0xe, 0x100141b9e\nmov     rdi, [rdi+0CF0h]                                               ; +0x11, 0x100141ba1\ncall    cocos2d__CCDictionary__removeAllObjects                        ; +0x18, 0x100141ba8\nmov     rdi, [rbx+0CE8h]                                               ; +0x1d, 0x100141bad\ntest    rdi, rdi                                                       ; +0x24, 0x100141bb4\njz      short loc_100141C1C                                            ; +0x27, 0x100141bb7\nmov     rax, [rdi+38h]                                                 ; +0x29, 0x100141bb9\nmov     ecx, [rax]                                                     ; +0x2d, 0x100141bbd\ntest    rcx, rcx                                                       ; +0x2f, 0x100141bbf\njz      short loc_100141C1E                                            ; +0x32, 0x100141bc2\nmov     r12, [rax+10h]                                                 ; +0x34, 0x100141bc4\nlea     r13, [r12+rcx*8]                                               ; +0x38, 0x100141bc8\nadd     r13, 0FFFFFFFFFFFFFFF8h                                        ; +0x3c, 0x100141bcc\nlea     r14, [rbp+var_30]                                              ; +0x40, 0x100141bd0\nnop     word ptr [rax+rax+00000000h]                                   ; +0x44, 0x100141bd4\nmov     r15, [r12]                                                     ; +0x50, 0x100141be0\ntest    r15, r15                                                       ; +0x54, 0x100141be4\njz      short loc_100141C13                                            ; +0x57, 0x100141be7\nmov     rax, [r15]                                                     ; +0x59, 0x100141be9\nmov     rdi, r14                                                       ; +0x5c, 0x100141bec\nmov     rsi, r15                                                       ; +0x5f, 0x100141bef\ncall    qword ptr [rax+718h]                                           ; +0x62, 0x100141bf2\nadd     r15, 6F8h                                                      ; +0x68, 0x100141bf8\nmov     rdi, r15                                                       ; +0x6f, 0x100141bff\nmov     rsi, r14                                                       ; +0x72, 0x100141c02\ncall    sub_100278300                                                  ; +0x75, 0x100141c05\nadd     r12, 8                                                         ; +0x7a, 0x100141c0a\ncmp     r12, r13                                                       ; +0x7e, 0x100141c0e\njbe     short loc_100141BE0                                            ; +0x81, 0x100141c11\nmov     rdi, [rbx+0CE8h]                                               ; +0x83, 0x100141c13\njmp     short loc_100141C1E                                            ; +0x8a, 0x100141c1a\nxor     edi, edi                                                       ; +0x8c, 0x100141c1c\nmov     rsi, [rbx+0CF0h]                                               ; +0x8e, 0x100141c1e\nxor     edx, edx                                                       ; +0x95, 0x100141c25\ncall    LevelTools__sortChannelOrderObjects                            ; +0x97, 0x100141c27\nadd     rsp, 8                                                         ; +0x9c, 0x100141c2c\npop     rbx                                                            ; +0xa0, 0x100141c30\npop     r12                                                            ; +0xa1, 0x100141c31\npop     r13                                                            ; +0xa3, 0x100141c33\npop     r14                                                            ; +0xa5, 0x100141c35\npop     r15                                                            ; +0xa7, 0x100141c37\npop     rbp                                                            ; +0xa9, 0x100141c39\nretn                                                                   ; +0xaa, 0x100141c3a", "xrefs": ["PlayLayer::createObjectsFromSetupFinished @ 0x1000844be", "LevelEditorLayer::onPlaytest @ 0x1000c5e79"], "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"}