Function at 0x180016a00
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
movzx edi, byte [rsp + 0x90]
mov r13d, r8d
mov r8, rdx
mov r12, rcx
xor edx, edx
mov ebx, edx
lea ecx, [r13 + 0x690]
mov dword [rsp + 0x98], ecx
cmp r13d, ecx
jae 0x180016ba5
lea r9, [0x180000000]
cmp r13d, 0x153
ja 0x180016b76
je 0x180016ba5
lea eax, [r13 - 0x63]
cmp eax, 0x9a
ja case.default.0x180016a82
movzx eax, byte [r9 + rax + 0x16d40]
mov ecx, dword [r9 + rax*4 + 0x16d20]
add rcx, r9
jmp rcx
mov qword [r8 + 0x80], r12
jmp case.0x180016a82.106
call qword [rsp + 0x30]
cmp eax, 1
sete dil
jmp case.0x180016a82.106
mov qword [0x180059e28], r8
jmp case.0x180016a82.106
mov rcx, qword [r8 + 0x40]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp case.0x180016a82.106
mov edx, 0x5b
lea rcx, str.ssleay32.dll
lea r8d, [rdx + 0x5c]
call fcn.180005a90
mov qword [rsp + 0x30], rax
jmp case.0x180016a82.106
mov r10, qword [r12]
mov r14, qword [r12 + 8]
cmp r10, r14
je case.0x180016a82.106
mov r11, qword [r8 + 8]
mov r15, qword [r8]
mov r9, r15
cmp r15, r11
je 0x180016b5d
mov rsi, qword [r10 + 0x18]
mov rbp, qword [r10 + 0x10]
nop dword [rax + rax]
mov rax, r10
cmp rsi, 8
jb 0x180016b1c
mov rax, qword [r10]
cmp qword [r9 + 0x18], 8
mov r8, r9
jb 0x180016b29
mov r8, qword [r9]
mov rdx, qword [r9 + 0x10]
cmp rdx, rbp
jne 0x180016b6b
test rdx, rdx
je 0x180016b54
sub r8, rax
nop word [rax + rax]
movzx ecx, word [rax]
cmp word [r8 + rax], cx
jne 0x180016b6b
add rax, 2
sub rdx, 1
jne 0x180016b40
cmp r9, r11
jne 0x180016d10
add r10, 0x20
cmp r10, r14
jne 0x180016af8
jmp case.0x180016a82.106
add r9, 0x20
cmp r9, r11
jne 0x180016b10
jmp 0x180016b5d
cmp r13d, 0x1eb
ja 0x180016cc3
je 0x180016c54
mov eax, r13d
sub eax, 0x162
je 0x180016c24
sub eax, 0x11
je 0x180016bc1
cmp eax, 0x67
jne case.default.0x180016a82
movzx eax, dil
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rsi, qword [r8 + 0x18]
mov rbp, qword [r8 + 0x20]
mov rbx, rsi
cmp rsi, rbp
je case.default.0x180016a82
add rsi, 0x28
cmp rsi, rbp
je case.default.0x180016a82
nop dword [rax]
nop word [rax + rax]
mov qword [rsp + 0x20], rdx
mov r9, rbx
xor edx, edx
mov r8, rsi
lea ecx, [rdx + 0x61]
call fcn.18000a8c0
test al, al
mov rcx, rsi
mov edx, 0
cmove rcx, rbx
add rsi, 0x28
mov rbx, rcx
cmp rsi, rbp
jne 0x180016bf0
jmp case.0x180016a82.106
mov qword [rsp + 0x28], rdx
mov r9, r8
mov dword [rsp + 0x20], edx
lea r8, [0x180018af0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
test rax, rax
mov qword [0x180059e30], rax
setne dil
jmp case.0x180016a82.106
mov byte [rsp + 0x90], 0
cmp rbx, qword [r8 + 0x20]
je case.default.0x180016a82
mov esi, 0xbd
nop dword [rax + rax]
mov eax, esi
sub eax, 0xbc
je 0x180016c87
cmp eax, 1
jne 0x180016cb7
mov byte [rsp + 0x90], al
jmp 0x180016cb7
cmp r12, rbx
je 0x180016ca5
cmp qword [rbx + 0x18], 0x10
mov rdx, rbx
jb 0x180016c99
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, r12
call fcn.18001e0e0
movzx eax, word [rbx + 0x20]
mov word [r12 + 0x20], ax
mov eax, dword [rbx + 0x24]
mov dword [r12 + 0x24], eax
dec esi
cmp esi, 0xbb
ja 0x180016c70
jmp case.0x180016a82.106
mov eax, r13d
sub eax, 0x263
je 0x180016cd8
cmp eax, 0x78
je 0x180016ba5
jmp case.default.0x180016a82
mov rcx, qword [r8 + 0x40]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
movzx edi, byte [rsp + 0x90]
mov ecx, dword [rsp + 0x98]
add r13d, 0x78
cmp r13d, ecx
jae 0x180016ba5
mov r8, qword [rsp + 0x88]
xor edx, edx
jmp 0x180016a45
mov al, 1
jmp 0x180016ba9
xor al, al
jmp 0x180016ba9