{"type": "func", "start": 5371092336, "end": 5371092508, "name": "GJBaseGameLayer::orderSpawnObjects", "pseudocode": "// \n// GJBaseGameLayer::orderSpawnObjects from 0x140245d70 to 0x140245e1c (172 bytes)\n// \n// 5 xrefs:\n// > LevelEditorLayer::onPlaytest @ 0x1402e01be\n// > PlayLayer::createObjectsFromSetupFinished @ 0x1403adc1a\n// > <???> @ 0x140682414\n// > <???> @ 0x140682448\n// > <???> @ 0x1406ce5d4\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; // rdi\n  cocos2d::ccArray *data; // rdi\n  __int64 num; // rax\n  cocos2d::CCObject **arr; // rdi\n  cocos2d::CCObject **i; // rbp\n  cocos2d::CCObject *v7; // rbx\n  __int64 v8; // rax\n  char v9; // [rsp+30h] [rbp+8h] 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      for ( i = &arr[num - 1]; arr <= i; ++arr )\n      {\n        v7 = *arr;\n        if ( !*arr )\n          break;\n        v8 = ((__int64 (__fastcall *)(cocos2d::CCObject *, char *))v7->__vftable[22].setTag)(*arr, &v9);\n        cocos2d::CCPoint::operator=(&v7[32].m_uID, v8);\n      }\n    }\n  }\n  LevelTools::sortChannelOrderObjects(a1->m_spawnObjectsArray, a1->m_spawnObjects, 0);\n}", "assembly": "; \n; GJBaseGameLayer::orderSpawnObjects from 0x140245d70 to 0x140245e1c (172 bytes)\n; \n; 5 xrefs:\n; > LevelEditorLayer::onPlaytest @ 0x1402e01be\n; > PlayLayer::createObjectsFromSetupFinished @ 0x1403adc1a\n; > <???> @ 0x140682414\n; > <???> @ 0x140682448\n; > <???> @ 0x1406ce5d4\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\nmov     [rsp+arg_18], rsi                                              ; +0x0, 0x140245d70\npush    rdi                                                            ; +0x5, 0x140245d75\nsub     rsp, 20h                                                       ; +0x6, 0x140245d76\nmov     rsi, rcx                                                       ; +0xa, 0x140245d7a\nmov     rcx, [rcx+0DD0h]                                               ; +0xd, 0x140245d7d\ncall    cs:?removeAllObjects@CCDictionary@cocos2d@@QEAAXXZ; cocos2d::CCDictionary::removeAllObjects(void) ; +0x14, 0x140245d84\nmov     rdi, [rsi+0DC8h]                                               ; +0x1a, 0x140245d8a\ntest    rdi, rdi                                                       ; +0x21, 0x140245d91\njz      short loc_140245DFC                                            ; +0x24, 0x140245d94\nmov     rdi, [rdi+38h]                                                 ; +0x26, 0x140245d96\nmov     eax, [rdi]                                                     ; +0x2a, 0x140245d9a\ntest    eax, eax                                                       ; +0x2c, 0x140245d9c\njz      short loc_140245DFC                                            ; +0x2e, 0x140245d9e\nmov     rdi, [rdi+10h]                                                 ; +0x30, 0x140245da0\nmov     [rsp+28h+arg_10], rbp                                          ; +0x34, 0x140245da4\nlea     rbp, [rax-1]                                                   ; +0x39, 0x140245da9\nlea     rbp, [rdi+rbp*8]                                               ; +0x3d, 0x140245dad\ncmp     rdi, rbp                                                       ; +0x41, 0x140245db1\nja      short loc_140245DF7                                            ; +0x44, 0x140245db4\nmov     [rsp+28h+arg_8], rbx                                           ; +0x46, 0x140245db6\nnop     dword ptr [rax+rax+00h]                                        ; +0x4b, 0x140245dbb\nmov     rbx, [rdi]                                                     ; +0x50, 0x140245dc0\ntest    rbx, rbx                                                       ; +0x53, 0x140245dc3\njz      short loc_140245DF2                                            ; +0x56, 0x140245dc6\nmov     rax, [rbx]                                                     ; +0x58, 0x140245dc8\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x5b, 0x140245dcb\nmov     rcx, rbx                                                       ; +0x60, 0x140245dd0\ncall    qword ptr [rax+670h]                                           ; +0x63, 0x140245dd3\nmov     rdx, rax                                                       ; +0x69, 0x140245dd9\nlea     rcx, [rbx+708h]                                                ; +0x6c, 0x140245ddc\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x73, 0x140245de3\nadd     rdi, 8                                                         ; +0x79, 0x140245de9\ncmp     rdi, rbp                                                       ; +0x7d, 0x140245ded\njbe     short loc_140245DC0                                            ; +0x80, 0x140245df0\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x82, 0x140245df2\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x87, 0x140245df7\nmov     rdx, [rsi+0DD0h]                                               ; +0x8c, 0x140245dfc\nxor     r8d, r8d                                                       ; +0x93, 0x140245e03\nmov     rcx, [rsi+0DC8h]                                               ; +0x96, 0x140245e06\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x9d, 0x140245e0d\nadd     rsp, 20h                                                       ; +0xa2, 0x140245e12\npop     rdi                                                            ; +0xa6, 0x140245e16\njmp     LevelTools__sortChannelOrderObjects                            ; +0xa7, 0x140245e17", "xrefs": ["LevelEditorLayer::onPlaytest @ 0x1402e01be", "PlayLayer::createObjectsFromSetupFinished @ 0x1403adc1a", "<???> @ 0x140682414", "<???> @ 0x140682448", "<???> @ 0x1406ce5d4"], "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"}