Function at 0x140040794
Capabilities:
Create process on windows
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x1070]
mov eax, 0x1170
call fcn.140083e10
sub rsp, rax
movaps xmmword [rsp + 0x1160], xmm6
movaps xmmword [rsp + 0x1150], xmm7
mov rax, qword [0x14010b0c0]
xor rax, rsp
mov qword [rbp + 0x1040], rax
xor r12d, r12d
mov rbx, r8
mov r15d, r12d
mov dword [rsp + 0x60], r12d
call qword [sym.imp.USER32.dll_SetProcessDPIAware]
lea edx, [r12 + 2]
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeEx]
lea ecx, [r12 + 1]
call fcn.140083144
lea rcx, [rsp + 0x58]
mov r9, rax
mov qword [rsp + 0x28], rcx
lea r8, [0x140041a34]
xor ecx, ecx
mov dword [rsp + 0x20], r12d
xor edx, edx
call fcn.140097164
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140040c31
lea rcx, [0x1400f5b38]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.wine_get_version
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
or rdi, 0xffffffffffffffff
test rax, rax
jne 0x1400408c4
xorps xmm0, xmm0
mov qword [rbp - 0x10], r12
movups xmmword [rbp - 0x20], xmm0
lea r15d, [r12 + 1]
mov qword [rbp - 8], r12
mov r8, rdi
inc r8
cmp word [rbx + r8*2], r12w
jne 0x140040874
mov rdx, rbx
lea rcx, [rbp - 0x20]
call fcn.140003dfc
mov r14, qword [rbp - 8]
lea rcx, [rbp - 0x20]
mov rbx, qword [rbp - 0x20]
lea r9, str.retry_non_windows
mov rdx, qword [rbp - 0x10]
cmp r14, 7
mov qword [rsp + 0x20], SafeArrayUnaccessData
cmova rcx, rbx
xor r8d, r8d
call fcn.14003e500
cmp rax, rdi
jne 0x1400408cc
mov sil, r15b
jmp 0x1400408cf
mov r14, qword [rbp - 8]
mov rbx, qword [rbp - 0x20]
mov sil, r12b
test r15b, 1
je 0x140040910
cmp r14, 7
jbe 0x140040910
lea rdx, [r14*2 + 2]
mov rax, rbx
cmp rdx, 0x1000
jb 0x140040908
mov rbx, qword [rbx - 8]
add rdx, 0x27
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140040c41
mov rcx, rbx
call fcn.140083110
test sil, sil
je 0x14004091c
call fcn.140040da4
jmp 0x140040921
call fcn.140041094
test al, al
jne 0x140040bab
test sil, sil
je 0x140040b34
cmp dword [0x14010bf30], 0x1388
jae 0x140040b34
mov ebx, 0x800
lea rcx, [rbp + 0x40]
mov r8d, ebx
xor edx, edx
call fcn.1400ae5c0
mov r8d, 0x400
lea rdx, [rbp + 0x40]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
lea rcx, [rsp + 0x74]
xorps xmm0, xmm0
mov qword [rbp - 0x10], rax
xor edx, edx
movups xmmword [rbp - 0x20], xmm0
lea r8d, [rax + 0x64]
call fcn.1400ae5c0
mov r8d, ebx
mov dword [rsp + 0x70], 0x68
xor edx, edx
lea rcx, [rbp + 0x840]
call fcn.1400ae5c0
xorps xmm0, xmm0
mov qword [rbp + 0x10], r12
movups xmmword [rbp], xmm0
mov qword [rbp + 0x18], r12
lea rax, [rbp + 0x40]
inc rdi
cmp word [rax + rdi*2], r12w
jne 0x1400409b0
mov r8, rdi
lea rdx, [rbp + 0x40]
lea rcx, [rbp]
call fcn.140003dfc
mov r8d, SafeArrayUnaccessData
lea rdx, str.__retry_non_windows
lea rcx, [rbp]
call fcn.14003e76c
movups xmm7, xmmword [rax]
movups xmm6, xmmword [rax + 0x10]
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], 7
mov word [rax], r12w
mov rdx, qword [rbp + 0x18]
movups xmmword [rbp + 0x20], xmm7
movups xmmword [rbp + 0x30], xmm6
cmp rdx, 7
jbe 0x140040a3f
mov rcx, qword [rbp]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140040a3a
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140040c47
call fcn.140083110
movdqa xmm0, xmm6
lea rdx, [rbp + 0x20]
psrldq xmm0, 8
lea rcx, [rbp + 0x840]
movq rdi, xmm0
movq rbx, xmm7
movq r8, xmm6
cmp rdi, 7
cmova rdx, rbx
add r8, r8
call fcn.1400adf20
lea rax, [rbp - 0x20]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rdx, [rbp + 0x840]
lea rax, [rsp + 0x70]
xor r8d, r8d
mov qword [rsp + 0x40], rax
lea rcx, [rbp + 0x40]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x140040ac8
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x58], r12d
je 0x140040c53
movaps xmm0, xmmword [rsp + 0x50]
lea rcx, [rbp]
movdqa xmmword [rbp], xmm0
call fcn.140082480
test eax, eax
jne 0x140040c53
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x50], xmm0
cmp rdi, 7
jbe 0x140040b63
lea rdx, [rdi*2 + 2]
mov rax, rbx
cmp rdx, 0x1000
jb 0x140040b2a
mov rbx, qword [rbx - 8]
add rdx, 0x27
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140040c4d
mov rcx, rbx
call fcn.140083110
jmp 0x140040b63
cmp dword [rsp + 0x58], r12d
je 0x140040c64
movaps xmm0, xmmword [rsp + 0x50]
lea rcx, [rbp]
movdqa xmmword [rbp], xmm0
call fcn.140082480
test eax, eax
jne 0x140040c64
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x50], xmm0
call qword [sym.imp.ole32.dll_CoUninitialize]
cmp dword [rsp + 0x58], r12d
jne 0x140040c5e
xor eax, eax
mov rcx, qword [rbp + 0x1040]
xor rcx, rsp
call fcn.1400830f0
lea r11, [rsp + 0x1170]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov rax, qword [0x14011f518]
test rax, rax
je 0x140040beb
cmp dword [rax + 0x330], 1
jne 0x140040be4
lea rcx, [rax + 0x10]
call fcn.140058064
test eax, eax
jle 0x140040bdd
lea ecx, [rax + rax*4]
lea ecx, [rcx*8 + 0xfa]
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rax, qword [0x14011f518]
mov byte [rax + 0x4b9], 1
cmp dword [rsp + 0x58], r12d
je 0x140040c64
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [rsp + 0x58], eax
je 0x140040c1b
movaps xmm0, xmmword [rsp + 0x50]
lea rcx, [rbp]
xor edx, edx
movdqa xmmword [rbp], xmm0
call fcn.1400824a4
test eax, eax
jne 0x140040c26
jmp 0x140040b5a
mov ecx, 5
call fcn.140082010
int3
mov ecx, 2
call fcn.140082010
int3
mov ecx, 6
mov dword [rsp + 0x58], r12d
call fcn.140082010
int3
call fcn.14008a200
int3
call fcn.14008a200
int3
call fcn.14008a200
int3
mov ecx, 1
call fcn.140082010
int3
call fcn.140097000
int3
mov ecx, 1
call fcn.140082010
int3