{"type": "func", "start": 5369330048, "end": 5369330195, "name": "AchievementsLayer::keyDown", "pseudocode": "// \n// AchievementsLayer::keyDown from 0x140097980 to 0x140097a13 (147 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x140719968\n// > <???> @ 0x140912ce0\n// \n// This function is hookable on this platform (idp: pc, 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:26:03 +0000\n// \n\n__int64 __fastcall AchievementsLayer::keyDown(__int64 a1, __int64 a2)\n{\n  __int64 v3; // r8\n  __int64 result; // rax\n\n  v3 = (unsigned int)(a2 - 37);\n  if ( (_DWORD)a2 != 37 )\n  {\n    v3 = (unsigned int)(a2 - 39);\n    if ( (_DWORD)a2 == 39 )\n    {\nLABEL_6:\n      result = (*(__int64 (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 272) + 344LL))(\n                 *(_QWORD *)(a1 + 272),\n                 a2,\n                 v3);\n      if ( (_BYTE)result )\n        return AchievementsLayer::loadPage(a1 - 344, (unsigned int)(*(_DWORD *)(a1 + 264) + 1));\n      return result;\n    }\n    v3 = (unsigned int)(a2 - 1025);\n    if ( (_DWORD)a2 != 1025 )\n    {\n      if ( (_DWORD)a2 != 1027 )\n        return cocos2d::CCLayer::keyDown();\n      goto LABEL_6;\n    }\n  }\n  result = (*(__int64 (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 280) + 344LL))(\n             *(_QWORD *)(a1 + 280),\n             a2,\n             v3);\n  if ( (_BYTE)result )\n    return AchievementsLayer::loadPage(a1 - 344, (unsigned int)(*(_DWORD *)(a1 + 264) - 1));\n  return result;\n}", "assembly": "; \n; AchievementsLayer::keyDown from 0x140097980 to 0x140097a13 (147 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x140719968\n; > <???> @ 0x140912ce0\n; \n; This function is hookable on this platform (idp: pc, 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:26:03 +0000\n; \npush    rbx                                                            ; +0x0, 0x140097980\nsub     rsp, 20h                                                       ; +0x2, 0x140097982\nmov     r8d, edx                                                       ; +0x6, 0x140097986\nmov     rbx, rcx                                                       ; +0x9, 0x140097989\nsub     r8d, 25h ; '%'                                                 ; +0xc, 0x14009798c\njz      short loc_1400979E0                                            ; +0x10, 0x140097990\nsub     r8d, 2                                                         ; +0x12, 0x140097992\njz      short loc_1400979B3                                            ; +0x16, 0x140097996\nsub     r8d, 3DAh                                                      ; +0x18, 0x140097998\njz      short loc_1400979E0                                            ; +0x1f, 0x14009799f\ncmp     r8d, 2                                                         ; +0x21, 0x1400979a1\njz      short loc_1400979B3                                            ; +0x25, 0x1400979a5\nadd     rsp, 20h                                                       ; +0x27, 0x1400979a7\npop     rbx                                                            ; +0x2b, 0x1400979ab\njmp     cs:__imp_?keyDown@CCLayer@cocos2d@@UEAAXW4enumKeyCodes@2@N@Z; cocos2d::CCLayer::keyDown(cocos2d::enumKeyCodes,double) ; +0x2c, 0x1400979ac\nmov     rcx, [rcx+110h]                                                ; +0x33, 0x1400979b3\nmov     rax, [rcx]                                                     ; +0x3a, 0x1400979ba\ncall    qword ptr [rax+158h]                                           ; +0x3d, 0x1400979bd\ntest    al, al                                                         ; +0x43, 0x1400979c3\njz      short loc_140097A0D                                            ; +0x45, 0x1400979c5\nmov     edx, [rbx+108h]                                                ; +0x47, 0x1400979c7\nlea     rcx, [rbx-158h]                                                ; +0x4d, 0x1400979cd\ninc     edx                                                            ; +0x54, 0x1400979d4\nadd     rsp, 20h                                                       ; +0x56, 0x1400979d6\npop     rbx                                                            ; +0x5a, 0x1400979da\njmp     AchievementsLayer__loadPage                                    ; +0x5b, 0x1400979db\nmov     rcx, [rcx+118h]                                                ; +0x60, 0x1400979e0\nmov     rax, [rcx]                                                     ; +0x67, 0x1400979e7\ncall    qword ptr [rax+158h]                                           ; +0x6a, 0x1400979ea\ntest    al, al                                                         ; +0x70, 0x1400979f0\njz      short loc_140097A0D                                            ; +0x72, 0x1400979f2\nmov     edx, [rbx+108h]                                                ; +0x74, 0x1400979f4\nlea     rcx, [rbx-158h]                                                ; +0x7a, 0x1400979fa\ndec     edx                                                            ; +0x81, 0x140097a01\nadd     rsp, 20h                                                       ; +0x83, 0x140097a03\npop     rbx                                                            ; +0x87, 0x140097a07\njmp     AchievementsLayer__loadPage                                    ; +0x88, 0x140097a08\nadd     rsp, 20h                                                       ; +0x8d, 0x140097a0d\npop     rbx                                                            ; +0x91, 0x140097a11\nretn                                                                   ; +0x92, 0x140097a12", "xrefs": ["<???> @ 0x140719968", "<???> @ 0x140912ce0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}