{"type": "func", "start": 4298717928, "end": 4298718168, "name": "EndLevelLayer::onReplay", "pseudocode": "// \n// EndLevelLayer::onReplay from 0x100393ae8 to 0x100393bd8 (240 bytes)\n// \n// 2 xrefs:\n// > EndLevelLayer::keyDown @ 0x1003954c4\n// > EndLevelLayer::customSetup @ 0x100392c90\n// \n// This function is hookable on this platform (idp: arm, 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:03:39 +0000\n// \n\ndouble __fastcall EndLevelLayer::onReplay(_BYTE *a1)\n{\n  __int64 v2; // x0\n  char v3; // w0\n  __int64 v4; // x0\n  __int64 v5; // x20\n  double result; // d0\n  void *__p[2]; // [xsp+8h] [xbp-28h] BYREF\n  char v8; // [xsp+1Fh] [xbp-11h]\n\n  if ( (a1[619] & 1) == 0 )\n  {\n    a1[619] = 1;\n    v2 = GameManager::sharedState(a1);\n    GameManager::getGameVariable(v2, \"0024\");\n    if ( (v3 & 1) == 0 )\n      PlatformToolbox::hideCursor();\n    v4 = FMODAudioEngine::sharedEngine();\n    FMODAudioEngine::clearAllAudio(v4);\n    v5 = FMODAudioEngine::sharedEngine();\n    sub_100009900(__p, \"playSound_01.ogg\");\n    FMODAudioEngine::playEffect(v5, (__int64)__p, 1.0, 0.0, 0.3);\n    if ( v8 < 0 )\n      operator delete(__p[0]);\n    (*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)a1 + 1320LL))(a1, 0);\n    (*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)a1 + 1000LL))(a1, 0);\n    (*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)a1 + 1088LL))(a1, 0);\n    (*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);\n    return sub_10014B2C0(*((_BYTE **)a1 + 76));\n  }\n  return result;\n}", "assembly": "; \n; EndLevelLayer::onReplay from 0x100393ae8 to 0x100393bd8 (240 bytes)\n; \n; 2 xrefs:\n; > EndLevelLayer::keyDown @ 0x1003954c4\n; > EndLevelLayer::customSetup @ 0x100392c90\n; \n; This function is hookable on this platform (idp: arm, 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:03:39 +0000\n; \nSUB             SP, SP, #0x40                                          ; +0x0, 0x100393ae8\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x4, 0x100393aec\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x8, 0x100393af0\nADD             X29, SP, #0x30                                         ; +0xc, 0x100393af4\nLDRB            W8, [X0,#0x26B]                                        ; +0x10, 0x100393af8\nTBNZ            W8, #0, loc_100393BC8                                  ; +0x14, 0x100393afc\nMOV             X19, X0                                                ; +0x18, 0x100393b00\nMOV             W8, #1                                                 ; +0x1c, 0x100393b04\nSTRB            W8, [X0,#0x26B]                                        ; +0x20, 0x100393b08\nBL              GameManager__sharedState                               ; +0x24, 0x100393b0c\nADRL            X1, a0024; \"0024\"                                      ; +0x28, 0x100393b10\nBL              GameManager__getGameVariable                           ; +0x30, 0x100393b18\nTBNZ            W0, #0, loc_100393B24                                  ; +0x34, 0x100393b1c\nBL              PlatformToolbox__hideCursor                            ; +0x38, 0x100393b20\nBL              FMODAudioEngine__sharedEngine                          ; +0x3c, 0x100393b24\nBL              FMODAudioEngine__clearAllAudio                         ; +0x40, 0x100393b28\nBL              FMODAudioEngine__sharedEngine                          ; +0x44, 0x100393b2c\nMOV             X20, X0                                                ; +0x48, 0x100393b30\nADRL            X1, aPlaysound01Ogg; \"playSound_01.ogg\"                ; +0x4c, 0x100393b34\nADD             X0, SP, #0x30+__p; int                                 ; +0x54, 0x100393b3c\nBL              sub_100009900                                          ; +0x58, 0x100393b40\nADRP            X8, #dword_10075BD00@PAGE                              ; +0x5c, 0x100393b44\nLDR             S2, [X8,#dword_10075BD00@PAGEOFF]                      ; +0x60, 0x100393b48\nADD             X1, SP, #0x30+__p                                      ; +0x64, 0x100393b4c\nFMOV            S0, #1.0                                               ; +0x68, 0x100393b50\nFMOV            S1, WZR                                                ; +0x6c, 0x100393b54\nMOV             X0, X20                                                ; +0x70, 0x100393b58\nBL              FMODAudioEngine__playEffect                            ; +0x74, 0x100393b5c\nLDRSB           W8, [SP,#0x30+var_11]                                  ; +0x78, 0x100393b60\nTBZ             W8, #0x1F, loc_100393B70                               ; +0x7c, 0x100393b64\nLDR             X0, [SP,#0x30+__p]; __p                                ; +0x80, 0x100393b68\nBL              __ZdlPv; operator delete(void *)                       ; +0x84, 0x100393b6c\nLDR             X8, [X19]                                              ; +0x88, 0x100393b70\nLDR             X8, [X8,#0x528]                                        ; +0x8c, 0x100393b74\nMOV             X0, X19                                                ; +0x90, 0x100393b78\nMOV             X1, #0                                                 ; +0x94, 0x100393b7c\nBLR             X8                                                     ; +0x98, 0x100393b80\nLDR             X8, [X19]                                              ; +0x9c, 0x100393b84\nLDR             X8, [X8,#0x3E8]                                        ; +0xa0, 0x100393b88\nMOV             X0, X19                                                ; +0xa4, 0x100393b8c\nMOV             W1, #0                                                 ; +0xa8, 0x100393b90\nBLR             X8                                                     ; +0xac, 0x100393b94\nLDR             X8, [X19]                                              ; +0xb0, 0x100393b98\nLDR             X8, [X8,#0x440]                                        ; +0xb4, 0x100393b9c\nMOV             X0, X19                                                ; +0xb8, 0x100393ba0\nMOV             W1, #0                                                 ; +0xbc, 0x100393ba4\nBLR             X8                                                     ; +0xc0, 0x100393ba8\nLDR             X8, [X19]                                              ; +0xc4, 0x100393bac\nLDR             X8, [X8,#0x430]                                        ; +0xc8, 0x100393bb0\nMOV             X0, X19                                                ; +0xcc, 0x100393bb4\nMOV             W1, #0                                                 ; +0xd0, 0x100393bb8\nBLR             X8                                                     ; +0xd4, 0x100393bbc\nLDR             X0, [X19,#0x260]                                       ; +0xd8, 0x100393bc0\nBL              sub_10014B2C0                                          ; +0xdc, 0x100393bc4\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xe0, 0x100393bc8\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xe4, 0x100393bcc\nADD             SP, SP, #0x40 ; '@'                                    ; +0xe8, 0x100393bd0\nRET                                                                    ; +0xec, 0x100393bd4", "xrefs": ["EndLevelLayer::keyDown @ 0x1003954c4", "EndLevelLayer::customSetup @ 0x100392c90"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}