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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43edc0
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x483008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x55dddc]
test eax, eax
je 0x405cbd
inc dword [eax + 0x36c]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x3e00
call ebx
add esp, 4
test eax, eax
je 0x405cde
push 0
mov ecx, eax
call fcn.0040d170
mov ecx, eax
jmp 0x405ce0
xor ecx, ecx
mov eax, dword [0x55dddc]
test eax, eax
cmove eax, ecx
mov dword [0x55dddc], eax
call fcn.00413970
mov edi, dword [0x55dddc]
push ecx
mov ecx, str.C:WindowsFonts_segoeui.ttf
mov dword [ebp - 0x9c], edi
mov dword [ebp - 0xa0], 0
mov eax, dword [edi + 0x98]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0xa0]
push eax
call fcn.0040ecc0
add esp, 8
mov dword [ebp - 0x14], eax
mov esi, 0xffff
test eax, eax
je 0x405e22
push 0x78
lea eax, [ebp - 0x130]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov word [ebp - 0xe8], si
lea edi, [ebp - 0x98]
add esp, 0xc
mov byte [ebp - 0x128], 1
cmp byte [ebp - 0xe6], 0
lea esi, [ebp - 0x130]
mov ecx, 0x1e
mov dword [ebp - 0x11c], 3
mov dword [ebp - 0x118], 1
mov dword [ebp - 0xf8], 0x7f7fffff
mov dword [ebp - 0xec], 0x3f800000
rep movsd dword es:[edi], dword [esi]
jne 0x405ddb
mov eax, 0x440ccc
mov cl, byte [eax - 1]
cmp cl, 0x2f
je 0x405db7
cmp cl, 0x5c
je 0x405db7
dec eax
cmp eax, str.C:WindowsFonts_segoeui.ttf
ja 0x405da2
movsd xmm0, qword [0x47efb0]
sub esp, 8
movsd qword [esp], xmm0
push eax
push str._s___.0fpx
lea eax, [ebp - 0x4e]
push 0x28
push eax
call fcn.0040eae0
add esp, 0x18
mov eax, dword [ebp - 0x14]
lea esi, [ebp - 0x98]
mov ecx, 0x1e
lea edi, [ebp - 0x130]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x130], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x12c], eax
lea eax, [ebp - 0x130]
push eax
mov dword [ebp - 0x120], 0x41800000
call fcn.0042cbb0
mov edi, dword [ebp - 0x9c]
mov esi, dword [edi + 0x98]
push 0x78
push 0
mov ecx, dword [esi + 0x34]
mov eax, dword [esi + 0x3c]
mov eax, dword [eax + ecx*4 - 4]
mov dword [edi + 0xa4], eax
lea eax, [ebp - 0x130]
push eax
call sub.VCRUNTIME140.dll_memset
movss xmm3, dword [0x47eff8]
add esp, 0xc
mov eax, 0xffff
mov byte [ebp - 0x128], 1
mov word [ebp - 0xe8], ax
lea eax, [ebp - 0x130]
mov dword [ebp - 0x11c], 3
push 0x47e8ec
push eax
push ecx
push 0x441350
mov ecx, esi
mov dword [ebp - 0x118], 1
mov dword [ebp - 0xf8], 0x7f7fffff
mov dword [ebp - 0xec], 0x3f800000
mov byte [ebp - 0xf4], 1
mov byte [ebp - 0x114], 1
call fcn.0042cd90
xor ecx, ecx
mov dword [edi + 0x20], 0
call fcn.00429180
mov eax, dword [0x55dd38]
mov esi, dword [0x55dddc]
mov dword [ebp - 0x9c], eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x406081
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x406081
mov eax, dword [0x55dddc]
test eax, eax
je 0x405f07
inc dword [eax + 0x36c]
push 0x38
call ebx
mov edi, eax
add esp, 4
test edi, edi
je 0x405f23
push 0x38
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x405f25
xor edi, edi
or dword [esi + 0xc], 6
mov edx, dword [ebp - 0x9c]
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 - 0x18]
mov ecx, dword [ebp - 0x14]
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 - 0xb4], str.xinput1_4.dll
mov dword [ebp - 0xb0], str.xinput1_3.dll
mov dword [ebp - 0xac], str.xinput9_1_0.dll
mov dword [ebp - 0xa8], str.xinput1_2.dll
mov dword [ebp - 0xa4], str.xinput1_1.dll
push dword [ebp + esi*4 - 0xb4]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
jne 0x40605c
inc esi
cmp esi, 5
jl 0x406041
jmp 0x40607b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.XInputGetCapabilities
push ebx
mov dword [edi + 0x28], ebx
call esi
push str.XInputGetState
push ebx
mov dword [edi + 0x2c], eax
call esi
mov dword [edi + 0x30], eax
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, dword [0x55dddc]
mov edi, dword [0x55dd3c]
test esi, esi
je 0x406097
inc dword [esi + 0x36c]
push 0x18
call ebx
add esp, 4
test eax, eax
je 0x4060cd
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 0x4060cf
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
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043d625
mov esp, ebp
pop ebp
ret