Skip to content

Commit

Permalink
xapi: tune up GetTypeInformation and XInputOpen sigs
Browse files Browse the repository at this point in the history
  • Loading branch information
RadWolfie committed Sep 25, 2022
1 parent c44164e commit 45f1ebe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
24 changes: 18 additions & 6 deletions src/OOVPADatabase/Xapi/4242.inl
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,18 @@
// ******************************************************************
// * XInputOpen
// ******************************************************************
OOVPA_SIG_HEADER_NO_XREF(XInputOpen,
4242)
// Generic OOVPA as of 4242 and newer.
OOVPA_SIG_HEADER_XREF(XInputOpen,
4242,
XRefTwo)
OOVPA_SIG_MATCH(

// call GetTypeInformation
XREF_ENTRY(0x0C, XREF_XAPI_GetTypeInformation),

// call SetLastError
XREF_ENTRY(0x17, XREF_XAPI_SetLastError),

// push 0x57
OV_MATCH(0x14, 0x6A, 0x57),

Expand Down Expand Up @@ -270,6 +278,7 @@ OOVPA_SIG_MATCH(
// ******************************************************************
// * GetTypeInformation
// ******************************************************************
// Generic OOVPA as of 4242 and newer.
OOVPA_SIG_HEADER_XREF(GetTypeInformation,
4242,
XRefTwo)
Expand All @@ -295,15 +304,18 @@ OOVPA_SIG_MATCH(
OV_MATCH(0x11, 0x8B, 0x10),
// test edx,edx
OV_MATCH(0x13, 0x85, 0xD2),
// JZ +0x05
OV_MATCH(0x15, 0x74, 0x05),

// cmp dword [edx + 0x04],ecx
OV_MATCH(0x17, 0x39, 0x4A, 0x04),
// JZ +0x0B
OV_MATCH(0x1A, 0x74, 0x0B),
// add eax,0x04
OV_MATCH(0x1C, 0x83, 0xC0, 0x04),
// cmp eax,esi
OV_MATCH(0x1F, 0x3B),

// ret
OV_MATCH(0x26, 0xC3),

// ret
OV_MATCH(0x2A, 0xC3),
//
);
4 changes: 2 additions & 2 deletions src/OOVPADatabase/Xapi_OOVPA.inl
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ OOVPATable XAPILIB_OOVPA[] = {
REGISTER_OOVPAS_XAPI(GetOverlappedResult, 3911),
REGISTER_OOVPAS_XAPI(GetThreadPriority, 3911),
REGISTER_OOVPAS_XAPI(GetTimeZoneInformation, 3911),
REGISTER_OOVPAS_M_PREFIX(GetTypeInformation, XAPI, 4242),
REGISTER_OOVPAS_M_PREFIX(GetTypeInformation, XAPI, 4242), // Final generic OOVPA: 4242; Removed: 0
REGISTER_OOVPAS_M(MU_Init, 3911, 4242, 5233),
REGISTER_OOVPAS_XAPI(OutputDebugStringA, 3911), // Final generic OOVPA: 3911; Removed: 0
REGISTER_OOVPAS_XAPI(OutputDebugStringW, 3911), // Final generic OOVPA: 3911; Removed: 0
Expand All @@ -472,7 +472,7 @@ OOVPATable XAPILIB_OOVPA[] = {
REGISTER_OOVPAS(XInputGetCapabilities, 3911, 4831), // Final generic OOVPA: 4831; Removed: 0
REGISTER_OOVPAS(XInputGetDeviceDescription, 4831),
REGISTER_OOVPAS(XInputGetState, 3911, 4242, 5455),
REGISTER_OOVPAS_C(XInputOpen, 3911, 4242),
REGISTER_OOVPAS_C(XInputOpen, 3911, 4242), // Final generic OOVPA: 4242; Removed: 0
REGISTER_OOVPAS(XInputPoll, 3911),
REGISTER_OOVPAS(XInputSetLightgunCalibration, 4831),
REGISTER_OOVPAS(XInputSetState, 3911, 4242, 4831),
Expand Down

0 comments on commit 45f1ebe

Please sign in to comment.