Function at 0x140056140
Capabilities:
Terminate process

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
lea rdx, [0x14006cb10]
mov ecx, 0x20
call qword [sym.imp.d3d9.dll_Direct3DCreate9Ex]
test eax, eax
jns 0x14005617d
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.1400580d0
mov ecx, 3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
xorps xmm0, xmm0
movups xmmword [0x14006caa0], xmm0
movups xmmword [0x14006cab0], xmm0
movups xmmword [0x14006cac0], xmm0
movups xmmword [0x14006cad0], xmm0
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [0x14006caa0], eax
mov ecx, 1
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [0x14006caa4], eax
mov dword [0x14006caa8], 0x15
xor esi, esi
mov dword [0x14006cab4], esi
mov dword [0x14006cad0], 0x50
mov dword [0x14006cab8], 1
mov dword [0x14006cacc], 1
mov r9, qword [0x14006cb28]
mov qword [0x14006cac0], r9
mov dword [0x14006cac8], 1
mov rcx, qword [0x14006cb10]
mov rax, qword [rcx]
lea rdx, [0x14006cb18]
mov qword [rsp + 0x30], rdx
lea rdx, [0x14006caa0]
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x20], 0x20
xor edx, edx
mov r8d, 1
call qword [rax + 0x80]
test eax, eax
jns 0x14005625e
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.1400580d0
mov ecx, 3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rbx, qword [0x14006ca60]
mov ecx, 0x63b8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r9, rax
mov r8, qword [0x14006ca60]
test r8, r8
je 0x1400562de
mov r10d, dword [r8 + 0x3fc0]
movsx rdx, word [r8 + 0x6228]
lea rax, [r8 + 0x622c]
lea rax, [rax + rdx*8]
cmp dword [rax], r10d
je 0x1400562d3
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 0x140056303
xor edx, edx
mov rcx, r9
call fcn.140001620
jmp 0x140056306
mov rax, rsi
mov qword [0x14006ca60], rax
call fcn.1400060a0
test rbx, rbx
je 0x14005631e
mov qword [0x14006ca60], rbx
mov rcx, qword [0x14006cb28]
call fcn.1400313b0
mov rdi, qword [0x14006cb18]
mov rbx, qword [0x14006ca60]
mov ecx, 0x28
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r8, rax
mov r9, qword [0x14006ca60]
test r9, r9
je 0x1400563b2
mov r10d, dword [r9 + 0x3fc0]
movsx r11, word [r9 + 0x6228]
lea rdx, [r9 + 0x622c]
lea rdx, [rdx + r11*8]
cmp dword [rdx], r10d
je 0x1400563a7
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 0x1400563d8
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 0x1400563db
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]