Function at 0x401170
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x429ef0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x30
mov eax, dword [0x432040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x432650]
test eax, eax
je 0x4011bd
inc dword [eax + 0x36c]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x3e00
call edi
add esp, 4
test eax, eax
je 0x4011dc
push 0
mov ecx, eax
call fcn.004022e0
jmp 0x4011de
xor eax, eax
cmp dword [0x432650], 0
jne 0x4011ec
mov dword [0x432650], eax
mov ecx, eax
call fcn.00407c60
mov esi, dword [0x432650]
movaps xmm0, xmmword [0x42fc60]
mov eax, dword [0x4325cc]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x20]
mov dword [esi + 0x20], 0
mov dword [esi + 0x156c], 0x41400000
mov dword [esi + 0x1538], 0x41700000
movups xmmword [esi + 0x1610], xmm0
push eax
movaps xmm0, xmmword [0x42fcc0]
movups xmmword [esi + 0x1660], xmm0
movaps xmm0, xmmword [0x42fd00]
movups xmmword [esi + 0x1670], xmm0
movaps xmm0, xmmword [0x42fcf0]
movups xmmword [esi + 0x1740], xmm0
movaps xmm0, xmmword [0x42fd30]
movups xmmword [esi + 0x1750], xmm0
movaps xmm0, xmmword [0x42fd50]
movups xmmword [esi + 0x1760], xmm0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x40140a
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x40140a
mov eax, dword [0x432650]
test eax, eax
je 0x4012a3
inc dword [eax + 0x36c]
push 0x38
call edi
mov edi, eax
add esp, 4
test edi, edi
je 0x4012bf
push 0x38
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x4012c1
xor edi, edi
or dword [esi + 0xc], 6
mov edx, dword [ebp - 0x2c]
mov dword [esi + 0xc4], edi
mov dword [esi + 0xbc], str.imgui_impl_win32
mov dword [edi], edx
mov byte [edi + 0x25], 1
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], ecx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], ecx
mov dword [edi + 0x20], 9
mov dword [esi + 0xe0], edx
mov dword [esi + 0x34], 9
mov dword [esi + 0x38], 0x25
mov dword [esi + 0x3c], 0x27
mov dword [esi + 0x40], 0x26
mov dword [esi + 0x44], 0x28
mov dword [esi + 0x48], 0x21
mov dword [esi + 0x4c], 0x22
mov dword [esi + 0x50], 0x24
mov dword [esi + 0x54], 0x23
mov dword [esi + 0x58], 0x2d
mov dword [esi + 0x5c], 0x2e
mov dword [esi + 0x60], 8
mov dword [esi + 0x64], 0x20
mov dword [esi + 0x68], 0xd
mov dword [esi + 0x6c], 0x1b
mov dword [esi + 0x70], 0xd
mov dword [esi + 0x74], 0x41
mov dword [esi + 0x78], 0x43
mov dword [esi + 0x7c], 0x56
mov dword [esi + 0x80], 0x58
mov dword [esi + 0x84], 0x59
mov dword [esi + 0x88], 0x5a
xor esi, esi
mov dword [ebp - 0x40], str.xinput1_4.dll
mov dword [ebp - 0x3c], str.xinput1_3.dll
mov dword [ebp - 0x38], str.xinput9_1_0.dll
mov dword [ebp - 0x34], str.xinput1_2.dll
mov dword [ebp - 0x30], str.xinput1_1.dll
nop dword [eax + eax]
push dword [ebp + esi*4 - 0x40]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x4013e9
inc esi
cmp esi, 5
jl 0x4013d0
jmp 0x40140a
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.XInputGetCapabilities
push eax
mov dword [edi + 0x28], eax
call esi
push str.XInputGetState
push dword [ebp - 0x2c]
mov dword [edi + 0x2c], eax
call esi
mov dword [edi + 0x30], eax
mov esi, dword [0x432650]
mov edi, dword [0x4325d0]
test esi, esi
je 0x401420
inc dword [esi + 0x36c]
push 0x18
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
test eax, eax
je 0x40145a
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0x1388
mov dword [eax + 0x14], 0x2710
jmp 0x40145c
xor eax, eax
or dword [esi + 0xc], 8
mov dword [esi + 0xc8], eax
mov dword [esi + 0xc0], str.imgui_impl_dx9
mov dword [eax], edi
mov eax, dword [edi]
push edi
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00428c21
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret