{"type": "func", "start": 5371032752, "end": 5371033085, "name": "GJBaseGameLayer::pauseAudio", "pseudocode": "// \n// GJBaseGameLayer::pauseAudio from 0x1402374b0 to 0x1402375fd (333 bytes)\n// \n// 8 xrefs:\n// > EditorUI::onPlayback @ 0x140111afb\n// > EditorUI::onPlaytest @ 0x1401120f1\n// > EditorUI::onPlaytest @ 0x14011224d\n// > PlayLayer::loadFromCheckpoint @ 0x1403b76bb\n// > PlayLayer::resetLevel @ 0x1403b8fbb\n// > PlayLayer::pauseGame @ 0x1403ba23e\n// > PlayLayer::startMusic @ 0x1403bab53\n// > <???> @ 0x1406ce118\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=3\nvoid GJBaseGameLayer::pauseAudio(GJBaseGameLayer *a1)\n{\n  __int64 v1; // rdi\n  __int64 *v2; // rbx\n  FMOD::Channel *v3; // rax\n  FMODAudioEngine *v4; // [rsp+30h] [rbp+8h]\n  FMODAudioEngine *v5; // [rsp+30h] [rbp+8h]\n  FMODAudioEngine *v6; // [rsp+30h] [rbp+8h]\n\n  v1 = qword_1406C2E88;\n  if ( !qword_1406C2E88 )\n  {\n    v4 = (FMODAudioEngine *)operator new(0x888u);\n    qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v4);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n    v1 = qword_1406C2E88;\n  }\n  if ( !*(_BYTE *)(v1 + 609) )\n  {\n    *(_BYTE *)(v1 + 609) = 1;\n    FMOD::ChannelControl::setPaused(*(FMOD::ChannelControl **)(v1 + 552), 1);\n    FMOD::ChannelControl::setPaused(*(FMOD::ChannelControl **)(v1 + 584), 1);\n    v1 = qword_1406C2E88;\n  }\n  if ( !v1 )\n  {\n    v5 = (FMODAudioEngine *)operator new(0x888u);\n    qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v5);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n    v1 = qword_1406C2E88;\n  }\n  v2 = **(__int64 ***)(v1 + 328);\n  if ( v2 != *(__int64 **)(v1 + 328) )\n  {\n    do\n    {\n      v3 = FMODAudioEngine::channelForChannelID((FMODAudioEngine *)v1, *((_DWORD *)v2 + 6));\n      if ( v3 )\n        FMOD::ChannelControl::setPaused(v3, 1);\n      v2 = (__int64 *)*v2;\n    }\n    while ( v2 != *(__int64 **)(v1 + 328) );\n    v1 = qword_1406C2E88;\n  }\n  if ( !v1 )\n  {\n    v6 = (FMODAudioEngine *)operator new(0x888u);\n    qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v6);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n    v1 = qword_1406C2E88;\n  }\n  FMOD::System::update(*(FMOD::System **)(v1 + 560));\n}", "assembly": "; \n; GJBaseGameLayer::pauseAudio from 0x1402374b0 to 0x1402375fd (333 bytes)\n; \n; 8 xrefs:\n; > EditorUI::onPlayback @ 0x140111afb\n; > EditorUI::onPlaytest @ 0x1401120f1\n; > EditorUI::onPlaytest @ 0x14011224d\n; > PlayLayer::loadFromCheckpoint @ 0x1403b76bb\n; > PlayLayer::resetLevel @ 0x1403b8fbb\n; > PlayLayer::pauseGame @ 0x1403ba23e\n; > PlayLayer::startMusic @ 0x1403bab53\n; > <???> @ 0x1406ce118\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, 0x1402374b0\nmov     [rsp+arg_0], rcx                                               ; +0x5, 0x1402374b5\npush    rdi                                                            ; +0xa, 0x1402374ba\nsub     rsp, 20h                                                       ; +0xb, 0x1402374bb\nmov     rdi, cs:qword_1406C2E88                                        ; +0xf, 0x1402374bf\ntest    rdi, rdi                                                       ; +0x16, 0x1402374c6\njnz     short loc_1402374FA                                            ; +0x19, 0x1402374c9\nmov     ecx, 888h; Size                                                ; +0x1b, 0x1402374cb\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x20, 0x1402374d0\nmov     [rsp+28h+arg_0], rax                                           ; +0x25, 0x1402374d5\nmov     rcx, rax                                                       ; +0x2a, 0x1402374da\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x2d, 0x1402374dd\nnop                                                                    ; +0x32, 0x1402374e2\nmov     cs:qword_1406C2E88, rax                                        ; +0x33, 0x1402374e3\nmov     rdx, [rax]                                                     ; +0x3a, 0x1402374ea\nmov     rcx, rax                                                       ; +0x3d, 0x1402374ed\ncall    qword ptr [rdx+48h]                                            ; +0x40, 0x1402374f0\nmov     rdi, cs:qword_1406C2E88                                        ; +0x43, 0x1402374f3\ncmp     byte ptr [rdi+261h], 0                                         ; +0x4a, 0x1402374fa\njnz     short loc_14023752F                                            ; +0x51, 0x140237501\nmov     byte ptr [rdi+261h], 1                                         ; +0x53, 0x140237503\nmov     dl, 1                                                          ; +0x5a, 0x14023750a\nmov     rcx, [rdi+228h]                                                ; +0x5c, 0x14023750c\ncall    cs:?setPaused@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@_N@Z; FMOD::ChannelControl::setPaused(bool) ; +0x63, 0x140237513\nmov     dl, 1                                                          ; +0x69, 0x140237519\nmov     rcx, [rdi+248h]                                                ; +0x6b, 0x14023751b\ncall    cs:?setPaused@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@_N@Z; FMOD::ChannelControl::setPaused(bool) ; +0x72, 0x140237522\nmov     rdi, cs:qword_1406C2E88                                        ; +0x78, 0x140237528\ntest    rdi, rdi                                                       ; +0x7f, 0x14023752f\njnz     short loc_140237563                                            ; +0x82, 0x140237532\nmov     ecx, 888h; Size                                                ; +0x84, 0x140237534\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x89, 0x140237539\nmov     [rsp+28h+arg_0], rax                                           ; +0x8e, 0x14023753e\nmov     rcx, rax                                                       ; +0x93, 0x140237543\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x96, 0x140237546\nnop                                                                    ; +0x9b, 0x14023754b\nmov     cs:qword_1406C2E88, rax                                        ; +0x9c, 0x14023754c\nmov     rdx, [rax]                                                     ; +0xa3, 0x140237553\nmov     rcx, rax                                                       ; +0xa6, 0x140237556\ncall    qword ptr [rdx+48h]                                            ; +0xa9, 0x140237559\nmov     rdi, cs:qword_1406C2E88                                        ; +0xac, 0x14023755c\nmov     rbx, [rdi+148h]                                                ; +0xb3, 0x140237563\nmov     rbx, [rbx]                                                     ; +0xba, 0x14023756a\ncmp     rbx, [rdi+148h]                                                ; +0xbd, 0x14023756d\njz      short loc_1402375B1                                            ; +0xc4, 0x140237574\nnop     word ptr [rax+rax+00000000h]                                   ; +0xc6, 0x140237576\nmov     edx, [rbx+18h]                                                 ; +0xd0, 0x140237580\nmov     rcx, rdi                                                       ; +0xd3, 0x140237583\ncall    FMODAudioEngine__channelForChannelID                           ; +0xd6, 0x140237586\ntest    rax, rax                                                       ; +0xdb, 0x14023758b\njz      short loc_14023759B                                            ; +0xde, 0x14023758e\nmov     dl, 1                                                          ; +0xe0, 0x140237590\nmov     rcx, rax                                                       ; +0xe2, 0x140237592\ncall    cs:?setPaused@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@_N@Z; FMOD::ChannelControl::setPaused(bool) ; +0xe5, 0x140237595\nmov     rax, [rbx]                                                     ; +0xeb, 0x14023759b\nmov     rbx, rax                                                       ; +0xee, 0x14023759e\ncmp     rax, [rdi+148h]                                                ; +0xf1, 0x1402375a1\njnz     short loc_140237580                                            ; +0xf8, 0x1402375a8\nmov     rdi, cs:qword_1406C2E88                                        ; +0xfa, 0x1402375aa\ntest    rdi, rdi                                                       ; +0x101, 0x1402375b1\njnz     short loc_1402375E5                                            ; +0x104, 0x1402375b4\nmov     ecx, 888h; Size                                                ; +0x106, 0x1402375b6\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x10b, 0x1402375bb\nmov     [rsp+28h+arg_0], rax                                           ; +0x110, 0x1402375c0\nmov     rcx, rax                                                       ; +0x115, 0x1402375c5\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x118, 0x1402375c8\nnop                                                                    ; +0x11d, 0x1402375cd\nmov     cs:qword_1406C2E88, rax                                        ; +0x11e, 0x1402375ce\nmov     rdx, [rax]                                                     ; +0x125, 0x1402375d5\nmov     rcx, rax                                                       ; +0x128, 0x1402375d8\ncall    qword ptr [rdx+48h]                                            ; +0x12b, 0x1402375db\nmov     rdi, cs:qword_1406C2E88                                        ; +0x12e, 0x1402375de\nmov     rcx, [rdi+230h]                                                ; +0x135, 0x1402375e5\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x13c, 0x1402375ec\nadd     rsp, 20h                                                       ; +0x141, 0x1402375f1\npop     rdi                                                            ; +0x145, 0x1402375f5\njmp     cs:?update@System@FMOD@@QEAA?AW4FMOD_RESULT@@XZ; FMOD::System::update(void) ; +0x146, 0x1402375f6", "xrefs": ["EditorUI::onPlayback @ 0x140111afb", "EditorUI::onPlaytest @ 0x1401120f1", "EditorUI::onPlaytest @ 0x14011224d", "PlayLayer::loadFromCheckpoint @ 0x1403b76bb", "PlayLayer::resetLevel @ 0x1403b8fbb", "PlayLayer::pauseGame @ 0x1403ba23e", "PlayLayer::startMusic @ 0x1403bab53", "<???> @ 0x1406ce118"], "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"}