Function at 0x140054a80
Capabilities:
Terminate process

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
lea rdx, [0x14006bb10]
mov ecx, 0x20
call qword [sym.imp.d3d9.dll_Direct3DCreate9Ex]
test eax, eax
jns 0x140054abd
lea rdx, str._nFailed_to_create_Direct3D_object.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140057100
mov ecx, 3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
xorps xmm0, xmm0
movups xmmword [0x14006baa0], xmm0
movups xmmword [0x14006bab0], xmm0
movups xmmword [0x14006bac0], xmm0
movups xmmword [0x14006bad0], xmm0
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [0x14006baa0], eax
mov ecx, 1
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [0x14006baa4], eax
mov dword [0x14006baa8], 0x15
xor esi, esi
mov dword [0x14006bab4], esi
mov dword [0x14006bad0], 0x50
mov dword [0x14006bab8], 1
mov dword [0x14006bacc], 1
mov r9, qword [0x14006bb28]
mov qword [0x14006bac0], r9
mov dword [0x14006bac8], 1
mov rcx, qword [0x14006bb10]
mov rax, qword [rcx]
lea rdx, [0x14006bb18]
mov qword [rsp + 0x30], rdx
lea rdx, [0x14006baa0]
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x20], 0x20
xor edx, edx
mov r8d, 1
call qword [rax + 0x80]
test eax, eax
jns 0x140054b9e
lea rdx, str._nFailed_to_create_Direct3D_device.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140057100
mov ecx, 3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rbx, qword [0x14006ba60]
mov ecx, 0x63b8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r9, rax
mov r8, qword [0x14006ba60]
test r8, r8
je 0x140054c1e
mov r10d, dword [r8 + 0x3fc0]
movsx rdx, word [r8 + 0x6228]
lea rax, [r8 + 0x622c]
lea rax, [rax + rdx*8]
cmp dword [rax], r10d
je 0x140054c13
lea ecx, [rdx + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [r8 + 0x6228], cx
movsx rax, cx
lea rax, [rax*8 + 0x622c]
add rax, r8
mov dword [rax], r10d
mov dword [rax + 4], esi
inc word [rax + 4]
inc dword [r8 + 0x6220]
mov qword [rsp + 0x68], r9
lea rax, [rsp + 0x60]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], r9
test r9, r9
je 0x140054c43
xor edx, edx
mov rcx, r9
call fcn.140001620
jmp 0x140054c46
mov rax, rsi
mov qword [0x14006ba60], rax
call fcn.1400060a0
test rbx, rbx
je 0x140054c5e
mov qword [0x14006ba60], rbx
mov rcx, qword [0x14006bb28]
call fcn.1400313b0
mov rdi, qword [0x14006bb18]
mov rbx, qword [0x14006ba60]
mov ecx, 0x28
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r8, rax
mov r9, qword [0x14006ba60]
test r9, r9
je 0x140054cf2
mov r10d, dword [r9 + 0x3fc0]
movsx r11, word [r9 + 0x6228]
lea rdx, [r9 + 0x622c]
lea rdx, [rdx + r11*8]
cmp dword [rdx], r10d
je 0x140054ce7
lea ecx, [r11 + 1]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub ecx, eax
mov word [r9 + 0x6228], cx
movsx rax, cx
lea rdx, [r9 + 0x622c]
lea rdx, [rdx + rax*8]
mov dword [rdx], r10d
mov dword [rdx + 4], esi
inc word [rdx + 4]
inc dword [r9 + 0x6220]
test r8, r8
je 0x140054d18
mov qword [r8], rsi
mov qword [r8 + 8], rsi
mov qword [r8 + 0x10], rsi
mov qword [r8 + 0x18], rsi
mov dword [r8 + 0x20], 0x1388
mov dword [r8 + 0x24], 0x2710
jmp 0x140054d1b
mov r8, rsi
mov qword [rbx + 0xa0], r8
lea rax, str.imgui_impl_dx9
mov qword [rbx + 0x90], rax
or dword [rbx + 0xc], 8
mov qword [r8], rdi
mov rax, qword [rdi]
mov rcx, rdi
add rsp, 0x40
pop rdi
pop rsi
pop rbx
jmp qword [rax + 8]