Function at 0x18003664c
Capabilities:
Create thread
Terminate thread

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov r8d, dword [rcx + 0x80]
mov rbx, rcx
lea rdx, str._d__n
mov ecx, 0x1d4
call fcn.180030818
xor ecx, ecx
cmp qword [rbx + 0x20], 0xffffffffffffffff
lea r12d, [rcx + 1]
lea esi, [rcx + 2]
mov edi, ecx
mov r13b, r12b
mov dword [rsp + 0x78], esi
mov dword [rsp + 0x70], ecx
jne 0x18003669f
xor eax, eax
jmp 0x1800368fc
mov eax, r12d
lock cmpxchg dword [rbx + 0x80], ecx
test eax, eax
je 0x180036698
mov eax, 8
cmp dword [rbx + 0x30], esi
jne 0x1800366ee
mov rcx, qword [rbx + 0x20]
mov r8d, eax
mov edx, eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor ecx, ecx
mov rbp, rax
test rax, rax
jne 0x1800366f3
lock cmpxchg dword [rbx + 0x80], r12d
cmp eax, r12d
jne 0x180036698
mov rcx, qword [rbx + 0x88]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x180036698
mov rbp, qword [rsp + 0x70]
mov eax, r12d
lock cmpxchg dword [rbx + 0x80], r12d
test eax, eax
jne 0x1800368a3
mov r14d, r12d
mov r15, rcx
test r13b, r13b
je 0x18003671f
mov r13b, cl
mov rcx, qword [rbx + 0x28]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbx + 0x20]
mov edx, 8
lea r8d, [rdx + 8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x18003689c
mov rcx, rbx
call fcn.180036a5c
xor edx, edx
mov qword [rdi], rax
cmp rax, 0xffffffffffffffff
je 0x18003688f
and qword [rsp + 0x28], rdx
and dword [rsp + 0x20], edx
lea r8, [0x180036b9c]
mov r9, rax
xor ecx, ecx
mov qword [rdi + 8], rbx
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov r12, rax
test rax, rax
je 0x18003683c
mov esi, 1
mov eax, esi
lock cmpxchg dword [rbx + 0x80], esi
test eax, eax
jne 0x1800367a3
lea edx, [rax + 0x64]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x180036785
mov eax, esi
lock cmpxchg dword [rbx + 0x80], esi
mov esi, dword [rsp + 0x78]
je 0x18003684f
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
lea r8, [0x180036b54]
mov r9, rdi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__beginthreadex]
test rax, rax
je 0x180036833
mov edi, dword [rsp + 0x70]
mov r12d, 1
mov qword [r15 + rbp], rax
mov rcx, qword [rbx + 0x20]
add r14d, r12d
lea edx, [r12 + 7]
mov r9d, r14d
add edi, r12d
mov r8, rbp
shl r9, 3
mov dword [rsp + 0x70], edi
add r15, 8
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
xor ecx, ecx
mov rbp, rax
test rax, rax
je 0x1800368a0
mov eax, r12d
lock cmpxchg dword [rbx + 0x80], r12d
test eax, eax
jne 0x1800368a3
jmp 0x18003670d
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov rdx, rdi
mov rcx, rbx
call fcn.180036cbc
mov r12d, 1
jmp 0x18003689c
lea rdx, [rsp + 0x80]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [rsp + 0x80], 0x103
jne 0x180036878
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rdx, rdi
mov rcx, rbx
call fcn.180036cbc
mov edi, dword [rsp + 0x70]
mov r12d, 1
jmp 0x1800368a3
mov rcx, qword [rbx + 0x20]
mov r8, rdi
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [rsp + 0x70]
mov esi, r12d
xor eax, eax
lock cmpxchg dword [rbx + 0x80], r12d
cmp dword [rbx + 0x30], 2
jne 0x1800368ed
or r9d, 0xffffffff
mov r8d, r12d
mov rdx, rbp
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test rbp, rbp
je 0x1800368dc
mov rcx, qword [rbx + 0x20]
mov r8, rbp
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1800368ed
lea rdx, str._HeapFree__NULL_n
mov ecx, 0x22a
call fcn.180030818
mov rcx, qword [rbx + 0x88]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, esi
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret