{"type": "func", "start": 4689880, "end": 4690012, "name": "GJBaseGameLayer::orderSpawnObjects", "pseudocode": "// \n// GJBaseGameLayer::orderSpawnObjects from 0x478fd8 to 0x47905c (132 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::createObjectsFromSetupFinished @ 0x31ad18\n// > LevelEditorLayer::onPlaytest @ 0x36eb72\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 GJBaseGameLayer::orderSpawnObjects(GJBaseGameLayer *a1)\n{\n  cocos2d::CCArray *m_spawnObjectsArray; // r3\n  cocos2d::ccArray *data; // r2\n  cocos2d::CCObject **arr; // r5\n  cocos2d::CCObject **v5; // r4\n  int v6; // r6\n  int v7; // t1\n  int v8; // r2\n  bool v9; // r3\n  _BYTE v10[8]; // [sp+4h] [bp-10h] 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    if ( data->num )\n    {\n      arr = data->arr;\n      v5 = &arr[data->num] + 0x3FFFFFFF;\n      while ( arr <= v5 )\n      {\n        v7 = (int)*arr++;\n        v6 = v7;\n        if ( !v7 )\n          break;\n        (*(void (__fastcall **)(_BYTE *, int))(*(_DWORD *)v6 + 900))(v10, v6);\n        cocos2d::CCPoint::operator=((PlayerObject *)(v6 + 1592), COERCE_FLOAT(v10), v8, v9);\n      }\n    }\n  }\n  LevelTools::sortChannelOrderObjects(a1->m_spawnObjectsArray, a1->m_spawnObjects, 0);\n}", "assembly": "; \n; GJBaseGameLayer::orderSpawnObjects from 0x478fd8 to 0x47905c (132 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::createObjectsFromSetupFinished @ 0x31ad18\n; > LevelEditorLayer::onPlaytest @ 0x36eb72\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.W          {R4-R9,LR}                                             ; +0x0, 0x478fd8\nSUB             SP, SP, #0x14                                          ; +0x4, 0x478fdc\nLDR.W           R8, =(__stack_chk_guard_ptr - 0x478FEC)                ; +0x6, 0x478fde\nMOV             R7, R0                                                 ; +0xa, 0x478fe2\nLDR.W           R0, [R0,#0x8D0]; this                                  ; +0xc, 0x478fe4\nADD             R8, PC; __stack_chk_guard_ptr                          ; +0x10, 0x478fe8\nLDR.W           R8, [R8]; __stack_chk_guard                            ; +0x12, 0x478fea\nLDR.W           R3, [R8]                                               ; +0x16, 0x478fee\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x1a, 0x478ff2\nBL              _ZN7cocos2d12CCDictionary16removeAllObjectsEv; cocos2d::CCDictionary::removeAllObjects(void) ; +0x1c, 0x478ff4\nLDR.W           R3, [R7,#0x8CC]; bool                                  ; +0x20, 0x478ff8\nCBNZ            R3, loc_47901A                                         ; +0x24, 0x478ffc\nMOVS            R2, #0; cocos2d::CCDictionary *                        ; +0x26, 0x478ffe\nLDR.W           R0, [R7,#0x8CC]; this                                  ; +0x28, 0x479000\nLDR.W           R1, [R7,#0x8D0]; cocos2d::CCArray *                    ; +0x2c, 0x479004\nBL              _ZN10LevelTools23sortChannelOrderObjectsEPN7cocos2d7CCArrayEPNS0_12CCDictionaryEb; LevelTools::sortChannelOrderObjects(cocos2d::CCArray *,cocos2d::CCDictionary *,bool) ; +0x30, 0x479008\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x34, 0x47900c\nLDR.W           R3, [R8]                                               ; +0x36, 0x47900e\nCMP             R2, R3                                                 ; +0x3a, 0x479012\nBEQ             loc_479056                                             ; +0x3c, 0x479014\nBLX             __stack_chk_fail                                       ; +0x3e, 0x479016\nLDR             R2, [R3,#0x34]                                         ; +0x42, 0x47901a\nLDR             R3, [R2]                                               ; +0x44, 0x47901c\nCMP             R3, #0                                                 ; +0x46, 0x47901e\nBEQ             loc_478FFE                                             ; +0x48, 0x479020\nADD.W           R3, R3, #0x40000000                                    ; +0x4a, 0x479022\nLDR             R5, [R2,#0xC]                                          ; +0x4e, 0x479026\nSUBS            R3, #1                                                 ; +0x50, 0x479028\nADD.W           R9, SP, #0x14+var_10                                   ; +0x52, 0x47902a\nADD.W           R4, R5, R3,LSL#2                                       ; +0x56, 0x47902e\nCMP             R5, R4                                                 ; +0x5a, 0x479032\nBHI             loc_478FFE                                             ; +0x5c, 0x479034\nLDR.W           R6, [R5],#4                                            ; +0x5e, 0x479036\nCMP             R6, #0                                                 ; +0x62, 0x47903a\nBEQ             loc_478FFE                                             ; +0x64, 0x47903c\nLDR             R3, [R6]                                               ; +0x66, 0x47903e\nMOV             R0, R9                                                 ; +0x68, 0x479040\nMOV             R1, R6                                                 ; +0x6a, 0x479042\nLDR.W           R3, [R3,#0x384]                                        ; +0x6c, 0x479044\nBLX             R3                                                     ; +0x70, 0x479048\nADD.W           R0, R6, #0x638                                         ; +0x72, 0x47904a\nMOV             R1, R9                                                 ; +0x76, 0x47904e\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x78, 0x479050\nB               loc_479032                                             ; +0x7c, 0x479054\nADD             SP, SP, #0x14                                          ; +0x7e, 0x479056\nPOP.W           {R4-R9,PC}                                             ; +0x80, 0x479058", "xrefs": ["PlayLayer::createObjectsFromSetupFinished @ 0x31ad18", "LevelEditorLayer::onPlaytest @ 0x36eb72"], "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"}