//
// ControllerInputNode::onButton from 0x140448420 to 0x14044848e (110 bytes)
//
// 2 xrefs:
// > ControllerInputNode::init @ 0x140447f9e
// > ??> @ 0x14092729c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:32:24 +0000
//
char *__fastcall ControllerInputNode::onButton(__int64 a1, __int64 a2)
{
_DWORD *v3; // rbx
__int64 v4; // rdx
char *result; // rax
int v6; // ecx
__int64 v7; // r8
v3 = (_DWORD *)((char *)&unk_140703C00 + 32 * (*(int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2));
*(_DWORD *)(a1 + 332) = *v3;
result = ControllerInputNode::refreshVisuals(a1, v4);
v6 = *v3;
if ( *(_BYTE *)(a1 + 328) )
{
result = (char *)(unsigned int)(v6 + 1);
if ( (v6 & 1) != 0 )
LOWORD(v6) = v6 + 1;
}
v7 = *(_QWORD *)(a1 + 320);
if ( v7 )
return (char *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v7 + 8LL))(
*(_QWORD *)(a1 + 320),
(unsigned __int16)v6);
return result;
}