{"type": "func", "start": 5372269472, "end": 5372270017, "name": "GJEffectManager::reset", "pseudocode": "// \n// GJEffectManager::reset from 0x1403653a0 to 0x1403655c1 (545 bytes)\n// \n// 6 xrefs:\n// > GJEffectManager::loadFromState @ 0x14036ebdc\n// > LevelEditorLayer::updateGameObjects @ 0x1403faada\n// > LevelEditorLayer::onPlaytest @ 0x1403fea1a\n// > LevelEditorLayer::onStopPlaytest @ 0x1404004fe\n// > PlayLayer::loadDefaultColors @ 0x140510798\n// > <???> @ 0x1409215f0\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:54 +0000\n// \n\n__int64 __fastcall GJEffectManager::reset(__int64 a1)\n{\n  _QWORD *v2; // rdx\n  _QWORD *v3; // rax\n  __int64 i; // rcx\n  __int64 v5; // rcx\n  char *v6; // rdx\n  char *v7; // rcx\n  __int64 j; // rcx\n  __int64 v9; // rcx\n  __int64 v10; // rcx\n  __int64 k; // rdx\n  __int64 v12; // rcx\n  __int64 v13; // rsi\n  __int64 v14; // rbx\n  __int64 result; // rax\n\n  sub_14003EB60((_QWORD *)(a1 + 672));\n  cocos2d::CCDictionary::removeAllObjects(*(cocos2d::CCDictionary **)(a1 + 632));\n  cocos2d::CCDictionary::removeAllObjects(*(cocos2d::CCDictionary **)(a1 + 640));\n  cocos2d::CCDictionary::removeAllObjects(*(cocos2d::CCDictionary **)(a1 + 328));\n  v2 = (_QWORD *)(a1 + 736);\n  v3 = *(_QWORD **)(a1 + 736);\n  if ( (unsigned __int64)v3 > a1 + 736 || v3 + 1101 < v2 )\n  {\n    v5 = 137;\n    do\n    {\n      *v3 = 0;\n      v3[1] = 0;\n      v3[2] = 0;\n      v3 += 8;\n      *(v3 - 5) = 0;\n      *(v3 - 4) = 0;\n      *(v3 - 3) = 0;\n      *(v3 - 2) = 0;\n      *(v3 - 1) = 0;\n      --v5;\n    }\n    while ( v5 );\n    *v3 = 0;\n    v3[1] = 0;\n    v3[2] = 0;\n    v3[3] = 0;\n    v3[4] = 0;\n    v3[5] = 0;\n  }\n  else\n  {\n    for ( i = 0; i <= 8808; i += 8 )\n      *(_QWORD *)(i + *v2) = 0;\n  }\n  v6 = (char *)(a1 + 648);\n  v7 = *(char **)(a1 + 648);\n  if ( (unsigned __int64)v7 > a1 + 648 || v7 + 79992 < v6 )\n  {\n    memset(v7, 0, 0x13880u);\n  }\n  else\n  {\n    for ( j = 0; j <= 79992; j += 8 )\n      *(_QWORD *)(j + *(_QWORD *)v6) = 0;\n  }\n  v9 = *(_QWORD *)(a1 + 336);\n  if ( v9 )\n  {\n    v10 = *(_QWORD *)(v9 + 56);\n    if ( v10 )\n    {\n      for ( k = *(_QWORD *)(v10 + 288); ; k = *(_QWORD *)(k + 288) )\n      {\n        v12 = *(_QWORD *)(v10 + 264);\n        *(_WORD *)(v12 + 324) = -1;\n        *(_BYTE *)(v12 + 326) = -1;\n        *(_WORD *)(v12 + 327) = -1;\n        *(_BYTE *)(v12 + 329) = -1;\n        *(_DWORD *)(v12 + 320) = 1132396544;\n        *(_QWORD *)(v12 + 344) = 0;\n        v10 = k;\n        if ( !k )\n          break;\n      }\n    }\n  }\n  GJEffectManager::resetEffects(a1);\n  v13 = *(_QWORD *)(a1 + 1560);\n  v14 = *(_QWORD *)(a1 + 1552);\n  if ( v14 != v13 )\n  {\n    do\n    {\n      sub_140069730(v14 + 488);\n      sub_1403620A0(v14 + 440);\n      v14 += 520;\n    }\n    while ( v14 != v13 );\n    *(_QWORD *)(a1 + 1560) = *(_QWORD *)(a1 + 1552);\n  }\n  sub_14036FB50(a1 + 1576);\n  sub_140066610((_QWORD *)(a1 + 1752));\n  result = *(_QWORD *)(a1 + 1944);\n  if ( result != *(_QWORD *)(a1 + 1952) )\n    *(_QWORD *)(a1 + 1952) = result;\n  return result;\n}", "assembly": "; \n; GJEffectManager::reset from 0x1403653a0 to 0x1403655c1 (545 bytes)\n; \n; 6 xrefs:\n; > GJEffectManager::loadFromState @ 0x14036ebdc\n; > LevelEditorLayer::updateGameObjects @ 0x1403faada\n; > LevelEditorLayer::onPlaytest @ 0x1403fea1a\n; > LevelEditorLayer::onStopPlaytest @ 0x1404004fe\n; > PlayLayer::loadDefaultColors @ 0x140510798\n; > <???> @ 0x1409215f0\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:54 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1403653a0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1403653a5\npush    rdi                                                            ; +0xa, 0x1403653aa\nsub     rsp, 20h                                                       ; +0xb, 0x1403653ab\nmov     rdi, rcx                                                       ; +0xf, 0x1403653af\nadd     rcx, 2A0h                                                      ; +0x12, 0x1403653b2\ncall    sub_14003EB60                                                  ; +0x19, 0x1403653b9\nmov     rcx, [rdi+278h]                                                ; +0x1e, 0x1403653be\ncall    cs:?removeAllObjects@CCDictionary@cocos2d@@QEAAXXZ; cocos2d::CCDictionary::removeAllObjects(void) ; +0x25, 0x1403653c5\nmov     rcx, [rdi+280h]                                                ; +0x2b, 0x1403653cb\ncall    cs:?removeAllObjects@CCDictionary@cocos2d@@QEAAXXZ; cocos2d::CCDictionary::removeAllObjects(void) ; +0x32, 0x1403653d2\nmov     rcx, [rdi+148h]                                                ; +0x38, 0x1403653d8\ncall    cs:?removeAllObjects@CCDictionary@cocos2d@@QEAAXXZ; cocos2d::CCDictionary::removeAllObjects(void) ; +0x3f, 0x1403653df\nlea     rdx, [rdi+2E0h]                                                ; +0x45, 0x1403653e5\nxor     ebx, ebx                                                       ; +0x4c, 0x1403653ec\nmov     rax, [rdx]                                                     ; +0x4e, 0x1403653ee\nlea     rcx, [rax+2268h]                                               ; +0x51, 0x1403653f1\ncmp     rax, rdx                                                       ; +0x58, 0x1403653f8\nja      short loc_140365426                                            ; +0x5b, 0x1403653fb\ncmp     rcx, rdx                                                       ; +0x5d, 0x1403653fd\njb      short loc_140365426                                            ; +0x60, 0x140365400\nlea     rcx, ds:0[rbx*8]                                               ; +0x62, 0x140365402\nnop     word ptr [rax+rax+00h]                                         ; +0x6a, 0x14036540a\nmov     rax, [rdx]                                                     ; +0x70, 0x140365410\nmov     [rcx+rax], rbx                                                 ; +0x73, 0x140365413\nadd     rcx, 8                                                         ; +0x77, 0x140365417\ncmp     rcx, 2268h                                                     ; +0x7b, 0x14036541b\njle     short loc_140365410                                            ; +0x82, 0x140365422\njmp     short loc_140365470                                            ; +0x84, 0x140365424\nmov     ecx, 89h                                                       ; +0x86, 0x140365426\nnop     dword ptr [rax+rax+00h]                                        ; +0x8b, 0x14036542b\nmov     [rax], rbx                                                     ; +0x90, 0x140365430\nmov     [rax+8], rbx                                                   ; +0x93, 0x140365433\nmov     [rax+10h], rbx                                                 ; +0x97, 0x140365437\nlea     rax, [rax+40h]                                                 ; +0x9b, 0x14036543b\nmov     [rax-28h], rbx                                                 ; +0x9f, 0x14036543f\nmov     [rax-20h], rbx                                                 ; +0xa3, 0x140365443\nmov     [rax-18h], rbx                                                 ; +0xa7, 0x140365447\nmov     [rax-10h], rbx                                                 ; +0xab, 0x14036544b\nmov     [rax-8], rbx                                                   ; +0xaf, 0x14036544f\nsub     rcx, 1                                                         ; +0xb3, 0x140365453\njnz     short loc_140365430                                            ; +0xb7, 0x140365457\nmov     [rax], rbx                                                     ; +0xb9, 0x140365459\nmov     [rax+8], rbx                                                   ; +0xbc, 0x14036545c\nmov     [rax+10h], rbx                                                 ; +0xc0, 0x140365460\nmov     [rax+18h], rbx                                                 ; +0xc4, 0x140365464\nmov     [rax+20h], rbx                                                 ; +0xc8, 0x140365468\nmov     [rax+28h], rbx                                                 ; +0xcc, 0x14036546c\nlea     rdx, [rdi+288h]                                                ; +0xd0, 0x140365470\nmov     rcx, [rdx]; void *                                             ; +0xd7, 0x140365477\nlea     rax, [rcx+13878h]                                              ; +0xda, 0x14036547a\ncmp     rcx, rdx                                                       ; +0xe1, 0x140365481\nja      short loc_1403654A9                                            ; +0xe4, 0x140365484\ncmp     rax, rdx                                                       ; +0xe6, 0x140365486\njb      short loc_1403654A9                                            ; +0xe9, 0x140365489\nlea     rcx, ds:0[rbx*8]                                               ; +0xeb, 0x14036548b\nmov     rax, [rdx]                                                     ; +0xf3, 0x140365493\nmov     [rcx+rax], rbx                                                 ; +0xf6, 0x140365496\nadd     rcx, 8                                                         ; +0xfa, 0x14036549a\ncmp     rcx, 13878h                                                    ; +0xfe, 0x14036549e\njle     short loc_140365493                                            ; +0x105, 0x1403654a5\njmp     short loc_1403654B6                                            ; +0x107, 0x1403654a7\nxor     edx, edx; Val                                                  ; +0x109, 0x1403654a9\nmov     r8d, 13880h; Size                                              ; +0x10b, 0x1403654ab\ncall    memset                                                         ; +0x111, 0x1403654b1\nmov     rcx, [rdi+150h]                                                ; +0x116, 0x1403654b6\ntest    rcx, rcx                                                       ; +0x11d, 0x1403654bd\njz      short loc_140365531                                            ; +0x120, 0x1403654c0\nmov     rcx, [rcx+38h]                                                 ; +0x122, 0x1403654c2\ntest    rcx, rcx                                                       ; +0x126, 0x1403654c6\njz      short loc_140365531                                            ; +0x129, 0x1403654c9\nmov     rdx, [rcx+120h]                                                ; +0x12b, 0x1403654cb\nmovzx   eax, cs:word_140703460                                         ; +0x132, 0x1403654d2\nmov     rcx, [rcx+108h]                                                ; +0x139, 0x1403654d9\nmov     [rcx+144h], ax                                                 ; +0x140, 0x1403654e0\nmovzx   eax, cs:byte_140703462                                         ; +0x147, 0x1403654e7\nmov     [rcx+146h], al                                                 ; +0x14e, 0x1403654ee\nmovzx   eax, cs:word_140703460                                         ; +0x154, 0x1403654f4\nmov     [rcx+147h], ax                                                 ; +0x15b, 0x1403654fb\nmovzx   eax, cs:byte_140703462                                         ; +0x162, 0x140365502\nmov     [rcx+149h], al                                                 ; +0x169, 0x140365509\nmov     dword ptr [rcx+140h], 437F0000h                                ; +0x16f, 0x14036550f\nmov     [rcx+158h], rbx                                                ; +0x179, 0x140365519\nmov     rcx, rdx                                                       ; +0x180, 0x140365520\ntest    rdx, rdx                                                       ; +0x183, 0x140365523\njz      short loc_140365531                                            ; +0x186, 0x140365526\nmov     rdx, [rdx+120h]                                                ; +0x188, 0x140365528\njmp     short loc_1403654D2                                            ; +0x18f, 0x14036552f\nmov     rcx, rdi                                                       ; +0x191, 0x140365531\ncall    GJEffectManager__resetEffects                                  ; +0x194, 0x140365534\nmov     rsi, [rdi+618h]                                                ; +0x199, 0x140365539\nmov     rbx, [rdi+610h]                                                ; +0x1a0, 0x140365540\ncmp     rbx, rsi                                                       ; +0x1a7, 0x140365547\njz      short loc_140365582                                            ; +0x1aa, 0x14036554a\nnop     dword ptr [rax+00h]                                            ; +0x1ac, 0x14036554c\nlea     rcx, [rbx+1E8h]                                                ; +0x1b0, 0x140365550\ncall    sub_140069730                                                  ; +0x1b7, 0x140365557\nlea     rcx, [rbx+1B8h]                                                ; +0x1bc, 0x14036555c\ncall    sub_1403620A0                                                  ; +0x1c3, 0x140365563\nadd     rbx, 208h                                                      ; +0x1c8, 0x140365568\ncmp     rbx, rsi                                                       ; +0x1cf, 0x14036556f\njnz     short loc_140365550                                            ; +0x1d2, 0x140365572\nmov     rax, [rdi+610h]                                                ; +0x1d4, 0x140365574\nmov     [rdi+618h], rax                                                ; +0x1db, 0x14036557b\nlea     rcx, [rdi+628h]                                                ; +0x1e2, 0x140365582\ncall    sub_14036FB50                                                  ; +0x1e9, 0x140365589\nlea     rcx, [rdi+6D8h]                                                ; +0x1ee, 0x14036558e\ncall    sub_140066610                                                  ; +0x1f5, 0x140365595\nmov     rax, [rdi+798h]                                                ; +0x1fa, 0x14036559a\ncmp     rax, [rdi+7A0h]                                                ; +0x201, 0x1403655a1\njz      short loc_1403655B1                                            ; +0x208, 0x1403655a8\nmov     [rdi+7A0h], rax                                                ; +0x20a, 0x1403655aa\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x211, 0x1403655b1\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x216, 0x1403655b6\nadd     rsp, 20h                                                       ; +0x21b, 0x1403655bb\npop     rdi                                                            ; +0x21f, 0x1403655bf\nretn                                                                   ; +0x220, 0x1403655c0", "xrefs": ["GJEffectManager::loadFromState @ 0x14036ebdc", "LevelEditorLayer::updateGameObjects @ 0x1403faada", "LevelEditorLayer::onPlaytest @ 0x1403fea1a", "LevelEditorLayer::onStopPlaytest @ 0x1404004fe", "PlayLayer::loadDefaultColors @ 0x140510798", "<???> @ 0x1409215f0"], "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"}