{"type": "func", "start": 4297094240, "end": 4297094392, "name": "GJBaseGameLayer::orderSpawnObjects", "pseudocode": "// \n// GJBaseGameLayer::orderSpawnObjects from 0x100207460 to 0x1002074f8 (152 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::createObjectsFromSetupFinished @ 0x10011c228\n// > LevelEditorLayer::onPlaytest @ 0x100362d8c\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  cocos2d::CCArray *m_spawnObjectsArray; // x0\n  cocos2d::ccArray *data; // x9\n  __int64 num; // x8\n  cocos2d::CCObject **arr; // x21\n  unsigned __int64 v6; // x22\n  cocos2d::CCObject *v7; // x20\n  __int64 v8; // [xsp+8h] [xbp-28h] BYREF\n\n  cocos2d::CCDictionary::removeAllObjects(a1->m_spawnObjects);\n  m_spawnObjectsArray = a1->m_spawnObjectsArray;\n  if ( m_spawnObjectsArray )\n  {\n    data = m_spawnObjectsArray->data;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      arr = data->arr;\n      v6 = (unsigned __int64)&arr[num - 1];\n      do\n      {\n        v7 = *arr;\n        if ( !*arr )\n          break;\n        ((void (__fastcall *)(__int64 *__return_ptr, cocos2d::CCObject *))v7->__vftable[22].update)(&v8, *arr);\n        sub_1000229D0(&v7[31].m_uOrderOfArrival, (double *)&v8);\n        ++arr;\n      }\n      while ( (unsigned __int64)arr <= v6 );\n      m_spawnObjectsArray = a1->m_spawnObjectsArray;\n    }\n  }\n  LevelTools::sortChannelOrderObjects(m_spawnObjectsArray, a1->m_spawnObjects, 0);\n}", "assembly": "; \n; GJBaseGameLayer::orderSpawnObjects from 0x100207460 to 0x1002074f8 (152 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::createObjectsFromSetupFinished @ 0x10011c228\n; > LevelEditorLayer::onPlaytest @ 0x100362d8c\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\nSUB             SP, SP, #0x40                                          ; +0x0, 0x100207460\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x100207464\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x100207468\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x10020746c\nADD             X29, SP, #0x30                                         ; +0x10, 0x100207470\nMOV             X19, X0                                                ; +0x14, 0x100207474\nLDR             X0, [X0,#0xCF8]                                        ; +0x18, 0x100207478\nBL              cocos2d__CCDictionary__removeAllObjects                ; +0x1c, 0x10020747c\nLDR             X0, [X19,#0xCF0]                                       ; +0x20, 0x100207480\nCBZ             X0, loc_1002074D8                                      ; +0x24, 0x100207484\nLDR             X9, [X0,#0x38]                                         ; +0x28, 0x100207488\nLDR             W8, [X9]                                               ; +0x2c, 0x10020748c\nCBZ             W8, loc_1002074D8                                      ; +0x30, 0x100207490\nLDR             X21, [X9,#0x10]                                        ; +0x34, 0x100207494\nADD             X8, X21, X8,LSL#3                                      ; +0x38, 0x100207498\nSUB             X22, X8, #8                                            ; +0x3c, 0x10020749c\nLDR             X20, [X21]                                             ; +0x40, 0x1002074a0\nCBZ             X20, loc_1002074D4                                     ; +0x44, 0x1002074a4\nLDR             X8, [X20]                                              ; +0x48, 0x1002074a8\nLDR             X9, [X8,#0x708]                                        ; +0x4c, 0x1002074ac\nADD             X8, SP, #0x30+var_28                                   ; +0x50, 0x1002074b0\nMOV             X0, X20                                                ; +0x54, 0x1002074b4\nBLR             X9                                                     ; +0x58, 0x1002074b8\nADD             X0, X20, #0x6F8                                        ; +0x5c, 0x1002074bc\nADD             X1, SP, #0x30+var_28                                   ; +0x60, 0x1002074c0\nBL              sub_1000229D0                                          ; +0x64, 0x1002074c4\nADD             X21, X21, #8                                           ; +0x68, 0x1002074c8\nCMP             X21, X22                                               ; +0x6c, 0x1002074cc\nB.LS            loc_1002074A0                                          ; +0x70, 0x1002074d0\nLDR             X0, [X19,#0xCF0]                                       ; +0x74, 0x1002074d4\nLDR             X1, [X19,#0xCF8]                                       ; +0x78, 0x1002074d8\nMOV             W2, #0                                                 ; +0x7c, 0x1002074dc\nBL              LevelTools__sortChannelOrderObjects                    ; +0x80, 0x1002074e0\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x84, 0x1002074e4\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x88, 0x1002074e8\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x8c, 0x1002074ec\nADD             SP, SP, #0x40 ; '@'                                    ; +0x90, 0x1002074f0\nRET                                                                    ; +0x94, 0x1002074f4", "xrefs": ["PlayLayer::createObjectsFromSetupFinished @ 0x10011c228", "LevelEditorLayer::onPlaytest @ 0x100362d8c"], "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"}