{"type": "func", "start": 5372611856, "end": 5372612262, "name": "PlayLayer::resetLevelFromStart", "pseudocode": "// \n// PlayLayer::resetLevelFromStart from 0x1403b8d10 to 0x1403b8ea6 (406 bytes)\n// \n// 4 xrefs:\n// > PlayLayer::fullReset @ 0x1403b8c79\n// > PlayLayer::togglePracticeMode @ 0x1403b9eab\n// > PlayLayer::resumeAndRestart @ 0x1403ba627\n// > <???> @ 0x1406d70a0\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\n// Hidden C++ exception states: #wind=5\nvoid PlayLayer::resetLevelFromStart(PlayLayer *a1)\n{\n  GameManager *v2; // rcx\n  bool GameVariable; // si\n  GameManager *v4; // rcx\n  __int64 v5; // rbx\n  GameManager *v6; // rcx\n  void *v7; // [rsp+30h] [rbp+8h]\n  void *v8; // [rsp+30h] [rbp+8h]\n  FMODAudioEngine *v9; // [rsp+30h] [rbp+8h]\n  void *v10; // [rsp+30h] [rbp+8h]\n\n  v2 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v7 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v2 = (GameManager *)qword_1406C2ED8;\n  }\n  GameVariable = GameManager::getGameVariable(v2, \"0146\");\n  v4 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v8 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v8);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v4 = (GameManager *)qword_1406C2ED8;\n  }\n  GameManager::setGameVariable(v4, \"0146\", 1);\n  a1->removeAllCheckpoints(a1);\n  v5 = qword_1406C2E88;\n  if ( !qword_1406C2E88 )\n  {\n    v9 = (FMODAudioEngine *)operator new(0x888u);\n    qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v9);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n    v5 = qword_1406C2E88;\n  }\n  if ( *(_QWORD *)(v5 + 552) )\n    FMOD::ChannelControl::stop(*(FMOD::ChannelControl **)(v5 + 552));\n  sub_14005E0D0((_QWORD *)(v5 + 1064));\n  sub_14005E0D0((_QWORD *)(v5 + 1128));\n  sub_14005E0D0((_QWORD *)(v5 + 1192));\n  a1->m_freezeStartCamera = 1;\n  a1->resetLevel(a1);\n  v6 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v10 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v6 = (GameManager *)qword_1406C2ED8;\n  }\n  GameManager::setGameVariable(v6, \"0146\", GameVariable);\n}", "assembly": "; \n; PlayLayer::resetLevelFromStart from 0x1403b8d10 to 0x1403b8ea6 (406 bytes)\n; \n; 4 xrefs:\n; > PlayLayer::fullReset @ 0x1403b8c79\n; > PlayLayer::togglePracticeMode @ 0x1403b9eab\n; > PlayLayer::resumeAndRestart @ 0x1403ba627\n; > <???> @ 0x1406d70a0\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_8], rbx                                               ; +0x0, 0x1403b8d10\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1403b8d15\npush    rdi                                                            ; +0xa, 0x1403b8d1a\nsub     rsp, 20h                                                       ; +0xb, 0x1403b8d1b\nmov     rdi, rcx                                                       ; +0xf, 0x1403b8d1f\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x12, 0x1403b8d22\ntest    rcx, rcx                                                       ; +0x19, 0x1403b8d29\njnz     short loc_1403B8D5D                                            ; +0x1c, 0x1403b8d2c\nmov     ecx, 668h; Size                                                ; +0x1e, 0x1403b8d2e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x23, 0x1403b8d33\nmov     [rsp+28h+arg_0], rax                                           ; +0x28, 0x1403b8d38\nmov     rcx, rax                                                       ; +0x2d, 0x1403b8d3d\ncall    sub_14017AB00                                                  ; +0x30, 0x1403b8d40\nnop                                                                    ; +0x35, 0x1403b8d45\nmov     cs:qword_1406C2ED8, rax                                        ; +0x36, 0x1403b8d46\nmov     rdx, [rax]                                                     ; +0x3d, 0x1403b8d4d\nmov     rcx, rax                                                       ; +0x40, 0x1403b8d50\ncall    qword ptr [rdx+48h]                                            ; +0x43, 0x1403b8d53\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x46, 0x1403b8d56\nlea     rdx, a0146; \"0146\"                                             ; +0x4d, 0x1403b8d5d\ncall    GameManager__getGameVariable                                   ; +0x54, 0x1403b8d64\nmovzx   esi, al                                                        ; +0x59, 0x1403b8d69\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x5c, 0x1403b8d6c\ntest    rcx, rcx                                                       ; +0x63, 0x1403b8d73\njnz     short loc_1403B8DA7                                            ; +0x66, 0x1403b8d76\nmov     ecx, 668h; Size                                                ; +0x68, 0x1403b8d78\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x6d, 0x1403b8d7d\nmov     [rsp+28h+arg_0], rax                                           ; +0x72, 0x1403b8d82\nmov     rcx, rax                                                       ; +0x77, 0x1403b8d87\ncall    sub_14017AB00                                                  ; +0x7a, 0x1403b8d8a\nnop                                                                    ; +0x7f, 0x1403b8d8f\nmov     cs:qword_1406C2ED8, rax                                        ; +0x80, 0x1403b8d90\nmov     rdx, [rax]                                                     ; +0x87, 0x1403b8d97\nmov     rcx, rax                                                       ; +0x8a, 0x1403b8d9a\ncall    qword ptr [rdx+48h]                                            ; +0x8d, 0x1403b8d9d\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x90, 0x1403b8da0\nmov     r8b, 1                                                         ; +0x97, 0x1403b8da7\nlea     rdx, a0146; \"0146\"                                             ; +0x9a, 0x1403b8daa\ncall    GameManager__setGameVariable                                   ; +0xa1, 0x1403b8db1\nmov     rax, [rdi]                                                     ; +0xa6, 0x1403b8db6\nmov     rcx, rdi                                                       ; +0xa9, 0x1403b8db9\ncall    qword ptr [rax+568h]                                           ; +0xac, 0x1403b8dbc\nmov     rbx, cs:qword_1406C2E88                                        ; +0xb2, 0x1403b8dc2\ntest    rbx, rbx                                                       ; +0xb9, 0x1403b8dc9\njnz     short loc_1403B8DFD                                            ; +0xbc, 0x1403b8dcc\nmov     ecx, 888h; Size                                                ; +0xbe, 0x1403b8dce\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xc3, 0x1403b8dd3\nmov     [rsp+28h+arg_0], rax                                           ; +0xc8, 0x1403b8dd8\nmov     rcx, rax                                                       ; +0xcd, 0x1403b8ddd\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0xd0, 0x1403b8de0\nnop                                                                    ; +0xd5, 0x1403b8de5\nmov     cs:qword_1406C2E88, rax                                        ; +0xd6, 0x1403b8de6\nmov     rdx, [rax]                                                     ; +0xdd, 0x1403b8ded\nmov     rcx, rax                                                       ; +0xe0, 0x1403b8df0\ncall    qword ptr [rdx+48h]                                            ; +0xe3, 0x1403b8df3\nmov     rbx, cs:qword_1406C2E88                                        ; +0xe6, 0x1403b8df6\ncmp     qword ptr [rbx+228h], 0                                        ; +0xed, 0x1403b8dfd\njz      short loc_1403B8E14                                            ; +0xf5, 0x1403b8e05\nmov     rcx, [rbx+228h]                                                ; +0xf7, 0x1403b8e07\ncall    cs:?stop@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@XZ; FMOD::ChannelControl::stop(void) ; +0xfe, 0x1403b8e0e\nlea     rcx, [rbx+428h]                                                ; +0x104, 0x1403b8e14\ncall    sub_14005E0D0                                                  ; +0x10b, 0x1403b8e1b\nlea     rcx, [rbx+468h]                                                ; +0x110, 0x1403b8e20\ncall    sub_14005E0D0                                                  ; +0x117, 0x1403b8e27\nlea     rcx, [rbx+4A8h]                                                ; +0x11c, 0x1403b8e2c\ncall    sub_14005E0D0                                                  ; +0x123, 0x1403b8e33\nmov     byte ptr [rdi+3231h], 1                                        ; +0x128, 0x1403b8e38\nmov     rax, [rdi]                                                     ; +0x12f, 0x1403b8e3f\nmov     rcx, rdi                                                       ; +0x132, 0x1403b8e42\ncall    qword ptr [rax+580h]                                           ; +0x135, 0x1403b8e45\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x13b, 0x1403b8e4b\ntest    rcx, rcx                                                       ; +0x142, 0x1403b8e52\njnz     short loc_1403B8E87                                            ; +0x145, 0x1403b8e55\nmov     ecx, 668h; Size                                                ; +0x147, 0x1403b8e57\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x14c, 0x1403b8e5c\nmov     [rsp+28h+arg_0], rax                                           ; +0x151, 0x1403b8e61\nmov     rcx, rax                                                       ; +0x156, 0x1403b8e66\ncall    sub_14017AB00                                                  ; +0x159, 0x1403b8e69\nnop                                                                    ; +0x15e, 0x1403b8e6e\nmov     cs:qword_1406C2ED8, rax                                        ; +0x15f, 0x1403b8e6f\nmov     r8, [rax]                                                      ; +0x166, 0x1403b8e76\nmov     rcx, rax                                                       ; +0x169, 0x1403b8e79\ncall    qword ptr [r8+48h]                                             ; +0x16c, 0x1403b8e7c\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x170, 0x1403b8e80\nmovzx   r8d, sil                                                       ; +0x177, 0x1403b8e87\nlea     rdx, a0146; \"0146\"                                             ; +0x17b, 0x1403b8e8b\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x182, 0x1403b8e92\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x187, 0x1403b8e97\nadd     rsp, 20h                                                       ; +0x18c, 0x1403b8e9c\npop     rdi                                                            ; +0x190, 0x1403b8ea0\njmp     GameManager__setGameVariable                                   ; +0x191, 0x1403b8ea1", "xrefs": ["PlayLayer::fullReset @ 0x1403b8c79", "PlayLayer::togglePracticeMode @ 0x1403b9eab", "PlayLayer::resumeAndRestart @ 0x1403ba627", "<???> @ 0x1406d70a0"], "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"}