Function at 0x180018a44
Capabilities:
Create thread

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xb0
mov rax, qword [rcx + 8]
xor r15d, r15d
mov rsi, rcx
mov qword [rbp - 0x11], rax
mov qword [rbp + 0xf], rax
lea rax, [0x18004b808]
mov qword [rbp - 0x21], rax
mov rax, qword [rcx]
mov r14, rdx
mov qword [rbp - 9], rax
mov eax, dword [rdx + 0xc]
lea rdi, [rbp + 0x17]
add eax, 0x30
test r8, r8
lea ecx, [r15 + 0x40]
mov edx, eax
mov ebx, r15d
mov qword [rbp - 0x19], r15
mov qword [rbp + 7], r15
mov qword [rbp - 0x29], r15
mov qword [rbp - 1], r15
cmovne rdi, r8
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r13, rax
test rax, rax
je 0x180018cd9
mov r8d, dword [r14 + 0xc]
lea rcx, [rax + 0x20]
mov rdx, r14
add r8d, 0x10
call fcn.180026930
lea r8d, [r15 + 4]
lea rcx, [rbp - 0x19]
mov edx, r12d
call fcn.18001950c
test eax, eax
je 0x180018cd0
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 0x19]
mov r8d, r12d
mov qword [rbp - 0x29], r13
call fcn.180019148
test eax, eax
je 0x180018cc7
mov rdx, qword [rsi + 8]
mov ecx, dword [rdx]
dec ecx
je 0x180018b81
cmp ecx, 2
jne 0x180018cc7
mov rdx, qword [rbp - 0x19]
mov rcx, qword [rbp - 9]
mov qword [rbp - 1], rdx
call fcn.180004a6c
mov rcx, qword [rsi + 8]
mov rcx, qword [rcx + 8]
mov dword [rsp + 0x30], r15d
lea r9d, [r15 + 0x10]
mov rcx, qword [rcx]
lea r8, [rbp - 9]
mov edx, 0x22c1c3
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call fcn.18000e0c0
mov ebx, eax
test eax, eax
jne 0x180018c34
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.180004a6c
jmp 0x180018cc7
mov rcx, qword [rdx + 8]
xor edx, edx
cmp dword [0x18004cc98], 5
mov rcx, qword [rcx]
jbe 0x180018bd2
mov qword [rsp + 0x48], r15
lea rax, [rbp + 0x67]
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x19]
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov rax, qword [rsi]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call qword [sym.imp.ntdll.dll_RtlCreateUserThread]
test eax, eax
jns 0x180018c07
mov qword [rbp + 0x67], r15
jmp 0x180018c00
mov rax, qword [rbp - 0x19]
mov r9, qword [rsi]
mov qword [rsp + 0x30], r15
xor r8d, r8d
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [rbp + 0x67], rax
test rax, rax
jne 0x180018c14
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.180004a6c
mov rax, qword [rbp + 0x67]
test rax, rax
je 0x180018cc7
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbp + 0x67]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, eax
test eax, eax
je 0x180018cc7
lea rdx, [rbp - 0x19]
lea rcx, [rbp - 0x29]
mov r8d, Ordinal_36
mov qword [rbp - 0x29], rdi
call fcn.180019148
mov ebx, eax
test eax, eax
je 0x180018cc7
mov rax, qword [rdi + 0x18]
mov qword [rbp + 7], rax
test rax, rax
je 0x180018cc7
lea rax, [rbp + 0x17]
cmp rdi, rax
je 0x180018cbe
mov ebx, r15d
mov qword [rdi + 0x18], r15
cmp dword [rdi + 0x10], r15d
je 0x180018cba
mov edx, dword [rdi + 0x10]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp - 0x29], rax
test rax, rax
je 0x180018cba
mov r8d, dword [rdi + 0x10]
lea rdx, [rbp + 7]
lea rcx, [rbp - 0x29]
call fcn.180019148
mov ebx, eax
test eax, eax
je 0x180018cac
mov rax, qword [rbp - 0x29]
mov qword [rdi + 0x18], rax
jmp 0x180018cb6
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
jne 0x180018cbe
mov dword [rdi + 0x10], r15d
lea rcx, [rbp + 7]
call fcn.1800195b8
lea rcx, [rbp - 0x19]
call fcn.1800195b8
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0xb0]
mov eax, ebx
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret