Function at 0x140002210
Capabilities:
Create thread

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xf0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x148], rbx
mov rax, qword [0x140024010]
xor rax, rsp
mov qword [rsp + 0xe0], rax
mov r12, r8
mov rbx, rdx
mov rdi, rcx
mov qword [rsp + 0x58], rcx
xor r13d, r13d
mov qword [rcx], r13
mov qword [rcx + 8], r13
mov qword [rcx + 0x10], r13
mov qword [rcx + 0x18], r13
mov qword [rcx + 0x20], r13
mov qword [rcx + 0x28], r13
mov qword [rcx + 0x30], r13
mov qword [rcx + 0x38], r13
mov qword [rcx + 0x40], r13
mov qword [rcx + 0x48], r13
mov qword [rcx + 0x50], r13
mov qword [rcx + 0x58], r13
mov qword [rcx + 0x60], r13
mov qword [rcx + 0x68], r13
mov qword [rcx + 0x70], r13
mov qword [rcx + 0x78], r13
mov qword [rcx + 0x80], r13
mov qword [rcx + 0x88], r13
mov dword [rcx + 0x90], r13d
inc dword [0x140025bb8]
mov qword [rcx + 0x98], r13
mov qword [rcx + 0xa0], r13
mov qword [rcx + 0xa8], r13
mov qword [rcx + 0xb0], r13
mov byte [rcx + 0xb8], r13b
mov qword [rcx + 0x448], r13
mov qword [rcx + 0x450], r13
mov qword [rcx + 0x458], r13
mov qword [rcx + 0x460], r13
mov qword [rcx + 0x468], r13
mov qword [rcx + 0x470], r13
mov qword [rcx + 0x478], r13
mov qword [rcx + 0x480], r13
mov qword [rcx + 0x488], r13
mov dword [rcx + 0x490], r13d
mov qword [rcx + 0x498], r13
mov qword [rcx + 0x4a0], r13
mov byte [rcx + 0x4a8], r13b
mov qword [0x140025bc0], rcx
mov rax, qword [0x140025be0]
sub rax, qword [0x140025bd8]
sar rax, 3
mov dword [rcx + 0x8c], eax
mov qword [rsp + 0x48], rcx
mov rdx, qword [0x140025be0]
cmp qword [0x140025be8], rdx
je 0x140002370
mov qword [rdx], rcx
add qword [0x140025be0], 8
jmp 0x14000237a
lea r8, [rsp + 0x48]
call fcn.1400051c0
mov rdx, rbx
lea rcx, [rdi + 0x40]
call fcn.1400019a0
test al, al
je 0x14000250d
mov r8, rbx
mov edx, 0x40
lea rcx, [rsp + 0x60]
call fcn.14000a3fc
lea r8, [0x140020378]
mov edx, 0x40
lea rcx, [rsp + 0x60]
call fcn.14000a464
lea r8, [0x140020380]
mov rdx, rbx
mov rcx, rdi
call fcn.140001740
test al, al
je 0x14000250d
lea r8, [0x140020388]
mov rdx, rbx
lea rcx, [rdi + 0x10]
call fcn.140001740
test al, al
je 0x14000250d
lea r8, [0x140020390]
mov rdx, rbx
lea rcx, [rdi + 0x20]
call fcn.140001740
test al, al
je 0x14000250d
mov rcx, qword [rdi + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r9, [rsp + 0x60]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rdi + 0x30], rax
test rax, rax
je 0x14000250d
mov rdx, qword [rdi + 0x48]
lea rax, [rdx + 4]
mov rcx, r13
test rdx, rdx
cmovne rcx, rax
mov qword [rdi + 0x80], rcx
mov rcx, qword [rdi + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
lea r9, [rdi + 0x38]
mov r8, rbx
mov rdx, r12
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rcx, qword [rdi + 0x4a0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rdi + 0x4a0], rax
mov dword [rsp + 0x40], r13d
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r13d
mov r9, rdi
lea r8, [0x1400037f0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rdi + 0x498], rax
mov rdx, qword [rdi + 0x80]
mov ecx, dword [0x140025bd0]
xchg dword [rdx + 0x8324], ecx
mov rdx, qword [rdi + 0x80]
mov ecx, dword [rdi + 0x8c]
mov dword [rdx + 0x8328], ecx
mov rcx, qword [rdi + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x14000253c
xor r9d, r9d
lea r8, [0x140020430]
lea rdx, str.Could_not_connect_to_OpenMPT.
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
mov rcx, rdi
call fcn.140002570
mov edx, 0x4b0
mov rcx, rdi
call fcn.140006530
nop
mov rax, rdi
mov rcx, qword [rsp + 0xe0]
xor rcx, rsp
call fcn.140005f80
mov rbx, qword [rsp + 0x148]
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret