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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
push ebx
push esi
push edi
push 0x4b6e28
push 0x20
call dword [sym.imp.d3d9.dll_Direct3DCreate9Ex]
test eax, eax
js 0x436b37
mov eax, dword [0x4b6f14]
xorps xmm0, xmm0
movlpd qword [esp + 0x28], xmm0
movlpd qword [esp + 0x34], xmm0
movlpd qword [esp + 0x4c], xmm0
movlpd qword [esp + 0x54], xmm0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x48], 1
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x30], 0x15
call fcn.00439490
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x28], eax
call fcn.00439490
push 0x4b6e2c
push 0
lea edx, [esp + 0x30]
mov eax, dword [eax + 0x18]
push edx
push 0x40
push dword [0x4b6f14]
mov dword [esp + 0x40], eax
mov eax, dword [0x4b6e28]
push 1
mov dword [esp + 0x64], 1
mov dword [esp + 0x68], 0x50
mov dword [esp + 0x74], 1
mov dword [esp + 0x70], 0
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x50]
test eax, eax
jns 0x436b40
mov eax, dword [0x4b6e28]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x4b6d20]
test eax, eax
je 0x436b4f
inc dword [eax + 0x370]
push 0x3d30
call fcn.00462c9a
add esp, 4
mov dword [esp + 0x10], eax
lea ecx, [esp + 0xf]
test eax, eax
je 0x436b74
push ecx
mov ecx, eax
call fcn.00403630
mov ecx, eax
jmp 0x436b76
xor ecx, ecx
mov eax, dword [0x4b6d20]
test eax, eax
cmove eax, ecx
mov dword [0x4b6d20], eax
call fcn.00409000
mov eax, dword [0x4b6d20]
mov esi, dword [0x4b6f14]
push 0x4b7160
or dword [eax + 8], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x436ceb
push 0x4b7158
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x436ceb
mov eax, dword [0x4b6d20]
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x4b7150], esi
mov dword [esp + 0x14], str.xinput1_4.dll
or dword [eax + 0xc], 6
mov dword [eax + 0xe0], esi
xor esi, esi
mov dword [eax + 0xbc], str.imgui_impl_win32
mov dword [eax + 0x34], 9
mov dword [eax + 0x38], 0x25
mov dword [eax + 0x3c], 0x27
mov dword [eax + 0x40], 0x26
mov dword [eax + 0x44], 0x28
mov dword [eax + 0x48], 0x21
mov dword [eax + 0x4c], 0x22
mov dword [eax + 0x50], 0x24
mov dword [eax + 0x54], 0x23
mov dword [eax + 0x58], 0x2d
mov dword [eax + 0x5c], 0x2e
mov dword [eax + 0x60], 8
mov dword [eax + 0x64], 0x20
mov dword [eax + 0x68], 0xd
mov dword [eax + 0x6c], 0x1b
mov dword [eax + 0x70], 0xd
mov dword [eax + 0x74], 0x41
mov dword [eax + 0x78], 0x43
mov dword [eax + 0x7c], 0x56
mov dword [eax + 0x80], 0x58
mov dword [eax + 0x84], 0x59
mov dword [eax + 0x88], 0x5a
mov dword [esp + 0x18], str.xinput1_3.dll
mov dword [esp + 0x1c], str.xinput9_1_0.dll
mov dword [esp + 0x20], str.xinput1_2.dll
mov dword [esp + 0x24], str.xinput1_1.dll
push dword [esp + esi*4 + 0x14]
call ebx
mov edi, eax
test edi, edi
jne 0x436cc5
inc esi
cmp esi, 5
jl 0x436cb1
jmp 0x436ceb
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.XInputGetCapabilities
push edi
mov dword [0x4b7144], edi
call esi
push str.XInputGetState
push edi
mov dword [0x4b7148], eax
call esi
mov dword [0x4b714c], eax
mov ecx, dword [0x4b6e2c]
mov eax, dword [0x4b6d20]
push ecx
mov dword [0x4b7138], ecx
or dword [eax + 0xc], 8
mov dword [eax + 0xc0], str.imgui_impl_dx9
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x4b6e28]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret