Function at 0x10004fbf8
Capabilities:
Create thread

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
and qword [rax - 0x30], 0
and qword [rax - 0x38], 0
mov r13, r9
xor ebp, ebp
mov r14d, r8d
mov r15, rdx
mov rsi, rcx
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004fc60
test byte [rcx + 0x1c], 1
je 0x10004fc60
cmp byte [rcx + 0x19], 4
jb 0x10004fc60
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0x171
call fcn.10001c7b8
lea rcx, [rsp + 0x68]
call fcn.100057ca0
mov ebx, eax
test eax, eax
jns 0x10004fcb4
mov rcx, qword [0x1001653b8]
cmp rcx, r12
je 0x10004fcaa
test byte [rcx + 0x1c], 1
je 0x10004fcaa
cmp byte [rcx + 0x19], 2
jb 0x10004fcaa
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0x172
mov r9d, eax
call fcn.10001c7dc
mov rdi, qword [rsp + 0x68]
jmp 0x10004fea3
mov rdi, qword [rsp + 0x68]
jmp 0x10004feaa
mov rdi, qword [rsp + 0x68]
mov rcx, rdi
mov rax, qword [rdi]
call qword [rax + 8]
mov rdx, qword [rsp + 0xe8]
lea r12, [rdi + 8]
mov rcx, r12
call fcn.10001d55c
mov rdx, qword [rsp + 0xf0]
mov rcx, r12
call fcn.10001d10c
mov ebx, eax
test eax, eax
js 0x10004fe9c
mov rax, qword [rdi]
lea r8, [rsp + 0x60]
lea rdx, [0x100002c80]
mov rcx, rdi
call qword [rax]
mov ebx, eax
test eax, eax
jns 0x10004fd52
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004feaa
test byte [rcx + 0x1c], 1
je 0x10004feaa
cmp byte [rcx + 0x19], 2
jb 0x10004feaa
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0x173
mov r9d, eax
call fcn.10001c7dc
jmp 0x10004fea3
mov eax, dword [rsp + 0xf8]
mov cl, byte [rsp + 0xe0]
mov r8, qword [rsp + 0xd8]
mov dword [rsp + 0x58], eax
mov rax, qword [rsp + 0xd0]
and cl, 1
mov byte [rsp + 0x50], cl
and qword [rsp + 0x48], rbp
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xc8]
mov r9, r15
mov rdx, rsi
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0xc0]
mov rcx, rdi
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], r14d
call fcn.10005d768
xor r13d, r13d
cmp eax, r13d
mov ebx, eax
jl 0x10004fe9c
lea r8, [0x100061a24]
mov r9, rdi
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], r13d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbp, rax
cmp rax, r13
jne 0x10004fe42
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004fe31
test byte [rcx + 0x1c], 1
je 0x10004fe31
cmp byte [rcx + 0x19], 2
jb 0x10004fe31
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0x174
mov r9d, eax
call fcn.10001c7dc
mov rcx, qword [0x1001653b8]
movzx ebx, si
or ebx, 0x80070000
cmp esi, r13d
cmovle ebx, esi
jmp 0x10004feaa
mov byte [rsi + 0x18], 1
cmp qword [rsi + 0x28], r13
jne 0x10004fe52
cmp qword [rsi + 0x30], r13
je 0x10004fe6a
lea r8, [0x100005fe8]
lea rcx, [0x100005eb0]
mov edx, 0x1d47
call fcn.100099ad8
mov rcx, qword [rsp + 0x60]
mov qword [rsi + 0x28], r12
mov rdi, r13
mov qword [rsi + 0x30], rcx
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x100]
mov dword [rsi + 0x38], 2
mov qword [rsp + 0x60], r13
mov qword [rcx], rax
lea r12, [0x1001653b8]
mov rcx, qword [0x1001653b8]
mov rdx, qword [rsp + 0x60]
test rdx, rdx
je 0x10004fec4
mov rax, qword [rdx]
mov rcx, rdx
call qword [rax + 0x10]
mov rcx, qword [0x1001653b8]
test rbp, rbp
je 0x10004fed9
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1001653b8]
test rdi, rdi
je 0x10004feee
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x10]
mov rcx, qword [0x1001653b8]
cmp rcx, r12
je 0x10004ff14
test byte [rcx + 0x1c], 1
je 0x10004ff14
cmp byte [rcx + 0x19], 4
jb 0x10004ff14
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0x175
call fcn.10001c7b8
lea r11, [rsp + 0x70]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret