Function at 0x4bf020
Capabilities:
Create thread

Disassembly:
mov rax, rsp
sub rsp, 0x118
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov qword [rax - 8], rbx
mov qword [rax - 0x10], rbp
mov qword [rax - 0x18], rsi
mov qword [rax - 0x20], rdi
mov qword [rax - 0x28], r12
mov qword [rax - 0x30], r13
mov qword [rax - 0x38], r14
mov qword [rax - 0x40], r15
mov r13, r9
mov r12, r8
mov r14, rdx
mov rsi, rcx
xor r15d, r15d
mov dword [rsp + 0x60], r15d
lea ecx, [r15 + 0x68]
call fcn.00569590
mov rdi, rax
mov qword [rsp + 0x60], rax
lea rbp, [r15 - 1]
test rax, rax
je 0x4bf0d9
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ebx, eax
mov qword [rdi], r14
mov qword [rdi + 8], r12
lea rcx, [rdi + 0x10]
mov qword [rcx + 0x20], reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rcx + 0x18], r15
mov byte [rcx + 8], r15b
mov r9, rbp
xor r8d, r8d
mov rdx, r13
call fcn.00409a50
mov r11d, dword [rsp + 0x148]
mov dword [rdi + 0x38], r11d
mov dword [rdi + 0x3c], ebx
lea rcx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x4bf0dc
mov rdi, r15
lea rcx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r12, qword [rsp + 0x140]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r15d
mov r9, rdi
lea r8, [0x004bdfc0]
xor edx, edx
xor ecx, ecx
call fcn.00570590
cmp rax, 0xffffffffffffffff
je 0x4bf15a
test rax, rax
je 0x4bf15a
cmp byte [rsp + 0x150], 0
je 0x4bf125
mov rbp, rax
jmp 0x4bf12e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004bd3c0
mov rcx, rax
mov r9, rbp
mov r8d, dword [r12]
mov rdx, r13
call fcn.004bc580
lea rcx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsi], r15
mov rax, rsi
jmp 0x4bf2c5
lea rcx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test rdi, rdi
je 0x4bf19b
lea rcx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
cmp qword [rdi + 0x30], 0x10
jb 0x4bf183
mov rcx, qword [rdi + 0x18]
call fcn.00568830
mov qword [rdi + 0x30], reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rdi + 0x28], r15
mov byte [rdi + 0x18], 0
mov rcx, rdi
call fcn.00568830
call fcn.00570710
mov r8b, 1
mov edx, dword [rax]
lea rcx, [rsp + 0x60]
call fcn.00491120
mov rdx, rax
lea rcx, [rsp + 0xa8]
call fcn.004677a0
nop
mov qword [rsp + 0x88], 7
mov qword [rsp + 0x80], r15
mov word [rsp + 0x70], 0
mov r9d, SafeArrayGetDim
lea r8, str.Thread
lea edx, [r9 + 2]
lea rcx, [rsp + 0x70]
call fcn.00568a50
mov qword [rsp + 0x80], 6
lea rax, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae rax, qword [rsp + 0x70]
mov word [rax + 0xc], 0
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x90]
call fcn.00467ad0
nop
mov rax, qword [0x00640e40]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xa8]
lea r8, [rsp + 0x90]
mov edx, 0xebab0008
mov rcx, rsi
call fcn.00465350
nop
lea rcx, [rsp + 0x90]
call fcn.004679c0
nop
cmp qword [rsp + 0x88], 8
jb 0x4bf29a
mov rcx, qword [rsp + 0x70]
call fcn.00568830
mov qword [rsp + 0x88], 7
mov qword [rsp + 0x80], r15
mov word [rsp + 0x70], 0
lea rcx, [rsp + 0xa8]
call fcn.004679c0
mov rax, rsi
mov rbx, qword [rsp + 0x110]
mov rbp, qword [rsp + 0x108]
mov rsi, qword [rsp + 0x100]
mov rdi, qword [rsp + 0xf8]
mov r12, qword [rsp + 0xf0]
mov r13, qword [rsp + 0xe8]
mov r14, qword [rsp + 0xe0]
mov r15, qword [rsp + 0xd8]
add rsp, 0x118
ret