{"type": "func", "start": 5371092512, "end": 5371092686, "name": "GJBaseGameLayer::resetSpawnChannelIndex", "pseudocode": "// \n// GJBaseGameLayer::resetSpawnChannelIndex from 0x140245e20 to 0x140245ece (174 bytes)\n// \n// 6 xrefs:\n// > GJBaseGameLayer::resetLevelVariables @ 0x14023b93b\n// > LevelEditorLayer::updateGameObjects @ 0x1402dc8cd\n// > LevelEditorLayer::onPlaytest @ 0x1402e01c6\n// > <???> @ 0x14068246c\n// > <???> @ 0x14068247c\n// > <???> @ 0x1406ce610\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::resetSpawnChannelIndex(GJBaseGameLayer *a1)\n{\n  cocos2d::CCArray *v2; // rsi\n  unsigned int i; // edi\n  _BYTE v4[16]; // [rsp+20h] [rbp-38h] BYREF\n  _BYTE v5[40]; // [rsp+30h] [rbp-28h] BYREF\n  int v6; // [rsp+60h] [rbp+8h] BYREF\n\n  a1->m_gameState.m_currentChannel = 0;\n  v2 = cocos2d::CCDictionary::allKeys(a1->m_spawnObjects);\n  for ( i = 0;\n        i < cocos2d::CCArray::count(v2);\n        *(_BYTE *)(*(_QWORD *)sub_140250920(&a1->m_gameState.m_spawnChannelRelated1, v5) + 20LL) = 0 )\n  {\n    v6 = (int)cocos2d::CCArray::objectAtIndex(v2, i)[1].__vftable;\n    *(_DWORD *)(*(_QWORD *)sub_140060B20(\n                             &a1->m_gameState.m_spawnChannelRelated0._Traitsobj._Mypair._Myval2._Myval2,\n                             (__int64)v4,\n                             (unsigned __int8 *)&v6)\n              + 20LL) = 0;\n    ++i;\n  }\n}", "assembly": "; \n; GJBaseGameLayer::resetSpawnChannelIndex from 0x140245e20 to 0x140245ece (174 bytes)\n; \n; 6 xrefs:\n; > GJBaseGameLayer::resetLevelVariables @ 0x14023b93b\n; > LevelEditorLayer::updateGameObjects @ 0x1402dc8cd\n; > LevelEditorLayer::onPlaytest @ 0x1402e01c6\n; > <???> @ 0x14068246c\n; > <???> @ 0x14068247c\n; > <???> @ 0x1406ce610\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_10], rbx                                              ; +0x0, 0x140245e20\npush    rsi                                                            ; +0x5, 0x140245e25\npush    rdi                                                            ; +0x6, 0x140245e26\npush    r14                                                            ; +0x7, 0x140245e27\nsub     rsp, 40h                                                       ; +0x9, 0x140245e29\nmov     rbx, rcx                                                       ; +0xd, 0x140245e2d\nxor     r14d, r14d                                                     ; +0x10, 0x140245e30\nmov     [rcx+33Ch], r14d                                               ; +0x13, 0x140245e33\nmov     rcx, [rcx+0DD0h]                                               ; +0x1a, 0x140245e3a\ncall    cs:?allKeys@CCDictionary@cocos2d@@QEAAPEAVCCArray@2@XZ; cocos2d::CCDictionary::allKeys(void) ; +0x21, 0x140245e41\nmov     rcx, rax                                                       ; +0x27, 0x140245e47\nmov     rsi, rax                                                       ; +0x2a, 0x140245e4a\nmov     edi, r14d                                                      ; +0x2d, 0x140245e4d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x30, 0x140245e50\ntest    eax, eax                                                       ; +0x36, 0x140245e56\njz      short loc_140245EC0                                            ; +0x38, 0x140245e58\nmov     [rsp+58h+arg_8], rbp                                           ; +0x3a, 0x140245e5a\nnop                                                                    ; +0x3f, 0x140245e5f\nmov     edx, edi                                                       ; +0x40, 0x140245e60\nmov     rcx, rsi                                                       ; +0x42, 0x140245e62\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x45, 0x140245e65\nlea     r8, [rsp+58h+arg_0]                                            ; +0x4b, 0x140245e6b\nlea     rdx, [rsp+58h+var_38]                                          ; +0x50, 0x140245e70\nmov     ecx, [rax+38h]                                                 ; +0x55, 0x140245e75\nmov     [rsp+58h+arg_0], ecx                                           ; +0x58, 0x140245e78\nlea     rcx, [rbx+348h]                                                ; +0x5c, 0x140245e7c\ncall    sub_140060B20                                                  ; +0x63, 0x140245e83\nlea     r8, [rsp+58h+arg_0]                                            ; +0x68, 0x140245e88\nlea     rdx, [rsp+58h+var_28]                                          ; +0x6d, 0x140245e8d\nmov     rcx, [rax]                                                     ; +0x72, 0x140245e92\nmov     [rcx+14h], r14d                                                ; +0x75, 0x140245e95\nlea     rcx, [rbx+388h]                                                ; +0x79, 0x140245e99\ncall    sub_140250920                                                  ; +0x80, 0x140245ea0\ninc     edi                                                            ; +0x85, 0x140245ea5\nmov     rcx, [rax]                                                     ; +0x87, 0x140245ea7\nmov     [rcx+14h], r14b                                                ; +0x8a, 0x140245eaa\nmov     rcx, rsi                                                       ; +0x8e, 0x140245eae\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x91, 0x140245eb1\ncmp     edi, eax                                                       ; +0x97, 0x140245eb7\njb      short loc_140245E60                                            ; +0x99, 0x140245eb9\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x9b, 0x140245ebb\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xa0, 0x140245ec0\nadd     rsp, 40h                                                       ; +0xa5, 0x140245ec5\npop     r14                                                            ; +0xa9, 0x140245ec9\npop     rdi                                                            ; +0xab, 0x140245ecb\npop     rsi                                                            ; +0xac, 0x140245ecc\nretn                                                                   ; +0xad, 0x140245ecd", "xrefs": ["GJBaseGameLayer::resetLevelVariables @ 0x14023b93b", "LevelEditorLayer::updateGameObjects @ 0x1402dc8cd", "LevelEditorLayer::onPlaytest @ 0x1402e01c6", "<???> @ 0x14068246c", "<???> @ 0x14068247c", "<???> @ 0x1406ce610"], "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"}