{"type": "func", "start": 5372182832, "end": 5372183006, "name": "GJBaseGameLayer::resetSpawnChannelIndex", "pseudocode": "// \n// GJBaseGameLayer::resetSpawnChannelIndex from 0x140350130 to 0x1403501de (174 bytes)\n// \n// 6 xrefs:\n// > GJBaseGameLayer::resetLevelVariables @ 0x1403458d1\n// > LevelEditorLayer::updateGameObjects @ 0x1403fb174\n// > LevelEditorLayer::onPlaytest @ 0x1403fed84\n// > <???> @ 0x1408b881c\n// > <???> @ 0x1408b882c\n// > <???> @ 0x140920228\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 11:30:46 +0000\n// \n\nunsigned int __fastcall GJBaseGameLayer::resetSpawnChannelIndex(__int64 a1)\n{\n  cocos2d::CCArray *v2; // rsi\n  unsigned int v3; // edi\n  unsigned int result; // eax\n  _BYTE v5[16]; // [rsp+20h] [rbp-38h] BYREF\n  _BYTE v6[40]; // [rsp+30h] [rbp-28h] BYREF\n  int v7; // [rsp+60h] [rbp+8h] BYREF\n\n  *(_DWORD *)(a1 + 828) = 0;\n  v2 = cocos2d::CCDictionary::allKeys(*(cocos2d::CCDictionary **)(a1 + 3568));\n  v3 = 0;\n  result = cocos2d::CCArray::count(v2);\n  if ( result )\n  {\n    do\n    {\n      v7 = *((_DWORD *)cocos2d::CCArray::objectAtIndex(v2, v3) + 14);\n      *(_DWORD *)(*(_QWORD *)sub_140067F60((_QWORD *)(a1 + 840), (__int64)v5, (unsigned __int8 *)&v7) + 20LL) = 0;\n      ++v3;\n      *(_BYTE *)(*(_QWORD *)sub_140358A00(a1 + 904, v6) + 20LL) = 0;\n      result = cocos2d::CCArray::count(v2);\n    }\n    while ( v3 < result );\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::resetSpawnChannelIndex from 0x140350130 to 0x1403501de (174 bytes)\n; \n; 6 xrefs:\n; > GJBaseGameLayer::resetLevelVariables @ 0x1403458d1\n; > LevelEditorLayer::updateGameObjects @ 0x1403fb174\n; > LevelEditorLayer::onPlaytest @ 0x1403fed84\n; > <???> @ 0x1408b881c\n; > <???> @ 0x1408b882c\n; > <???> @ 0x140920228\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 11:30:46 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x140350130\npush    rsi                                                            ; +0x5, 0x140350135\npush    rdi                                                            ; +0x6, 0x140350136\npush    r14                                                            ; +0x7, 0x140350137\nsub     rsp, 40h                                                       ; +0x9, 0x140350139\nmov     rbx, rcx                                                       ; +0xd, 0x14035013d\nxor     r14d, r14d                                                     ; +0x10, 0x140350140\nmov     [rcx+33Ch], r14d                                               ; +0x13, 0x140350143\nmov     rcx, [rcx+0DF0h]                                               ; +0x1a, 0x14035014a\ncall    cs:?allKeys@CCDictionary@cocos2d@@QEAAPEAVCCArray@2@XZ; cocos2d::CCDictionary::allKeys(void) ; +0x21, 0x140350151\nmov     rcx, rax                                                       ; +0x27, 0x140350157\nmov     rsi, rax                                                       ; +0x2a, 0x14035015a\nmov     edi, r14d                                                      ; +0x2d, 0x14035015d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x30, 0x140350160\ntest    eax, eax                                                       ; +0x36, 0x140350166\njz      short loc_1403501D0                                            ; +0x38, 0x140350168\nmov     [rsp+58h+arg_8], rbp                                           ; +0x3a, 0x14035016a\nnop                                                                    ; +0x3f, 0x14035016f\nmov     edx, edi                                                       ; +0x40, 0x140350170\nmov     rcx, rsi                                                       ; +0x42, 0x140350172\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x45, 0x140350175\nlea     r8, [rsp+58h+arg_0]                                            ; +0x4b, 0x14035017b\nlea     rdx, [rsp+58h+var_38]                                          ; +0x50, 0x140350180\nmov     ecx, [rax+38h]                                                 ; +0x55, 0x140350185\nmov     [rsp+58h+arg_0], ecx                                           ; +0x58, 0x140350188\nlea     rcx, [rbx+348h]                                                ; +0x5c, 0x14035018c\ncall    sub_140067F60                                                  ; +0x63, 0x140350193\nlea     r8, [rsp+58h+arg_0]                                            ; +0x68, 0x140350198\nlea     rdx, [rsp+58h+var_28]                                          ; +0x6d, 0x14035019d\nmov     rcx, [rax]                                                     ; +0x72, 0x1403501a2\nmov     [rcx+14h], r14d                                                ; +0x75, 0x1403501a5\nlea     rcx, [rbx+388h]                                                ; +0x79, 0x1403501a9\ncall    sub_140358A00                                                  ; +0x80, 0x1403501b0\ninc     edi                                                            ; +0x85, 0x1403501b5\nmov     rcx, [rax]                                                     ; +0x87, 0x1403501b7\nmov     [rcx+14h], r14b                                                ; +0x8a, 0x1403501ba\nmov     rcx, rsi                                                       ; +0x8e, 0x1403501be\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x91, 0x1403501c1\ncmp     edi, eax                                                       ; +0x97, 0x1403501c7\njb      short loc_140350170                                            ; +0x99, 0x1403501c9\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x9b, 0x1403501cb\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xa0, 0x1403501d0\nadd     rsp, 40h                                                       ; +0xa5, 0x1403501d5\npop     r14                                                            ; +0xa9, 0x1403501d9\npop     rdi                                                            ; +0xab, 0x1403501db\npop     rsi                                                            ; +0xac, 0x1403501dc\nretn                                                                   ; +0xad, 0x1403501dd", "xrefs": ["GJBaseGameLayer::resetLevelVariables @ 0x1403458d1", "LevelEditorLayer::updateGameObjects @ 0x1403fb174", "LevelEditorLayer::onPlaytest @ 0x1403fed84", "<???> @ 0x1408b881c", "<???> @ 0x1408b882c", "<???> @ 0x140920228"], "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"}