; ; GameOptionsLayer::didToggle from 0x1402a0560 to 0x1402a0a7c (1308 bytes) ; ; 2 xrefs: ; > @ 0x140578ff0 ; > @ 0x1406d1f64 ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; mov [rsp+arg_0], rbx ; +0x0, 0x1402a0560 push rdi ; +0x5, 0x1402a0565 sub rsp, 20h ; +0x6, 0x1402a0566 mov rbx, rcx ; +0xa, 0x1402a056a dec edx; switch 11 cases ; +0xd, 0x1402a056d cmp edx, 0Ah ; +0xf, 0x1402a056f ja def_1402A058C; jumptable 00000001402A058C default case ; +0x12, 0x1402a0572 movsxd rax, edx ; +0x18, 0x1402a0578 lea rcx, cs:140000000h ; +0x1b, 0x1402a057b mov edx, ds:(jpt_1402A058C - 140000000h)[rcx+rax*4] ; +0x22, 0x1402a0582 add rdx, rcx ; +0x29, 0x1402a0589 jmp rdx; switch jump ; +0x2c, 0x1402a058c cmp cs:qword_1406C2ED8, 0; jumptable 00000001402A058C case 1 ; +0x2e, 0x1402a058e jnz short loc_1402A05C0 ; +0x36, 0x1402a0596 mov ecx, 668h; Size ; +0x38, 0x1402a0598 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x3d, 0x1402a059d mov [rsp+28h+arg_10], rax ; +0x42, 0x1402a05a2 mov rcx, rax ; +0x47, 0x1402a05a7 call sub_14017AB00 ; +0x4a, 0x1402a05aa nop ; +0x4f, 0x1402a05af mov cs:qword_1406C2ED8, rax ; +0x50, 0x1402a05b0 mov rdx, [rax] ; +0x57, 0x1402a05b7 mov rcx, rax ; +0x5a, 0x1402a05ba call qword ptr [rdx+48h] ; +0x5d, 0x1402a05bd lea rdx, a0026; "0026" ; +0x60, 0x1402a05c0 mov rbx, [rsp+28h+arg_0] ; +0x67, 0x1402a05c7 add rsp, 20h ; +0x6c, 0x1402a05cc pop rdi ; +0x70, 0x1402a05d0 jmp GameManager__toggleGameVariable ; +0x71, 0x1402a05d1 cmp cs:qword_1406C2ED8, 0; jumptable 00000001402A058C case 2 ; +0x76, 0x1402a05d6 jnz short loc_1402A0608 ; +0x7e, 0x1402a05de mov ecx, 668h; Size ; +0x80, 0x1402a05e0 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x85, 0x1402a05e5 mov [rsp+28h+arg_10], rax ; +0x8a, 0x1402a05ea mov rcx, rax ; +0x8f, 0x1402a05ef call sub_14017AB00 ; +0x92, 0x1402a05f2 nop ; +0x97, 0x1402a05f7 mov cs:qword_1406C2ED8, rax ; +0x98, 0x1402a05f8 mov rdx, [rax] ; +0x9f, 0x1402a05ff mov rcx, rax ; +0xa2, 0x1402a0602 call qword ptr [rdx+48h] ; +0xa5, 0x1402a0605 lea rdx, a0027; "0027" ; +0xa8, 0x1402a0608 mov rbx, [rsp+28h+arg_0] ; +0xaf, 0x1402a060f add rsp, 20h ; +0xb4, 0x1402a0614 pop rdi ; +0xb8, 0x1402a0618 jmp GameManager__toggleGameVariable ; +0xb9, 0x1402a0619 mov rcx, cs:qword_1406C2ED8; jumptable 00000001402A058C case 3 ; +0xbe, 0x1402a061e test rcx, rcx ; +0xc5, 0x1402a0625 jnz short loc_1402A0659 ; +0xc8, 0x1402a0628 mov ecx, 668h; Size ; +0xca, 0x1402a062a call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0xcf, 0x1402a062f mov [rsp+28h+arg_10], rax ; +0xd4, 0x1402a0634 mov rcx, rax ; +0xd9, 0x1402a0639 call sub_14017AB00 ; +0xdc, 0x1402a063c nop ; +0xe1, 0x1402a0641 mov cs:qword_1406C2ED8, rax ; +0xe2, 0x1402a0642 mov rdx, [rax] ; +0xe9, 0x1402a0649 mov rcx, rax ; +0xec, 0x1402a064c call qword ptr [rdx+48h] ; +0xef, 0x1402a064f mov rcx, cs:qword_1406C2ED8 ; +0xf2, 0x1402a0652 mov rdi, rcx ; +0xf9, 0x1402a0659 test rcx, rcx ; +0xfc, 0x1402a065c jnz short loc_1402A0690 ; +0xff, 0x1402a065f mov ecx, 668h; Size ; +0x101, 0x1402a0661 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x106, 0x1402a0666 mov [rsp+28h+arg_10], rax ; +0x10b, 0x1402a066b mov rcx, rax ; +0x110, 0x1402a0670 call sub_14017AB00 ; +0x113, 0x1402a0673 nop ; +0x118, 0x1402a0678 mov cs:qword_1406C2ED8, rax ; +0x119, 0x1402a0679 mov rdx, [rax] ; +0x120, 0x1402a0680 mov rcx, rax ; +0x123, 0x1402a0683 call qword ptr [rdx+48h] ; +0x126, 0x1402a0686 mov rcx, cs:qword_1406C2ED8 ; +0x129, 0x1402a0689 cmp byte ptr [rdi+394h], 0 ; +0x130, 0x1402a0690 setz al ; +0x137, 0x1402a0697 mov [rcx+394h], al ; +0x13a, 0x1402a069a mov rcx, [rbx+3F0h] ; +0x140, 0x1402a06a0 mov rax, [rcx] ; +0x147, 0x1402a06a7 mov rbx, [rsp+28h+arg_0] ; +0x14a, 0x1402a06aa add rsp, 20h ; +0x14f, 0x1402a06af pop rdi ; +0x153, 0x1402a06b3 jmp qword ptr [rax+558h] ; +0x154, 0x1402a06b4 cmp cs:qword_1406C2ED8, 0; jumptable 00000001402A058C case 4 ; +0x15b, 0x1402a06bb jnz short loc_1402A06ED ; +0x163, 0x1402a06c3 mov ecx, 668h; Size ; +0x165, 0x1402a06c5 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x16a, 0x1402a06ca mov [rsp+28h+arg_10], rax ; +0x16f, 0x1402a06cf mov rcx, rax ; +0x174, 0x1402a06d4 call sub_14017AB00 ; +0x177, 0x1402a06d7 nop ; +0x17c, 0x1402a06dc mov cs:qword_1406C2ED8, rax ; +0x17d, 0x1402a06dd mov rdx, [rax] ; +0x184, 0x1402a06e4 mov rcx, rax ; +0x187, 0x1402a06e7 call qword ptr [rdx+48h] ; +0x18a, 0x1402a06ea lea rdx, a0040; "0040" ; +0x18d, 0x1402a06ed call GameManager__toggleGameVariable ; +0x194, 0x1402a06f4 jmp short loc_1402A06A0 ; +0x199, 0x1402a06f9 cmp cs:qword_1406C2ED8, 0; jumptable 00000001402A058C case 5 ; +0x19b, 0x1402a06fb jnz short loc_1402A072D ; +0x1a3, 0x1402a0703 mov ecx, 668h; Size ; +0x1a5, 0x1402a0705 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x1aa, 0x1402a070a mov [rsp+28h+arg_10], rax ; +0x1af, 0x1402a070f mov rcx, rax ; +0x1b4, 0x1402a0714 call sub_14017AB00 ; +0x1b7, 0x1402a0717 nop ; +0x1bc, 0x1402a071c mov cs:qword_1406C2ED8, rax ; +0x1bd, 0x1402a071d mov rdx, [rax] ; +0x1c4, 0x1402a0724 mov rcx, rax ; +0x1c7, 0x1402a0727 call qword ptr [rdx+48h] ; +0x1ca, 0x1402a072a lea rdx, a0144; "0144" ; +0x1cd, 0x1402a072d call GameManager__toggleGameVariable ; +0x1d4, 0x1402a0734 mov rcx, cs:qword_1406C2ED8 ; +0x1d9, 0x1402a0739 test rcx, rcx ; +0x1e0, 0x1402a0740 jnz short loc_1402A0775 ; +0x1e3, 0x1402a0743 mov ecx, 668h; Size ; +0x1e5, 0x1402a0745 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x1ea, 0x1402a074a mov [rsp+28h+arg_10], rax ; +0x1ef, 0x1402a074f mov rcx, rax ; +0x1f4, 0x1402a0754 call sub_14017AB00 ; +0x1f7, 0x1402a0757 nop ; +0x1fc, 0x1402a075c mov cs:qword_1406C2ED8, rax ; +0x1fd, 0x1402a075d mov r8, [rax] ; +0x204, 0x1402a0764 mov rcx, rax ; +0x207, 0x1402a0767 call qword ptr [r8+48h] ; +0x20a, 0x1402a076a mov rcx, cs:qword_1406C2ED8 ; +0x20e, 0x1402a076e lea rdx, a0144; "0144" ; +0x215, 0x1402a0775 call GameManager__getGameVariable ; +0x21c, 0x1402a077c movzx edx, al ; +0x221, 0x1402a0781 mov rcx, [rbx+3F0h] ; +0x224, 0x1402a0784 mov rbx, [rsp+28h+arg_0] ; +0x22b, 0x1402a078b add rsp, 20h ; +0x230, 0x1402a0790 pop rdi ; +0x234, 0x1402a0794 jmp GJBaseGameLayer__toggleAudioVisualizer ; +0x235, 0x1402a0795 cmp cs:qword_1406C2ED8, 0; jumptable 00000001402A058C case 6 ; +0x23a, 0x1402a079a jnz short loc_1402A07CC ; +0x242, 0x1402a07a2 mov ecx, 668h; Size ; +0x244, 0x1402a07a4 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x249, 0x1402a07a9 mov [rsp+28h+arg_10], rax ; +0x24e, 0x1402a07ae mov rcx, rax ; +0x253, 0x1402a07b3 call sub_14017AB00 ; +0x256, 0x1402a07b6 nop ; +0x25b, 0x1402a07bb mov cs:qword_1406C2ED8, rax ; +0x25c, 0x1402a07bc mov rdx, [rax] ; +0x263, 0x1402a07c3 mov rcx, rax ; +0x266, 0x1402a07c6 call qword ptr [rdx+48h] ; +0x269, 0x1402a07c9 lea rdx, a0109; "0109" ; +0x26c, 0x1402a07cc call GameManager__toggleGameVariable ; +0x273, 0x1402a07d3 mov rcx, [rbx+3F0h] ; +0x278, 0x1402a07d8 mov rax, [rcx] ; +0x27f, 0x1402a07df mov rbx, [rsp+28h+arg_0] ; +0x282, 0x1402a07e2 add rsp, 20h ; +0x287, 0x1402a07e7 pop rdi ; +0x28b, 0x1402a07eb jmp qword ptr [rax+560h] ; +0x28c, 0x1402a07ec cmp cs:qword_1406C2ED8, 0; jumptable 00000001402A058C case 7 ; +0x293, 0x1402a07f3 jnz short loc_1402A0825 ; +0x29b, 0x1402a07fb mov ecx, 668h; Size ; +0x29d, 0x1402a07fd call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x2a2, 0x1402a0802 mov [rsp+28h+arg_10], rax ; +0x2a7, 0x1402a0807 mov rcx, rax ; +0x2ac, 0x1402a080c call sub_14017AB00 ; +0x2af, 0x1402a080f nop ; +0x2b4, 0x1402a0814 mov cs:qword_1406C2ED8, rax ; +0x2b5, 0x1402a0815 mov rdx, [rax] ; +0x2bc, 0x1402a081c mov rcx, rax ; +0x2bf, 0x1402a081f call qword ptr [rdx+48h] ; +0x2c2, 0x1402a0822 lea rdx, a0145; "0145" ; +0x2c5, 0x1402a0825 call GameManager__toggleGameVariable ; +0x2cc, 0x1402a082c jmp loc_1402A06A0 ; +0x2d1, 0x1402a0831 cmp cs:qword_1406C2ED8, 0; jumptable 00000001402A058C case 8 ; +0x2d6, 0x1402a0836 jnz short loc_1402A0868 ; +0x2de, 0x1402a083e mov ecx, 668h; Size ; +0x2e0, 0x1402a0840 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x2e5, 0x1402a0845 mov [rsp+28h+arg_10], rax ; +0x2ea, 0x1402a084a mov rcx, rax ; +0x2ef, 0x1402a084f call sub_14017AB00 ; +0x2f2, 0x1402a0852 nop ; +0x2f7, 0x1402a0857 mov cs:qword_1406C2ED8, rax ; +0x2f8, 0x1402a0858 mov rdx, [rax] ; +0x2ff, 0x1402a085f mov rcx, rax ; +0x302, 0x1402a0862 call qword ptr [rdx+48h] ; +0x305, 0x1402a0865 lea rdx, a0146; "0146" ; +0x308, 0x1402a0868 call GameManager__toggleGameVariable ; +0x30f, 0x1402a086f mov rcx, [rbx+3F0h] ; +0x314, 0x1402a0874 mov rax, [rcx] ; +0x31b, 0x1402a087b mov rbx, [rsp+28h+arg_0] ; +0x31e, 0x1402a087e add rsp, 20h ; +0x323, 0x1402a0883 pop rdi ; +0x327, 0x1402a0887 jmp qword ptr [rax+568h] ; +0x328, 0x1402a0888 cmp cs:qword_1406C2ED8, 0; jumptable 00000001402A058C case 9 ; +0x32f, 0x1402a088f jnz short loc_1402A08C1 ; +0x337, 0x1402a0897 mov ecx, 668h; Size ; +0x339, 0x1402a0899 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x33e, 0x1402a089e mov [rsp+28h+arg_10], rax ; +0x343, 0x1402a08a3 mov rcx, rax ; +0x348, 0x1402a08a8 call sub_14017AB00 ; +0x34b, 0x1402a08ab nop ; +0x350, 0x1402a08b0 mov cs:qword_1406C2ED8, rax ; +0x351, 0x1402a08b1 mov rdx, [rax] ; +0x358, 0x1402a08b8 mov rcx, rax ; +0x35b, 0x1402a08bb call qword ptr [rdx+48h] ; +0x35e, 0x1402a08be lea rdx, a0166; "0166" ; +0x361, 0x1402a08c1 call GameManager__toggleGameVariable ; +0x368, 0x1402a08c8 mov rax, cs:qword_1406C2ED8 ; +0x36d, 0x1402a08cd test rax, rax ; +0x374, 0x1402a08d4 jnz short loc_1402A0908 ; +0x377, 0x1402a08d7 mov ecx, 668h; Size ; +0x379, 0x1402a08d9 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x37e, 0x1402a08de mov [rsp+28h+arg_10], rax ; +0x383, 0x1402a08e3 mov rcx, rax ; +0x388, 0x1402a08e8 call sub_14017AB00 ; +0x38b, 0x1402a08eb nop ; +0x390, 0x1402a08f0 mov cs:qword_1406C2ED8, rax ; +0x391, 0x1402a08f1 mov rdx, [rax] ; +0x398, 0x1402a08f8 mov rcx, rax ; +0x39b, 0x1402a08fb call qword ptr [rdx+48h] ; +0x39e, 0x1402a08fe mov rax, cs:qword_1406C2ED8 ; +0x3a1, 0x1402a0901 mov rcx, [rax+208h] ; +0x3a8, 0x1402a0908 test rcx, rcx ; +0x3af, 0x1402a090f jz def_1402A058C; jumptable 00000001402A058C default case ; +0x3b2, 0x1402a0912 mov rbx, [rsp+28h+arg_0] ; +0x3b8, 0x1402a0918 add rsp, 20h ; +0x3bd, 0x1402a091d pop rdi ; +0x3c1, 0x1402a0921 jmp PlayLayer__updateDebugDrawSettings ; +0x3c2, 0x1402a0922 cmp cs:qword_1406C2ED8, 0; jumptable 00000001402A058C case 11 ; +0x3c7, 0x1402a0927 jnz short loc_1402A0959 ; +0x3cf, 0x1402a092f mov ecx, 668h; Size ; +0x3d1, 0x1402a0931 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x3d6, 0x1402a0936 mov [rsp+28h+arg_10], rax ; +0x3db, 0x1402a093b mov rcx, rax ; +0x3e0, 0x1402a0940 call sub_14017AB00 ; +0x3e3, 0x1402a0943 nop ; +0x3e8, 0x1402a0948 mov cs:qword_1406C2ED8, rax ; +0x3e9, 0x1402a0949 mov rdx, [rax] ; +0x3f0, 0x1402a0950 mov rcx, rax ; +0x3f3, 0x1402a0953 call qword ptr [rdx+48h] ; +0x3f6, 0x1402a0956 lea rdx, a0179; "0179" ; +0x3f9, 0x1402a0959 call GameManager__toggleGameVariable ; +0x400, 0x1402a0960 mov rax, cs:qword_1406C2ED8 ; +0x405, 0x1402a0965 test rax, rax ; +0x40c, 0x1402a096c jnz short loc_1402A0908 ; +0x40f, 0x1402a096f mov ecx, 668h; Size ; +0x411, 0x1402a0971 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x416, 0x1402a0976 mov [rsp+28h+arg_10], rax ; +0x41b, 0x1402a097b mov rcx, rax ; +0x420, 0x1402a0980 call sub_14017AB00 ; +0x423, 0x1402a0983 nop ; +0x428, 0x1402a0988 jmp loc_1402A08F1 ; +0x429, 0x1402a0989 cmp cs:qword_1406C2ED8, 0; jumptable 00000001402A058C case 10 ; +0x42e, 0x1402a098e jnz short loc_1402A09C0 ; +0x436, 0x1402a0996 mov ecx, 668h; Size ; +0x438, 0x1402a0998 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x43d, 0x1402a099d mov [rsp+28h+arg_10], rax ; +0x442, 0x1402a09a2 mov rcx, rax ; +0x447, 0x1402a09a7 call sub_14017AB00 ; +0x44a, 0x1402a09aa nop ; +0x44f, 0x1402a09af mov cs:qword_1406C2ED8, rax ; +0x450, 0x1402a09b0 mov rdx, [rax] ; +0x457, 0x1402a09b7 mov rcx, rax ; +0x45a, 0x1402a09ba call qword ptr [rdx+48h] ; +0x45d, 0x1402a09bd lea rdx, a0173; "0173" ; +0x460, 0x1402a09c0 call GameManager__toggleGameVariable ; +0x467, 0x1402a09c7 movzx ebx, al ; +0x46c, 0x1402a09cc mov rcx, cs:qword_1406C2ED8 ; +0x46f, 0x1402a09cf test rcx, rcx ; +0x476, 0x1402a09d6 jnz short loc_1402A0A0A ; +0x479, 0x1402a09d9 mov ecx, 668h; Size ; +0x47b, 0x1402a09db call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x480, 0x1402a09e0 mov [rsp+28h+arg_10], rax ; +0x485, 0x1402a09e5 mov rcx, rax ; +0x48a, 0x1402a09ea call sub_14017AB00 ; +0x48d, 0x1402a09ed nop ; +0x492, 0x1402a09f2 mov cs:qword_1406C2ED8, rax ; +0x493, 0x1402a09f3 mov rdx, [rax] ; +0x49a, 0x1402a09fa mov rcx, rax ; +0x49d, 0x1402a09fd call qword ptr [rdx+48h] ; +0x4a0, 0x1402a0a00 mov rcx, cs:qword_1406C2ED8 ; +0x4a3, 0x1402a0a03 mov rcx, [rcx+208h] ; +0x4aa, 0x1402a0a0a test rcx, rcx ; +0x4b1, 0x1402a0a11 jz short def_1402A058C; jumptable 00000001402A058C default case ; +0x4b4, 0x1402a0a14 mov [rcx+886h], bl ; +0x4b6, 0x1402a0a16 test bl, bl ; +0x4bc, 0x1402a0a1c jz short loc_1402A0A26 ; +0x4be, 0x1402a0a1e mov [rcx+3856h], bl ; +0x4c0, 0x1402a0a20 mov rax, [rcx+0DA0h] ; +0x4c6, 0x1402a0a26 mov [rax+7E5h], bl ; +0x4cd, 0x1402a0a2d mov rax, [rcx+0DA8h] ; +0x4d3, 0x1402a0a33 mov [rax+7E5h], bl ; +0x4da, 0x1402a0a3a call PlayLayer__updateTestModeLabel ; +0x4e0, 0x1402a0a40 mov rbx, [rsp+28h+arg_0]; jumptable 00000001402A058C default case ; +0x4e5, 0x1402a0a45 add rsp, 20h ; +0x4ea, 0x1402a0a4a pop rdi ; +0x4ee, 0x1402a0a4e retn ; +0x4ef, 0x1402a0a4f dd offset loc_1402A058E - 140000000h; jump table for switch statement ; +0x4f0, 0x1402a0a50