{"type": "func", "start": 5372374288, "end": 5372374484, "name": "PauseLayer::keyDown", "pseudocode": "// \n// PauseLayer::keyDown from 0x14037ed10 to 0x14037edd4 (196 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1405c6aa0\n// > <???> @ 0x1406d5df8\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=1\nvoid PauseLayer::keyDown(PauseLayer *a1, cocos2d::enumKeyCodes a2, double a3)\n{\n  __int32 v4; // edx\n  __int32 v5; // edx\n  __int32 v6; // edx\n  __int32 v7; // edx\n  __int64 v8; // rax\n  PauseLayer *v9; // rcx\n  void *v10; // [rsp+48h] [rbp+20h]\n\n  v4 = a2 - 27;\n  if ( !v4 )\n    goto LABEL_12;\n  v5 = v4 - 5;\n  if ( !v5 )\n  {\nLABEL_6:\n    PauseLayer::onResume((PauseLayer *)((char *)a1 - 344), nullptr);\n    return;\n  }\n  v6 = v5 - 971;\n  if ( v6 )\n  {\n    v7 = v6 - 4;\n    if ( v7 )\n    {\n      if ( v7 != 2 )\n        return;\n      goto LABEL_6;\n    }\n    v8 = 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      v8 = qword_1406C2ED8;\n    }\n    v9 = (PauseLayer *)((char *)a1 - 344);\n    if ( *(_BYTE *)(*(_QWORD *)(v8 + 520) + 12784LL) )\n      PauseLayer::onNormalMode(v9, nullptr);\n    else\n      PauseLayer::onPracticeMode(v9, nullptr);\n  }\n  else\n  {\nLABEL_12:\n    PauseLayer::tryQuit((PauseLayer *)((char *)a1 - 344), nullptr);\n  }\n}", "assembly": "; \n; PauseLayer::keyDown from 0x14037ed10 to 0x14037edd4 (196 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1405c6aa0\n; > <???> @ 0x1406d5df8\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\npush    rbx                                                            ; +0x0, 0x14037ed10\nsub     rsp, 20h                                                       ; +0x2, 0x14037ed12\nmov     rbx, rcx                                                       ; +0x6, 0x14037ed16\nsub     edx, 1Bh                                                       ; +0x9, 0x14037ed19\njz      loc_14037EDBB                                                  ; +0xc, 0x14037ed1c\nsub     edx, 5                                                         ; +0x12, 0x14037ed22\njz      short loc_14037ED41                                            ; +0x15, 0x14037ed25\nsub     edx, 3CBh                                                      ; +0x17, 0x14037ed27\njz      loc_14037EDBB                                                  ; +0x1d, 0x14037ed2d\nsub     edx, 4                                                         ; +0x23, 0x14037ed33\njz      short loc_14037ED54                                            ; +0x26, 0x14037ed36\ncmp     edx, 2                                                         ; +0x28, 0x14037ed38\njnz     loc_14037EDCE                                                  ; +0x2b, 0x14037ed3b\nadd     rcx, 0FFFFFFFFFFFFFEA8h                                        ; +0x31, 0x14037ed41\nxor     edx, edx                                                       ; +0x38, 0x14037ed48\nadd     rsp, 20h                                                       ; +0x3a, 0x14037ed4a\npop     rbx                                                            ; +0x3e, 0x14037ed4e\njmp     PauseLayer__onResume                                           ; +0x3f, 0x14037ed4f\nmov     rax, cs:qword_1406C2ED8                                        ; +0x44, 0x14037ed54\ntest    rax, rax                                                       ; +0x4b, 0x14037ed5b\njnz     short loc_14037ED8F                                            ; +0x4e, 0x14037ed5e\nmov     ecx, 668h; Size                                                ; +0x50, 0x14037ed60\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x55, 0x14037ed65\nmov     [rsp+28h+arg_18], rax                                          ; +0x5a, 0x14037ed6a\nmov     rcx, rax                                                       ; +0x5f, 0x14037ed6f\ncall    sub_14017AB00                                                  ; +0x62, 0x14037ed72\nnop                                                                    ; +0x67, 0x14037ed77\nmov     cs:qword_1406C2ED8, rax                                        ; +0x68, 0x14037ed78\nmov     rdx, [rax]                                                     ; +0x6f, 0x14037ed7f\nmov     rcx, rax                                                       ; +0x72, 0x14037ed82\ncall    qword ptr [rdx+48h]                                            ; +0x75, 0x14037ed85\nmov     rax, cs:qword_1406C2ED8                                        ; +0x78, 0x14037ed88\nlea     rcx, [rbx-158h]                                                ; +0x7f, 0x14037ed8f\nmov     rax, [rax+208h]                                                ; +0x86, 0x14037ed96\nxor     edx, edx                                                       ; +0x8d, 0x14037ed9d\ncmp     [rax+31F0h], dl                                                ; +0x8f, 0x14037ed9f\njnz     short loc_14037EDB1                                            ; +0x95, 0x14037eda5\nadd     rsp, 20h                                                       ; +0x97, 0x14037eda7\npop     rbx                                                            ; +0x9b, 0x14037edab\njmp     PauseLayer__onPracticeMode                                     ; +0x9c, 0x14037edac\nadd     rsp, 20h                                                       ; +0xa1, 0x14037edb1\npop     rbx                                                            ; +0xa5, 0x14037edb5\njmp     PauseLayer__onNormalMode                                       ; +0xa6, 0x14037edb6\nadd     rcx, 0FFFFFFFFFFFFFEA8h                                        ; +0xab, 0x14037edbb\nxor     edx, edx                                                       ; +0xb2, 0x14037edc2\nadd     rsp, 20h                                                       ; +0xb4, 0x14037edc4\npop     rbx                                                            ; +0xb8, 0x14037edc8\njmp     PauseLayer__tryQuit                                            ; +0xb9, 0x14037edc9\nadd     rsp, 20h                                                       ; +0xbe, 0x14037edce\npop     rbx                                                            ; +0xc2, 0x14037edd2\nretn                                                                   ; +0xc3, 0x14037edd3", "xrefs": ["<???> @ 0x1405c6aa0", "<???> @ 0x1406d5df8"], "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"}