Function at 0x141e01ea0
Capabilities:
Allocate thread local storage
Create thread
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x50
movzx ebx, cl
mov r14d, 1
cmp dword [0x141f18d28], 0xffffffff
jne 0x141e01f1c
mov rax, qword [0x141f1eac8]
test rax, rax
jne 0x141e01eda
lock cmpxchg qword [0x141f1eac8], r14
je 0x141e01ee6
lea rcx, [0x141f1eac8]
call fcn.141d8d680
cmp dword [0x141f18d28], 0xffffffff
je 0x141e01f0e
xor r15d, r15d
mov rax, r14
lock cmpxchg qword [0x141f1eac8], r15
je 0x141e01f1f
lea rcx, [0x141f1eac8]
call fcn.141d8dc50
jmp 0x141e01f1f
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x141f18d28], eax
jmp 0x141e01eef
xor r15d, r15d
mov ecx, dword [0x141f18d28]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test rax, rax
jne 0x141e01fdf
test bl, bl
je 0x141e01fdf
mov ecx, 0x98
call fcn.141ec2278
mov qword [rsp + 0x88], rax
mov edx, r14d
mov rcx, rax
call fcn.141d983d0
mov rsi, rax
mov qword [rsp + 0x90], rax
mov rdx, rax
mov ecx, dword [0x141f18d28]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
mov ecx, 0x10
call fcn.141ec2278
mov qword [rsp + 0x88], rax
mov rdx, rsi
mov rcx, rax
call fcn.141d98200
nop
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
nop
nop
mov qword [rsi + 0x60], rax
mov rcx, rsi
call fcn.141d98cd0
mov byte [rsi + 0x92], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov eax, eax
mov qword [rsi + 0x68], rax
mov rax, qword [0x141f1e098]
nop
test rax, rax
jne 0x141e01ff7
mov rax, qword [rsi + 0x60]
nop
mov qword [0x141f1e098], rax
mov rax, rsi
mov rbx, qword [rsp + 0x80]
add rsp, 0x50
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
mov qword [rsp + 0x88], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
lea r9, [rsp + 0x88]
mov r8, rdi
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rdi, qword [rsi + 0x60]
nop
mov rbx, qword [rsp + 0x88]
lea r12, [0x141f1eab8]
mov qword [rsp + 0x40], r12
mov rax, qword [0x141f1eab8]
test rax, rax
jne 0x141e02074
lock cmpxchg qword [0x141f1eab8], r14
je 0x141e0207c
mov rcx, r12
call fcn.141d8d680
mov byte [rsp + 0x48], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x141f1eac0]
jne 0x141e020b8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rax, r14
lock cmpxchg qword [0x141f1eab8], r15
je 0x141e01fdf
mov rcx, r12
call fcn.141d8dc50
jmp 0x141e01fdf
mov qword [rsp + 0x90], rbx
lea r8, [rsp + 0x90]
mov rdx, qword [0x141f1eae8]
lea rcx, [0x141f1ead8]
call fcn.141d62d20
mov rax, qword [0x141f1ead8]
test rax, rax
je 0x141e020ee
mov eax, dword [rax]
cmp eax, 1
jle 0x141e02102
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [0x141f1ead8]
call fcn.141d5b170
mov qword [rsp + 0x90], rdi
lea r8, [rsp + 0x90]
mov rdx, qword [0x141f1eb00]
lea rcx, [0x141f1eaf0]
call fcn.141d62d20
mov rax, qword [0x141f1eaf0]
test rax, rax
je 0x141e02138
mov eax, dword [rax]
cmp eax, 1
jle 0x141e0214c
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [0x141f1eaf0]
call fcn.141d5b170
cmp dword [0x141f1eac0], 0
jne 0x141e021c1
cmp qword [0x141f1eb08], 0
jne 0x141e02194
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x141f1eb08], rax
mov qword [rsp + 0x90], rax
lea r8, [rsp + 0x90]
xor edx, edx
lea rcx, [0x141f1ead8]
call fcn.141d62d20
lea rax, [0x141f1eac0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
xor r9d, r9d
lea r8, [0x141e02410]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, rax
jmp 0x141e02092
mov rcx, qword [0x141f1eb08]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x141e02099