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

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0xb0]
sub rsp, 0x1b0
mov rdi, rdx
mov rbx, rcx
mov rdx, rcx
mov ecx, 0x20
call qword [sym.imp.d3d9.dll_Direct3DCreate9Ex]
test eax, eax
jns 0x14005220b
mov eax, 0x80004005
add rsp, 0x1b0
pop rdi
pop rbx
pop rbp
ret
mov qword [rsp + 0x1a0], r12
lea rdx, [rbx + 0x10]
xor r12d, r12d
mov qword [rsp + 0x198], r14
mov qword [rbx + 0x1c], r12
lea r14, [rbx + 8]
mov qword [rbx + 0x28], 1
mov r9, rdi
mov qword [rbx + 0x44], r12
mov eax, dword [rbx + 0xe0]
lea r8d, [r12 + 1]
mov rcx, qword [rbx]
mov dword [rdx], eax
mov eax, dword [rbx + 0xe4]
mov qword [rsp + 0x38], r14
mov dword [rbx + 0x38], 1
mov qword [rbx + 0x30], rdi
mov dword [rbx + 0x24], r12d
mov dword [rbx + 0x18], 0x15
mov dword [rbx + 0x14], eax
mov dword [rbx + 0x3c], 1
mov dword [rbx + 0x40], 0x50
mov dword [rbx + 0x4c], 0x80000000
mov rax, qword [rcx]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], rdx
xor edx, edx
mov dword [rsp + 0x20], 0x40
call qword [rax + 0xa0]
test eax, eax
jns 0x1400522b6
mov rcx, qword [rbx]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov eax, 0x80004005
jmp 0x1400526c0
mov qword [rsp + 0x1a8], rsi
mov qword [rsp + 0x190], r15
call fcn.1400121d0
mov rbx, qword [0x1400c70d0]
lea rsi, [0x140065fc8]
xorps xmm2, xmm2
lea rdx, [rbp - 0x30]
movups xmmword [rsp + 0x50], xmm2
xor eax, eax
mov dword [rsp + 0x58], 3
mov rcx, qword [rbx + 0x58]
mov r15d, 0xffff
movups xmmword [rbp - 0x70], xmm2
mov qword [rbp - 0x40], rax
lea rax, [0x140071eb0]
movups xmmword [rsp + 0x40], xmm2
mov byte [rsp + 0x4c], 1
movups xmm0, xmmword [rsp + 0x40]
mov dword [rsp + 0x5c], 1
movups xmm1, xmmword [rsp + 0x50]
mov dword [rbp - 0x70], 0x3f800000
movaps xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x80], xmm2
mov dword [rbp - 0x7c], 0x7f7fffff
movups xmm0, xmmword [rbp - 0x80]
mov word [rbp - 0x6c], r15w
movaps xmmword [rbp - 0x20], xmm1
movups xmm1, xmmword [rbp - 0x70]
mov qword [rbx + 0x20], r12
movaps xmmword [rbp + 0x10], xmm0
movsd xmm0, qword [rbp - 0x40]
movaps xmmword [rbp], xmm2
movsd qword [rbp + 0x50], xmm0
movaps xmmword [rbp - 0x10], xmm2
movaps xmmword [rbp + 0x20], xmm1
movaps xmmword [rbp + 0x30], xmm2
movaps xmmword [rbp + 0x40], xmm2
mov qword [rbp - 0x30], rax
mov dword [rbp - 0x28], 0x184f8
mov dword [rbp - 0x1c], 0x41880000
mov qword [rbp + 8], rsi
call fcn.1400348f0
mov rcx, qword [rbx + 0x58]
lea rdx, [rbp - 0x30]
xorps xmm2, xmm2
mov qword [0x1400c70e0], rax
movups xmmword [rsp + 0x50], xmm2
xor eax, eax
mov dword [rsp + 0x58], 3
movups xmmword [rbp - 0x70], xmm2
mov qword [rbp - 0x40], rax
lea rax, [0x140070b20]
movups xmmword [rsp + 0x40], xmm2
mov byte [rsp + 0x4c], 1
movups xmm0, xmmword [rsp + 0x40]
mov dword [rsp + 0x5c], 1
movups xmm1, xmmword [rsp + 0x50]
mov dword [rbp - 0x70], 0x3f800000
movaps xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x80], xmm2
mov dword [rbp - 0x7c], 0x7f7fffff
movups xmm0, xmmword [rbp - 0x80]
mov word [rbp - 0x6c], r15w
movaps xmmword [rbp - 0x20], xmm1
movups xmm1, xmmword [rbp - 0x70]
mov qword [rbp - 0x30], rax
movaps xmmword [rbp + 0x10], xmm0
movsd xmm0, qword [rbp - 0x40]
movaps xmmword [rbp], xmm2
movsd qword [rbp + 0x50], xmm0
movaps xmmword [rbp - 0x10], xmm2
movaps xmmword [rbp + 0x20], xmm1
movaps xmmword [rbp + 0x30], xmm2
movaps xmmword [rbp + 0x40], xmm2
mov dword [rbp - 0x28], 0x12ec
mov dword [rbp - 0x1c], 0x41b00000
mov qword [rbp + 8], rsi
call fcn.1400348f0
mov qword [0x1400c70e8], rax
xorps xmm2, xmm2
xor eax, eax
mov rcx, qword [rbx + 0x58]
lea rdx, [rbp - 0x30]
movups xmmword [rsp + 0x50], xmm2
mov qword [rbp - 0x40], rax
lea rax, [0x14008a3b0]
movups xmmword [rbp - 0x70], xmm2
mov dword [rsp + 0x58], 3
movups xmmword [rsp + 0x40], xmm2
mov byte [rsp + 0x4c], 1
movups xmm0, xmmword [rsp + 0x40]
mov dword [rsp + 0x5c], 1
movups xmm1, xmmword [rsp + 0x50]
mov dword [rbp - 0x70], 0x3f800000
movaps xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x80], xmm2
mov dword [rbp - 0x7c], 0x7f7fffff
movups xmm0, xmmword [rbp - 0x80]
mov word [rbp - 0x6c], r15w
movaps xmmword [rbp - 0x20], xmm1
movups xmm1, xmmword [rbp - 0x70]
mov qword [rbp - 0x30], rax
movaps xmmword [rbp + 0x10], xmm0
movsd xmm0, qword [rbp - 0x40]
movaps xmmword [rbp], xmm2
movsd qword [rbp + 0x50], xmm0
movaps xmmword [rbp - 0x10], xmm2
movaps xmmword [rbp + 0x20], xmm1
movaps xmmword [rbp + 0x30], xmm2
movaps xmmword [rbp + 0x40], xmm2
mov dword [rbp - 0x28], 0x3c854
mov dword [rbp - 0x1c], 0x41f00000
mov qword [rbp + 8], rsi
call fcn.1400348f0
mov rsi, qword [0x1400c70d0]
lea rcx, [rbp + 0xe0]
mov qword [0x1400c7138], rax
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov r15, qword [rsp + 0x190]
test eax, eax
je 0x14005264a
lea rcx, [rbp + 0xe8]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x14005264a
mov rax, qword [0x1400c70d0]
test rax, rax
je 0x14005253e
inc dword [rax + 0xf4]
mov ecx, 0x48
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x14005256b
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbx], xmm0
movups xmmword [rbx + 0x10], xmm0
movups xmmword [rbx + 0x20], xmm0
movups xmmword [rbx + 0x30], xmm0
mov qword [rbx + 0x40], rax
jmp 0x14005256e
mov rbx, r12
or dword [rsi + 0xc], 6
lea rax, [rbp + 0xd0]
mov qword [rsi + 0x88], rax
mov qword [rsi + 0x98], rbx
mov qword [rbx], rdi
mov byte [rbx + 0x2d], 1
mov rax, qword [rbp + 0xe0]
mov qword [rbx + 0x20], rax
mov rax, qword [rbp + 0xe8]
mov qword [rbx + 0x18], rax
mov rax, qword [0x1400c70d0]
mov dword [rbx + 0x28], 9
mov rcx, qword [rax + 0x4898]
mov rax, qword [rcx]
mov qword [rax + 0x28], rdi
lea rax, str.xinput1_4.dll
mov qword [rbp + 0x60], rax
mov rdi, r12
lea rax, str.xinput1_3.dll
mov qword [rbp + 0x68], rax
lea rax, str.xinput9_1_0.dll
mov qword [rbp + 0x70], rax
lea rax, str.xinput1_2.dll
mov qword [rbp + 0x78], rax
lea rax, str.xinput1_1.dll
mov qword [rbp + 0x80], rax
nop dword [rax]
mov rcx, qword [rbp + rdi*8 + 0x60]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
jne 0x14005261e
inc rdi
cmp rdi, 5
jl 0x140052600
jmp 0x14005264a
lea rdx, str.XInputGetCapabilities
mov qword [rbx + 0x30], rsi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.XInputGetState
mov rcx, rsi
mov qword [rbx + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x40], rax
mov rbx, qword [0x1400c70d0]
mov rdi, qword [r14]
mov rsi, qword [rsp + 0x1a8]
test rbx, rbx
je 0x140052667
inc dword [rbx + 0xf4]
mov ecx, 0x28
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
test rax, rax
je 0x140052696
mov qword [rax], r12
mov qword [rax + 8], r12
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], r12
mov dword [rax + 0x20], 0x1388
mov dword [rax + 0x24], 0x2710
jmp 0x140052699
mov rax, r12
or dword [rbx + 0xc], 8
lea rcx, str.imgui_impl_dx9
mov qword [rbx + 0x90], rcx
mov rcx, rdi
mov qword [rbx + 0xa0], rax
mov qword [rax], rdi
mov rax, qword [rdi]
call qword [rax + 8]
xor eax, eax
mov r12, qword [rsp + 0x1a0]
mov r14, qword [rsp + 0x198]
add rsp, 0x1b0
pop rdi
pop rbx
pop rbp
ret