{"type": "func", "start": 13198204, "end": 13198340, "name": "ControllerInputNode::onButton", "pseudocode": "// \n// ControllerInputNode::onButton from 0xc9637c to 0xc96404 (136 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0xcf310\n// > ControllerInputNode::init @ 0xc968fc\n// > <???> @ 0x15461c0\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 13:05:53 +0000\n// \n\n__int64 __fastcall ControllerInputNode::onButton(ControllerInputNode *this, cocos2d::CCObject *a2)\n{\n  bool *v3; // x2\n  int v4; // w20\n  __int64 result; // x0\n  __int64 v6; // x19\n  unsigned __int16 v7; // w0\n  __int64 (__fastcall *v8)(__int64, _QWORD); // x20\n  unsigned int v9; // w0\n\n  v3 = (bool *)(32LL * (*(int (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2));\n  v4 = *(_DWORD *)((char *)&unk_13FB140 + (_QWORD)v3);\n  *((_DWORD *)this + 83) = v4;\n  ControllerInputNode::refreshVisuals(this, (__int64)&unk_13FB140, v3);\n  result = *((unsigned __int8 *)this + 328);\n  if ( *((_BYTE *)this + 328) )\n  {\n    result = v4 & 1;\n    LOWORD(v4) = v4 + (v4 & 1);\n  }\n  v6 = *((_QWORD *)this + 40);\n  if ( v6 )\n  {\n    v7 = v4;\n    v8 = *(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 16LL);\n    v9 = GJKeybindManager::encodeChord(v7, 0, 0, 0);\n    return v8(v6, v9);\n  }\n  return result;\n}", "assembly": "; \n; ControllerInputNode::onButton from 0xc9637c to 0xc96404 (136 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0xcf310\n; > ControllerInputNode::init @ 0xc968fc\n; > <???> @ 0x15461c0\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 13:05:53 +0000\n; \nSTP             X29, X30, [SP,#-0x20+var_s0]!                          ; +0x0, 0xc9637c\nMOV             X29, SP                                                ; +0x4, 0xc96380\nSTP             X19, X20, [SP,#var_s10]                                ; +0x8, 0xc96384\nMOV             X19, X0                                                ; +0xc, 0xc96388\nMOV             X0, X1                                                 ; +0x10, 0xc9638c\nLDR             X1, [X1]                                               ; +0x14, 0xc96390\nLDR             X1, [X1,#0x40]                                         ; +0x18, 0xc96394\nBLR             X1                                                     ; +0x1c, 0xc96398\nSBFIZ           X2, X0, #5, #0x20 ; ' '                                ; +0x20, 0xc9639c\nADRP            X1, #unk_13FB140@PAGE                                  ; +0x24, 0xc963a0\nMOV             X0, X19; this                                          ; +0x28, 0xc963a4\nADD             X1, X1, #unk_13FB140@PAGEOFF                           ; +0x2c, 0xc963a8\nLDR             W20, [X1,X2]                                           ; +0x30, 0xc963ac\nSTR             W20, [X19,#0x14C]                                      ; +0x34, 0xc963b0\nBL              _ZN19ControllerInputNode14refreshVisualsEv; ControllerInputNode::refreshVisuals(void) ; +0x38, 0xc963b4\nLDRB            W0, [X19,#0x148]                                       ; +0x3c, 0xc963b8\nCBZ             W0, loc_C963C8                                         ; +0x40, 0xc963bc\nAND             W0, W20, #1                                            ; +0x44, 0xc963c0\nADD             W20, W20, W0                                           ; +0x48, 0xc963c4\nLDR             X19, [X19,#0x140]                                      ; +0x4c, 0xc963c8\nCBZ             X19, loc_C963F8                                        ; +0x50, 0xc963cc\nLDR             X4, [X19]                                              ; +0x54, 0xc963d0\nMOV             W0, W20                                                ; +0x58, 0xc963d4\nMOV             W1, #0                                                 ; +0x5c, 0xc963d8\nMOV             W2, #0                                                 ; +0x60, 0xc963dc\nMOV             W3, #0                                                 ; +0x64, 0xc963e0\nLDR             X20, [X4,#0x10]                                        ; +0x68, 0xc963e4\nBL              _ZN16GJKeybindManager11encodeChordEN7cocos2d12enumKeyCodesEbbb; GJKeybindManager::encodeChord(cocos2d::enumKeyCodes,bool,bool,bool) ; +0x6c, 0xc963e8\nMOV             W1, W0                                                 ; +0x70, 0xc963ec\nMOV             X0, X19                                                ; +0x74, 0xc963f0\nBLR             X20                                                    ; +0x78, 0xc963f4\nLDP             X19, X20, [SP,#var_s10]                                ; +0x7c, 0xc963f8\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x80, 0xc963fc\nRET                                                                    ; +0x84, 0xc96400", "xrefs": ["<???> @ 0xcf310", "ControllerInputNode::init @ 0xc968fc", "<???> @ 0x15461c0"], "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"}