//
// sub_1800DE460 from 0x1800de460 to 0x1800de6b4 (596 bytes)
//
// 4 xrefs:
// > sub_1800E1D90 @ 0x1800e2218
// > ??> @ 0x18014c55c
// > ??> @ 0x18014c56c
// > ??> @ 0x1801c4fc8
//
// 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:22:35 +0000
//
void sub_1800DE460()
{
unsigned int i; // ebx
int v1; // ecx
_DWORD *v2; // rax
char *v3; // rcx
char *v4; // rax
char v5; // [rsp+30h] [rbp-58h] BYREF
unsigned __int8 v6; // [rsp+31h] [rbp-57h]
char v7; // [rsp+32h] [rbp-56h]
char Buffer[40]; // [rsp+48h] [rbp-40h] BYREF
if ( qword_1801B6088 && (int)qword_1801B6090(phModule, 2048, &unk_180127530, &qword_1801B6098, 0) < 0 )
sub_1800DB260(0x10008u, "Win32: Failed to create interface");
if ( qword_1801B60A0 )
{
for ( i = 0; i < 4; ++i )
{
v1 = 0;
v2 = &unk_1801B40F8;
do
{
if ( *(v2 - 63) && !*(_QWORD *)v2 && v2[2] == i )
break;
++v1;
v2 += 72;
}
while ( (__int64)v2 <= (__int64)dword_1801B51D8 );
if ( v1 > 15 && !(unsigned int)qword_1801B60A8(i, 0, &v5) )
{
sub_1800095F0(Buffer, "78696e707574%02x000000000000000000", v6);
switch ( v6 )
{
case 1u:
v3 = "Wireless Xbox Controller";
if ( (v7 & 2) == 0 )
v3 = "Xbox Controller";
break;
case 2u:
v3 = "XInput Wheel";
break;
case 3u:
v3 = "XInput Arcade Stick";
break;
case 4u:
v3 = "XInput Flight Stick";
break;
case 5u:
v3 = "XInput Dance Pad";
break;
case 6u:
v3 = "XInput Guitar";
break;
case 8u:
v3 = "XInput Drum Kit";
break;
default:
v3 = "Unknown XInput Device";
break;
}
v4 = sub_1800DCD70(v3, Buffer, 6, 10, 1);
if ( v4 )
{
*((_DWORD *)v4 + 66) = i;
sub_1800DD170((__int64)v4, 0x40001u);
}
}
}
}
if ( qword_1801B6098 )
{
if ( (*(int (__fastcall **)(__int64, __int64, __int64 (__fastcall *)()))(*(_QWORD *)qword_1801B6098 + 32LL))(
qword_1801B6098,
4,
sub_1800DE830) < 0 )
sub_1800DB260(0x10008u, "Failed to enumerate DirectInput8 devices");
}
}