Function at 0x14002cac0
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x70
mov rbp, qword [0x140040698]
lea rdx, [0x140040710]
mov ecx, 0x20
call qword [sym.imp.d3d9.dll_Direct3DCreate9Ex]
test eax, eax
jns 0x14002caf8
mov ecx, 3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
xor r14d, r14d
mov qword [0x14004074c], r14
mov qword [0x140040758], 1
mov qword [0x140040774], r14
mov dword [0x140040768], 1
mov qword [0x140040760], rbp
mov dword [0x140040754], r14d
mov dword [0x140040748], 0x15
mov eax, dword [0x1400407ac]
mov dword [0x140040740], eax
mov eax, dword [0x1400407a8]
mov dword [0x140040744], eax
mov dword [0x14004076c], 1
mov dword [0x140040770], 0x50
mov dword [0x14004077c], r14d
mov rcx, qword [0x140040710]
mov rax, qword [rcx]
lea rdx, [0x1400407a0]
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], r14
lea rdx, [0x140040740]
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x20], 0x40
mov r9, rbp
xor edx, edx
lea r8d, [r14 + 1]
call qword [rax + 0xa0]
test eax, eax
jns 0x14002cbc3
mov rcx, qword [0x140040710]
mov rax, qword [rcx]
call qword [rax + 0x10]
lea ecx, [r14 + 4]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rbx, qword [0x140040680]
test rbx, rbx
je 0x14002cbd5
inc dword [rbx + 0xec]
mov rdx, qword [0x140040670]
mov ecx, 0x5678
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0xa0]
mov qword [rsp + 0xb0], rcx
mov qword [rsp + 0xb8], rax
test rax, rax
je 0x14002cc17
xor edx, edx
mov rcx, rax
call fcn.1400012f0
jmp 0x14002cc1a
mov rax, r14
mov qword [0x140040680], rax
call fcn.1400073b0
mov rsi, qword [0x140040680]
test rbx, rbx
cmovne rsi, rbx
mov qword [0x140040680], rsi
mov qword [rsi + 0x20], r14
lea rcx, [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x14002cd9a
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x14002cd9a
mov rax, qword [0x140040680]
test rax, rax
je 0x14002cc7d
inc dword [rax + 0xec]
mov rdx, qword [0x140040670]
mov ecx, 0x48
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rdi, rax
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x14002ccb8
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rdi], xmm0
movups xmmword [rdi + 0x10], xmm0
movups xmmword [rdi + 0x20], xmm0
movups xmmword [rdi + 0x30], xmm0
mov qword [rdi + 0x40], rax
jmp 0x14002ccbb
mov rdi, r14
mov qword [rsi + 0x90], rdi
lea rax, str.imgui_impl_win32
mov qword [rsi + 0x80], rax
or dword [rsi + 0xc], 6
mov qword [rdi], rbp
mov byte [rdi + 0x2d], 1
mov rax, qword [rsp + 0xa8]
mov qword [rdi + 0x20], rax
mov rax, qword [rsp + 0xb0]
mov qword [rdi + 0x18], rax
mov dword [rdi + 0x28], 9
mov rax, qword [0x140040680]
mov rcx, qword [rax + 0x40b0]
mov rax, qword [rcx]
mov qword [rax + 0x28], rbp
lea rax, str.xinput1_4.dll
mov qword [rsp + 0x40], rax
lea rax, str.xinput1_3.dll
mov qword [rsp + 0x48], rax
lea rax, str.xinput9_1_0.dll
mov qword [rsp + 0x50], rax
lea rax, str.xinput1_2.dll
mov qword [rsp + 0x58], rax
lea rax, str.xinput1_1.dll
mov qword [rsp + 0x60], rax
mov rbx, r14
nop
mov rcx, qword [rsp + rbx*8 + 0x40]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
jne 0x14002cd6e
inc rbx
cmp rbx, 5
jl 0x14002cd50
jmp 0x14002cd9a
mov qword [rdi + 0x30], rsi
lea rdx, str.XInputGetCapabilities
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rdi + 0x38], rax
lea rdx, str.XInputGetState
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rdi + 0x40], rax
mov rdi, qword [0x1400407a0]
mov rbx, qword [0x140040680]
test rbx, rbx
je 0x14002cdb3
inc dword [rbx + 0xec]
mov rdx, qword [0x140040670]
mov ecx, 0x28
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x14002cdf1
xorps xmm0, xmm0
xor ecx, ecx
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
mov qword [rax + 0x20], rcx
mov dword [rax + 0x20], 0x1388
mov dword [rax + 0x24], 0x2710
jmp 0x14002cdf4
mov rax, r14
mov qword [rbx + 0x98], rax
lea rcx, str.imgui_impl_dx9
mov qword [rbx + 0x88], rcx
or dword [rbx + 0xc], 8
mov qword [rax], rdi
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 8]
xor eax, eax
add rsp, 0x70
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret