Function at 0x140040120
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x78
mov rsi, qword [0x1400ead20]
lea rdx, [0x1400ead30]
mov ecx, reloc.WLDAP32.dll_Ordinal_32
call qword [sym.imp.d3d9.dll_Direct3DCreate9Ex]
test eax, eax
jns 0x140040156
mov ecx, 3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
xor ebp, ebp
mov qword [0x1400eb2ac], rbp
mov qword [0x1400eb2b8], 1
mov qword [0x1400eb2d4], rbp
mov dword [0x1400eb2c8], 1
mov qword [0x1400eb2c0], rsi
mov dword [0x1400eb2b4], ebp
mov dword [0x1400eb2a8], 0x15
mov eax, dword [0x1400eb35c]
mov dword [0x1400eb2a0], eax
mov eax, dword [0x1400eb350]
mov dword [0x1400eb2a4], eax
mov dword [0x1400eb2cc], 1
mov dword [0x1400eb2d0], 0x50
mov dword [0x1400eb2dc], 0x80000000
mov rcx, qword [0x1400ead30]
mov rax, qword [rcx]
lea rdx, [0x1400eb300]
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], rbp
lea rdx, [0x1400eb2a0]
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x20], 0x40
mov r9, rsi
xor edx, edx
lea r8d, [rbp + 1]
call qword [rax + 0xa0]
test eax, eax
jns 0x140040221
mov rcx, qword [0x1400ead30]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
lea ecx, [rbp + 4]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rdi, qword [0x1400eac60]
test rdi, rdi
je 0x140040233
inc dword [rdi + 0xec]
mov rdx, qword [0x1400eac50]
mov ecx, 0x5728
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 0x140040275
xor edx, edx
mov rcx, rax
call fcn.140001a10
jmp 0x140040278
mov rax, rbp
mov qword [0x1400eac60], rax
call fcn.140008340
mov rbx, qword [0x1400eac60]
test rdi, rdi
cmovne rbx, rdi
mov qword [0x1400eac60], rbx
mov qword [rbx + 0x20], rbp
mov qword [rsp + 0x20], rbp
movss xmm2, dword [0x1400d7778]
lea rdx, str..._.._misc_fonts_arial3.ttf
mov rcx, qword [rbx + 0x50]
call fcn.140025720
mov qword [rsp + 0x20], rbp
movss xmm2, dword [0x1400d778c]
lea rdx, str..._.._misc_fonts_arial1.ttf
mov rcx, qword [rbx + 0x50]
call fcn.140025720
mov qword [rsp + 0x20], rbp
movss xmm2, dword [0x1400d7780]
lea rdx, str..._.._misc_fonts_arial2.ttf
mov rcx, qword [rbx + 0x50]
call fcn.140025720
mov r10, qword [rbx + 0x50]
call fcn.140027970
mov qword [rsp + 0x20], rax
movss xmm2, dword [0x1400d7790]
lea rdx, str.c:WindowsFontsArialUni.ttf
mov rcx, r10
call fcn.140025720
mov r10, qword [rbx + 0x50]
call fcn.140027970
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbp
movss xmm3, dword [0x1400d777c]
lea rdx, [0x1400d2230]
mov rcx, r10
call fcn.140025990
mov r10, qword [rbx + 0x50]
call fcn.140027970
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbp
movss xmm3, dword [0x1400d7790]
lea rdx, [0x1400d2230]
mov rcx, r10
call fcn.140025990
mov qword [0x1400eb290], rax
mov r10, qword [rbx + 0x50]
call fcn.140027970
mov qword [rsp + 0x20], rax
movss xmm2, dword [0x1400d7788]
lea rdx, str.c:WindowsFontsArialUni.ttf
mov rcx, r10
call fcn.140025720
mov qword [0x1400eaca8], rax
mov rdi, qword [0x1400eac60]
mov dword [rdi + 0x383c], 0x41700000
mov dword [rdi + 0x3808], 0x41c80000
mov dword [rdi + 0x3824], 0x41700000
mov dword [rdi + 0x3870], 0x40a00000
mov dword [rdi + 0x382c], 0x41200000
mov dword [rdi + 0x386c], 0x40800000
mov dword [rdi + 0x3834], 0x40400000
mov dword [rdi + 0x3838], 0x40000000
movaps xmm0, xmmword [0x1400d7c20]
movups xmmword [rdi + 0x3920], xmm0
movaps xmm1, xmmword [0x1400d7c30]
movups xmmword [rdi + 0x3970], xmm1
movaps xmm0, xmmword [0x1400d7b30]
movups xmmword [rdi + 0x3980], xmm0
movaps xmm1, xmmword [0x1400d7cb0]
movups xmmword [rdi + 0x3990], xmm1
movaps xmm0, xmm1
movups xmmword [rdi + 0x3ac0], xmm1
movaps xmm1, xmmword [0x1400d7c20]
movups xmmword [rdi + 0x3940], xmm1
movaps xmm0, xmmword [0x1400d7c30]
movups xmmword [rdi + 0x39e0], xmm0
movaps xmm1, xmmword [0x1400d7ae0]
movups xmmword [rdi + 0x39f0], xmm1
movaps xmm0, xmmword [0x1400d7b30]
movups xmmword [rdi + 0x3a10], xmm0
movaps xmm1, xmmword [0x1400d7cb0]
movups xmmword [rdi + 0x3a00], xmm1
xorps xmm0, xmm0
movups xmmword [rdi + 0x3950], xmm0
movaps xmm1, xmmword [0x1400d7c50]
movups xmmword [rdi + 0x3930], xmm1
movaps xmm0, xmmword [0x1400d7c30]
movups xmmword [rdi + 0x3a90], xmm0
movaps xmm1, xmmword [0x1400d7b30]
movups xmmword [rdi + 0x3aa0], xmm1
movaps xmm0, xmmword [0x1400d7cb0]
movups xmmword [rdi + 0x3ab0], xmm0
movaps xmm1, xmmword [0x1400d7c30]
movups xmmword [rdi + 0x3a50], xmm1
movaps xmm0, xmmword [0x1400d7b30]
movups xmmword [rdi + 0x3a70], xmm0
movaps xmm1, xmmword [0x1400d7cb0]
movups xmmword [rdi + 0x3a80], xmm1
movaps xmm0, xmmword [0x1400d7da0]
movups xmmword [rdi + 0x38c0], xmm0
movaps xmm1, xmmword [0x1400d7cd0]
movups xmmword [rdi + 0x3900], xmm1
lea rcx, [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x14004066a
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x14004066a
mov rax, qword [0x1400eac60]
test rax, rax
je 0x140040545
inc dword [rax + 0xec]
mov rdx, qword [0x1400eac50]
mov ecx, 0x48
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rbx, rax
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x140040580
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 0x140040583
mov rbx, rbp
mov qword [rdi + 0x90], rbx
lea rax, [rsp + 0xa0]
mov qword [rdi + 0x80], rax
or dword [rdi + 0xc], 6
mov qword [rbx], rsi
mov byte [rbx + 0x2d], 1
mov rax, qword [rsp + 0xa8]
mov qword [rbx + 0x20], rax
mov rax, qword [rsp + 0xb0]
mov qword [rbx + 0x18], rax
mov dword [rbx + 0x28], 9
mov rax, qword [0x1400eac60]
mov rcx, qword [rax + 0x4160]
mov rax, qword [rcx]
mov qword [rax + 0x28], rsi
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 rdi, rbp
nop word [rax + rax]
mov rcx, qword [rsp + rdi*8 + 0x40]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
jne 0x14004063e
inc rdi
cmp rdi, 5
jl 0x140040620
jmp 0x14004066a
mov qword [rbx + 0x30], rsi
lea rdx, str.XInputGetCapabilities
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x38], rax
lea rdx, str.XInputGetState
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x40], rax
mov rdi, qword [0x1400eb300]
mov rbx, qword [0x1400eac60]
test rbx, rbx
je 0x140040683
inc dword [rbx + 0xec]
mov rdx, qword [0x1400eac50]
mov ecx, Ordinal_41
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x1400406c1
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 0x1400406c4
mov rax, rbp
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 + reloc.WS2_32.dll_htonl]
xor eax, eax
add rsp, 0x78
pop rdi
pop rsi
pop rbp
pop rbx
ret