Function at 0x50a3b0
Capabilities:
Create thread

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
lea rax, fcn.00506d70
mov qword [rcx + 8], 0
lea r14, [rcx + 0x30]
mov rbx, rcx
mov qword [rcx + 0x10], 0
lea r15, [rbx + 0x58]
mov qword [rcx + 0x18], rdx
mov qword [rcx + 0x20], 0
mov qword [rcx], rax
mov rax, qword [rdx + 0x10]
mov qword [rcx + 0x28], rax
mov rcx, r14
call fcn.005098d0
mov rcx, r15
call fcn.005081c0
lea rax, [rbx + 0x68]
mov edi, 2
mov qword [rbx + 0x70], 0
mov rbp, 0xffffffffffffffff
mov qword [rsp + 0x30], rax
lea rax, [rbx + 0x78]
mov qword [rbx + 0x78], rax
lea r13, [rbx + 0x1a8]
mov qword [rbx + 0x80], rax
mov rsi, r13
lea rax, [rbx + 0x90]
mov qword [rbx + 0x88], 0
mov qword [rbx + 0x90], rax
mov qword [rbx + 0x98], rax
lea rax, [rbx + 0xc8]
mov qword [rbx + 0xc8], rax
mov qword [rbx + 0xd0], rax
lea rax, [rbx + 0xe0]
mov qword [rbx + 0xe0], rax
mov qword [rbx + 0xe8], rax
lea rax, [rbx + 0x118]
mov qword [rbx + 0x118], rax
mov qword [rbx + 0x120], rax
lea rax, [rbx + 0x130]
mov qword [rbx + 0x130], rax
mov qword [rbx + 0x138], rax
lea rax, [rbx + 0x168]
mov qword [rbx + 0x168], rax
mov qword [rbx + 0x170], rax
lea rax, [rbx + 0x180]
mov qword [rbx + 0xa0], 0
mov qword [rbx + 0xa8], 0
mov qword [rbx + 0xb0], 0
mov qword [rbx + 0xc0], 0
mov qword [rbx + 0xd8], 0
mov qword [rbx + 0xf0], 0
mov qword [rbx + 0xf8], 0
mov qword [rbx + 0x100], 0
mov qword [rbx + 0x110], 0
mov qword [rbx + 0x128], 0
mov qword [rbx + 0x140], 0
mov qword [rbx + 0x148], 0
mov qword [rbx + 0x150], 0
mov qword [rbx + 0x160], 0
mov qword [rbx + 0x178], 0
mov qword [rbx + 0x180], rax
mov qword [rbx + 0x188], rax
mov qword [rbx + 0x190], 0
mov qword [rbx + 0x198], 0
mov qword [rbx + 0x1a0], 0
mov dword [rsi + 8], 0x400
mov ecx, 0x2008
mov qword [rsi + 0x10], rbp
call fcn.007da0a0
sub rdi, 1
mov qword [rsi], rax
add rsi, 0x18
cmp rdi, 0xffffffffffffffff
mov dword [rax], 0
jne 0x50a5a6
mov qword [rbx + 0x1f0], 0
mov ecx, 0x10
mov byte [rbx + 0x1f8], 0
mov qword [rbx + 0x200], 0
mov byte [rbx + 0x208], 0
call fcn.007da0a0
mov qword [rax], 0
mov ecx, 0x28
mov rdi, rax
mov qword [rax + 8], 0
call fcn.007da0a0
mov rsi, rax
xor r9d, r9d
xor ecx, ecx
mov r12, qword [sym.imp.KERNEL32.dll_CreateEventW]
lea rax, [0x00845aa0]
mov qword [rsi + 0x20], rbx
xor r8d, r8d
mov edx, 1
mov qword [rsi], rax
lea rax, [0x0050bbf0]
mov qword [rsi + 0x18], rax
call r12
test rax, rax
mov rbp, rax
mov qword [rsi + 8], rax
je 0x50a6f1
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call r12
test rax, rax
mov qword [rdi + 8], rax
mov qword [rsi + 0x10], rax
je 0x50a740
mov dword [rsp + 0x4c], 0
mov r9, rsi
xor edx, edx
xor ecx, ecx
lea rax, [rsp + 0x4c]
mov dword [rsp + 0x20], 0
mov qword [rsp + 0x28], rax
lea r8, [0x004fc4c0]
call qword [sym.imp.msvcrt.dll__beginthreadex]
test rax, rax
mov qword [rdi], rax
je 0x50a780
test rbp, rbp
je 0x50a6d6
mov edx, 0xffffffff
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x200], rdi
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x28
mov rcx, rsi
mov dword [rsp + 0x3c], eax
call fcn.007da070
call fcn.004d6fb0
mov r8d, dword [rsp + 0x3c]
mov qword [rsp + 0x58], rax
test r8d, r8d
mov dword [rsp + 0x50], r8d
je 0x50a65f
lea rcx, [rsp + 0x50]
lea rdx, str.thread.entry_event
call fcn.00508150
nop word cs:[rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov edx, 0x28
mov rcx, rsi
call fcn.007da070
call fcn.004d6fb0
test r12d, r12d
mov dword [rsp + 0x60], r12d
mov qword [rsp + 0x68], rax
je 0x50a680
lea rcx, [rsp + 0x60]
lea rdx, str.thread.exit_event
call fcn.00508150
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x28
mov rcx, rsi
mov r12d, eax
call fcn.007da070
test rbp, rbp
je 0x50a7a4
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x50a7b3
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004d6fb0
test r12d, r12d
mov dword [rsp + 0x70], r12d
mov qword [rsp + 0x78], rax
je 0x50a6ba
lea rcx, [rsp + 0x70]
lea rdx, str.thread
call fcn.00508150
mov edx, 0x10
mov rcx, rdi
mov rsi, rax
call fcn.007da070
add rbx, 0x1f0
cmp rbx, r13
je 0x50a806
sub rbx, 0x18
mov rcx, qword [rbx]
call fcn.007da050
jmp 0x50a7f3
cmp rbx, qword [rsp + 0x30]
je 0x50a824
lea rcx, [rbx - 0x48]
call fcn.006e3f90
lea rdi, [rbx - 0x50]
mov rbx, rdi
jmp 0x50a806
mov rcx, r15
call fcn.00500b80
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, rsi
call fcn.0067d310
mov ebx, 2
mov rsi, rax
sub rbx, rdi
imul rbx, rbx, 0x18
add rbx, r13
cmp rbx, r13
je 0x50a806
sub rbx, 0x18
mov rcx, qword [rbx]
call fcn.007da050
jmp 0x50a84f