{"type": "func", "start": 4299835600, "end": 4299835764, "name": "AchievementsLayer::keyDown", "pseudocode": "// \n// AchievementsLayer::keyDown from 0x1004a48d0 to 0x1004a4974 (164 bytes)\n// \n// 2 xrefs:\n// > sub_1004A4974 @ 0x1004a4978\n// > <???> @ 0x10097e628\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:06:04 +0000\n// \n\n__int64 __fastcall AchievementsLayer::keyDown(__int64 a1, int a2)\n{\n  __int64 result; // x0\n  int v4; // w1\n\n  if ( a2 > 1024 )\n  {\n    if ( a2 == 1027 )\n      goto LABEL_9;\n    if ( a2 != 1025 )\n      return cocos2d::CCLayer::keyDown(a1, a2);\n  }\n  else if ( a2 != 37 )\n  {\n    if ( a2 != 39 )\n      return cocos2d::CCLayer::keyDown(a1, a2);\nLABEL_9:\n    result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 608) + 352LL))(*(_QWORD *)(a1 + 608));\n    if ( (_DWORD)result )\n    {\n      v4 = *(_DWORD *)(a1 + 604) + 1;\n      return sub_1004A4588(a1, v4);\n    }\n    return result;\n  }\n  result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 616) + 352LL))(*(_QWORD *)(a1 + 616));\n  if ( (_DWORD)result )\n  {\n    v4 = *(_DWORD *)(a1 + 604) - 1;\n    return sub_1004A4588(a1, v4);\n  }\n  return result;\n}", "assembly": "; \n; AchievementsLayer::keyDown from 0x1004a48d0 to 0x1004a4974 (164 bytes)\n; \n; 2 xrefs:\n; > sub_1004A4974 @ 0x1004a4978\n; > <???> @ 0x10097e628\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:06:04 +0000\n; \nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x1004a48d0\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x1004a48d4\nADD             X29, SP, #0x10                                         ; +0x8, 0x1004a48d8\nMOV             X19, X0                                                ; +0xc, 0x1004a48dc\nCMP             W1, #0x400                                             ; +0x10, 0x1004a48e0\nB.GT            loc_1004A48FC                                          ; +0x14, 0x1004a48e4\nCMP             W1, #0x25 ; '%'                                        ; +0x18, 0x1004a48e8\nB.EQ            loc_1004A490C                                          ; +0x1c, 0x1004a48ec\nCMP             W1, #0x27 ; '''                                        ; +0x20, 0x1004a48f0\nB.EQ            loc_1004A492C                                          ; +0x24, 0x1004a48f4\nB               loc_1004A4964                                          ; +0x28, 0x1004a48f8\nCMP             W1, #0x403                                             ; +0x2c, 0x1004a48fc\nB.EQ            loc_1004A492C                                          ; +0x30, 0x1004a4900\nCMP             W1, #0x401                                             ; +0x34, 0x1004a4904\nB.NE            loc_1004A4964                                          ; +0x38, 0x1004a4908\nLDR             X0, [X19,#0x268]                                       ; +0x3c, 0x1004a490c\nLDR             X8, [X0]                                               ; +0x40, 0x1004a4910\nLDR             X8, [X8,#0x160]                                        ; +0x44, 0x1004a4914\nBLR             X8                                                     ; +0x48, 0x1004a4918\nCBZ             W0, loc_1004A4958                                      ; +0x4c, 0x1004a491c\nLDR             W8, [X19,#0x25C]                                       ; +0x50, 0x1004a4920\nSUB             W1, W8, #1                                             ; +0x54, 0x1004a4924\nB               loc_1004A4948                                          ; +0x58, 0x1004a4928\nLDR             X0, [X19,#0x260]                                       ; +0x5c, 0x1004a492c\nLDR             X8, [X0]                                               ; +0x60, 0x1004a4930\nLDR             X8, [X8,#0x160]                                        ; +0x64, 0x1004a4934\nBLR             X8                                                     ; +0x68, 0x1004a4938\nCBZ             W0, loc_1004A4958                                      ; +0x6c, 0x1004a493c\nLDR             W8, [X19,#0x25C]                                       ; +0x70, 0x1004a4940\nADD             W1, W8, #1                                             ; +0x74, 0x1004a4944\nMOV             X0, X19                                                ; +0x78, 0x1004a4948\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x7c, 0x1004a494c\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x80, 0x1004a4950\nB               sub_1004A4588                                          ; +0x84, 0x1004a4954\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x88, 0x1004a4958\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x8c, 0x1004a495c\nRET                                                                    ; +0x90, 0x1004a4960\nMOV             X0, X19                                                ; +0x94, 0x1004a4964\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x98, 0x1004a4968\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x9c, 0x1004a496c\nB               cocos2d__CCLayer__keyDown                              ; +0xa0, 0x1004a4970", "xrefs": ["sub_1004A4974 @ 0x1004a4978", "<???> @ 0x10097e628"], "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"}