Function at 0x140116678
Capabilities:
Create thread

Disassembly:
mov r11, rsp
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x50
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rbp, rdx
mov rdi, rcx
mov esi, 1
lock xadd dword [0x14048ab28], esi
inc esi
lea rax, [0x140117acc]
mov qword [rcx], rax
lea rax, [0x14011845c]
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], r8
xor r12d, r12d
mov qword [rcx + 0x98], r12
mov qword [rcx + 0xa0], r12
mov qword [rcx + 0xa8], r12
mov qword [rcx + 0xb0], r12
mov qword [rcx + 0xb8], r12
mov dword [rcx + 0xc0], r12d
mov qword [rcx + 0xc8], r12
mov qword [rcx + 0xd0], r12
mov dword [rcx + 0xd8], 7
mov qword [rcx + 0xe0], r12
mov qword [rcx + 0xe8], r12
mov qword [rcx + 0xf0], r12
mov qword [rcx + 0xf8], r12
mov byte [rcx + 0x100], r12b
mov qword [rcx + 0x130], r12
mov qword [rcx + 0x138], r12
mov dword [rcx + 0x140], r12d
mov qword [rcx + 0x148], r12
mov qword [rcx + 0x150], r12
mov word [rcx + 0x158], r12w
mov qword [r11 + 0x20], r12
cmp qword [rcx + 0x18], r12
jne 0x140116869
add rcx, 0x108
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor r9d, r9d
xor edx, edx
xor ecx, ecx
lea r8d, [r12 + 1]
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [rdi + 0x130], rax
xor r9d, r9d
xor edx, edx
xor ecx, ecx
lea r8d, [r12 + 1]
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [rdi + 0x138], rax
test rax, rax
je 0x1401167da
cmp qword [rdi + 0x130], r12
je 0x1401167da
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
mov r9, rdi
lea r8, [0x140116108]
mov edx, 0x10000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rdi + 0xf8], rax
lea rcx, str.dbghelp.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rdi + 0xb0], rax
test rax, rax
je 0x14011680a
lea rdx, str.MiniDumpWriteDump
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rdi + 0xb8], rax
lea rcx, str.rpcrt4.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rdi + 0xc8], rax
test rax, rax
je 0x14011683a
lea rdx, str.UuidCreate
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rdi + 0xd0], rax
lea rbx, [rdi + 0x20]
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call fcn.14008f39c
cmp qword [rbx + 0x18], 8
jb 0x14011685a
mov rbx, qword [rbx]
mov qword [rdi + 0x98], rbx
mov rcx, rdi
call fcn.140116548
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x40], r12d
mov rbx, qword [rdi + 0x160]
lea r8, [rsp + 0x38]
mov rdx, qword [rbx + 8]
mov rcx, rbx
call fcn.1400a1a0c
mov r11, rax
mov rax, qword [rdi + 0x168]
movabs rcx, 0xffffffffffffffe
sub rcx, rax
cmp rcx, 1
jae 0x1401168b5
lea rcx, str.list_T__too_long
call fcn.1400b8738
int3
inc rax
mov qword [rdi + 0x168], rax
mov qword [rbx + 8], r11
mov rax, qword [r11 + 8]
mov qword [rax], r11
lea rbx, [0x140489878]
cmp esi, 1
jne 0x1401168df
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp qword [0x14048ab20], r12
jne 0x140116917
mov ecx, 0x20
call fcn.1400be454
test rax, rax
je 0x14011690d
mov qword [rax], r12
mov qword [rax + 8], r12
mov qword [rax + 0x10], r12
jmp 0x140116910
mov rax, r12
mov qword [0x14048ab20], rax
mov qword [rsp + 0x90], rdi
lea rcx, [rsp + 0x90]
call fcn.1400a18d0
lea rcx, [0x140116178]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov qword [rdi + 0xe0], rax
lea rcx, [0x140115f28]
call fcn.1400c6f9c
mov qword [rdi + 0xe8], rax
lea rcx, [0x140115d98]
call fcn.1400be530
mov qword [rdi + 0xf0], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
add rsp, 0x50
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret