{"type": "func", "start": 4652960, "end": 4653196, "name": "GJBaseGameLayer::spawnObjectsInOrder", "pseudocode": "// \n// GJBaseGameLayer::spawnObjectsInOrder from 0x46ffa0 to 0x47008c (236 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::spawnGroup @ 0x4817f0\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::spawnObjectsInOrder(\n        GJBaseGameLayer *a1,\n        cocos2d::CCArray *a2,\n        double a3,\n        std::vector<int> *const a4,\n        int a5,\n        int a6)\n{\n  cocos2d::ccArray *data; // r2\n  cocos2d::CCObject **arr; // r5\n  float v10; // s20\n  _BOOL4 m_spawnAbuse; // r6\n  cocos2d::CCObject **v12; // r10\n  bool *p_m_spawnAbuse; // r11\n  int v14; // r4\n  int v15; // t1\n  int isSpawnableTrigger; // r0\n  int (__fastcall *v17)(int); // r3\n  float v18; // s14\n\n  if ( !a1->m_spawnAbuse )\n  {\n    if ( a2 )\n    {\n      data = a2->data;\n      if ( data->num )\n      {\n        arr = data->arr;\n        v10 = 0.0;\n        m_spawnAbuse = a1->m_spawnAbuse;\n        v12 = &arr[data->num] + 0x3FFFFFFF;\n        p_m_spawnAbuse = &a1->m_spawnAbuse;\n        while ( 1 )\n        {\n          while ( 1 )\n          {\n            if ( arr > v12 )\n              return;\n            v15 = (int)*arr++;\n            v14 = v15;\n            if ( !v15 )\n              return;\n            if ( *(_DWORD *)(v14 + 1076) != 1 )\n              break;\n            isSpawnableTrigger = GameObject::isSpawnableTrigger((GameObject *)v14);\nLABEL_11:\n            if ( isSpawnableTrigger )\n            {\n              v17 = *(int (__fastcall **)(int))(*(_DWORD *)v14 + 96);\n              if ( !m_spawnAbuse )\n              {\n                v10 = *(float *)v17(v14);\nLABEL_15:\n                ((void (__fastcall *)(GJBaseGameLayer *, int, _DWORD, _DWORD, std::vector<int> *const))a1->spawnObject)(\n                  a1,\n                  v14,\n                  0,\n                  0,\n                  a4);\n                goto LABEL_17;\n              }\n              v18 = (float)(*(float *)v17(v14) - v10) / 311.580109 - a3;\n              if ( v18 <= 0.0 )\n                goto LABEL_15;\n              GJEffectManager::spawnObject(a1->m_effectManager, (GameObject *)v14, v18, a4, a5, a6);\nLABEL_17:\n              if ( *p_m_spawnAbuse )\n                return;\n              m_spawnAbuse = 1;\n            }\n          }\n          if ( *(_DWORD *)(v14 + 884) == 2065 )\n          {\n            isSpawnableTrigger = *(unsigned __int8 *)(v14 + 1229);\n            goto LABEL_11;\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::spawnObjectsInOrder from 0x46ffa0 to 0x47008c (236 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::spawnGroup @ 0x4817f0\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-R8,R10,R11,LR}                                     ; +0x0, 0x46ffa0\nMOV             R8, R0                                                 ; +0x4, 0x46ffa4\nVPUSH           {D8-D10}                                               ; +0x6, 0x46ffa6\nVMOV            D8, R2, R3                                             ; +0xa, 0x46ffaa\nMOVW            R3, #0x2C0C                                            ; +0xe, 0x46ffae\nLDRB            R3, [R0,R3]                                            ; +0x12, 0x46ffb2\nSUB             SP, SP, #8                                             ; +0x14, 0x46ffb4\nLDR             R7, [SP,#8+arg_0]                                      ; +0x16, 0x46ffb6\nCMP             R3, #0                                                 ; +0x18, 0x46ffb8\nBNE             loc_470082                                             ; +0x1a, 0x46ffba\nCMP             R1, #0                                                 ; +0x1c, 0x46ffbc\nBEQ             loc_470082                                             ; +0x1e, 0x46ffbe\nLDR             R2, [R1,#0x34]                                         ; +0x20, 0x46ffc0\nLDR             R4, [R2]                                               ; +0x22, 0x46ffc2\nCMP             R4, #0                                                 ; +0x24, 0x46ffc4\nBEQ             loc_470082                                             ; +0x26, 0x46ffc6\nADD.W           R4, R4, #0x40000000                                    ; +0x28, 0x46ffc8\nLDR             R5, [R2,#0xC]                                          ; +0x2c, 0x46ffcc\nSUBS            R4, #1                                                 ; +0x2e, 0x46ffce\nVLDR            S20, =0.0                                              ; +0x30, 0x46ffd0\nADD.W           R11, R0, #0x2C00                                       ; +0x34, 0x46ffd4\nMOV             R6, R3                                                 ; +0x38, 0x46ffd8\nADD.W           R10, R5, R4,LSL#2                                      ; +0x3a, 0x46ffda\nADD.W           R11, R11, #0xC                                         ; +0x3e, 0x46ffde\nVLDR            D9, =311.580109                                        ; +0x42, 0x46ffe2\nCMP             R5, R10                                                ; +0x46, 0x46ffe6\nBHI             loc_470082                                             ; +0x48, 0x46ffe8\nLDR.W           R4, [R5],#4                                            ; +0x4a, 0x46ffea\nCMP             R4, #0                                                 ; +0x4e, 0x46ffee\nBEQ             loc_470082                                             ; +0x50, 0x46fff0\nLDR.W           R2, [R4,#0x434]                                        ; +0x52, 0x46fff2\nCMP             R2, #1                                                 ; +0x56, 0x46fff6\nBNE             loc_470002                                             ; +0x58, 0x46fff8\nMOV             R0, R4; this                                           ; +0x5a, 0x46fffa\nBL              _ZN10GameObject18isSpawnableTriggerEv; GameObject::isSpawnableTrigger(void) ; +0x5c, 0x46fffc\nB               loc_470012                                             ; +0x60, 0x470000\nLDR.W           R1, [R4,#0x374]                                        ; +0x62, 0x470002\nMOVW            R2, #0x811                                             ; +0x66, 0x470006\nCMP             R1, R2                                                 ; +0x6a, 0x47000a\nBNE             loc_46FFE6                                             ; +0x6c, 0x47000c\nLDRB.W          R0, [R4,#0x4CD]                                        ; +0x6e, 0x47000e\nCMP             R0, #0                                                 ; +0x72, 0x470012\nBEQ             loc_46FFE6                                             ; +0x74, 0x470014\nLDR             R2, [R4]                                               ; +0x76, 0x470016\nMOV             R0, R4                                                 ; +0x78, 0x470018\nLDR             R3, [R2,#0x60]                                         ; +0x7a, 0x47001a\nCBNZ            R6, loc_470026                                         ; +0x7c, 0x47001c\nBLX             R3                                                     ; +0x7e, 0x47001e\nVLDR            S20, [R0]                                              ; +0x80, 0x470020\nB               loc_47004A                                             ; +0x84, 0x470024\nBLX             R3                                                     ; +0x86, 0x470026\nVLDR            S14, [R0]                                              ; +0x88, 0x470028\nVSUB.F32        S14, S14, S20                                          ; +0x8c, 0x47002c\nVCVT.F64.F32    D7, S14                                                ; +0x90, 0x470030\nVDIV.F64        D7, D7, D9                                             ; +0x94, 0x470034\nVSUB.F64        D7, D7, D8                                             ; +0x98, 0x470038\nVCVT.F32.F64    S14, D7                                                ; +0x9c, 0x47003c\nVCMPE.F32       S14, #0.0                                              ; +0xa0, 0x470040\nVMRS            APSR_nzcv, FPSCR                                       ; +0xa4, 0x470044\nBHI             loc_470060                                             ; +0xa8, 0x470048\nLDR.W           R3, [R8]                                               ; +0xaa, 0x47004a\nMOV             R0, R8                                                 ; +0xae, 0x47004e\nSTR             R7, [SP,#8+var_8]                                      ; +0xb0, 0x470050\nMOV             R1, R4                                                 ; +0xb2, 0x470052\nMOVS            R2, #0                                                 ; +0xb4, 0x470054\nLDR.W           R6, [R3,#0x270]                                        ; +0xb6, 0x470056\nMOVS            R3, #0                                                 ; +0xba, 0x47005a\nBLX             R6                                                     ; +0xbc, 0x47005c\nB               loc_470078                                             ; +0xbe, 0x47005e\nLDR             R3, [SP,#8+arg_4]                                      ; +0xc0, 0x470060\nMOV             R1, R4                                                 ; +0xc2, 0x470062\nLDR.W           R0, [R8,#0x690]                                        ; +0xc4, 0x470064\nVMOV            R2, S14                                                ; +0xc8, 0x470068\nSTR             R3, [SP,#8+var_8]                                      ; +0xcc, 0x47006c\nLDR             R3, [SP,#8+arg_8]                                      ; +0xce, 0x47006e\nSTR             R3, [SP,#8+var_4]                                      ; +0xd0, 0x470070\nMOV             R3, R7                                                 ; +0xd2, 0x470072\nBL              _ZN15GJEffectManager11spawnObjectEP10GameObjectfRKSt6vectorIiSaIiEEii; GJEffectManager::spawnObject(GameObject *,float,std::vector<int> const&,int,int) ; +0xd4, 0x470074\nLDRB.W          R3, [R11]                                              ; +0xd8, 0x470078\nCBNZ            R3, loc_470082                                         ; +0xdc, 0x47007c\nMOVS            R6, #1                                                 ; +0xde, 0x47007e\nB               loc_46FFE6                                             ; +0xe0, 0x470080\nADD             SP, SP, #8                                             ; +0xe2, 0x470082\nVPOP            {D8-D10}                                               ; +0xe4, 0x470084\nPOP.W           {R4-R8,R10,R11,PC}                                     ; +0xe8, 0x470088", "xrefs": ["GJBaseGameLayer::spawnGroup @ 0x4817f0"], "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"}