Function at 0x14014fbe0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov qword [rsp + 0x48], r9
mov qword [rsp + 0x40], r8
mov byte [rsp + 0x27], dl
mov rsi, rcx
mov rax, qword [rcx]
lea r13, [rsp + 0x2a]
xor r14d, r14d
lea r12, [0x141a7aaf0]
mov rdi, rax
test rax, rax
jne 0x14014fc46
jmp 0x14014fc2b
cmp byte [rsp + 0x27], 0
je 0x14015013f
mov rax, rdi
mov ecx, 2
lock cmpxchg qword [rsi], rcx
je 0x140150084
mov rdi, rax
test rax, rax
je 0x14014fc2b
cmp rdi, 1
je 0x14014fc20
cmp rdi, 3
je 0x14015012e
mov eax, edi
and eax, 3
cmp eax, 2
je 0x14014fc7e
jmp 0x14015013f
mov eax, edi
and eax, 3
cmp eax, 2
jne 0x140150070
mov ecx, dword [0x140212150]
test ecx, ecx
je 0x14014fca1
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jbe 0x14014fcc0
mov rbx, rax
add rbx, 8
jmp 0x14014fd5f
lea rcx, [0x140212138]
call fcn.140149310
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
ja 0x14014fc95
nop word [rax + rax]
je 0x14015013f
movzx eax, byte [0x141af8129]
mov edx, 0x10
xor ecx, ecx
call fcn.140146820
test rax, rax
je 0x14015013f
mov rbx, rax
mov r15, rax
lea rax, [0x140212138]
mov qword [rbx], rax
mov qword [rbx + 8], 0
mov ecx, dword [0x140212150]
test ecx, ecx
je 0x14014fe31
dec ecx
call sub.KERNEL32.dll_TlsGetValue
mov rbp, rax
mov ecx, dword [0x140212150]
test ecx, ecx
je 0x14014fe44
dec ecx
add rbx, 8
mov rdx, r15
call sub.KERNEL32.dll_TlsSetValue
test rbp, rbp
je 0x14014fd5f
mov rax, qword [rbp + 8]
test rax, rax
je 0x14014fd4e
lock dec qword [rax]
jne 0x14014fd4e
mov rcx, rbp
add rcx, 8
call fcn.140156d30
mov rcx, qword [0x141af8068]
xor edx, edx
mov r8, rbp
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [rbx]
test rcx, rcx
jne 0x14014fddc
movzx eax, byte [0x141af8129]
mov edx, 0x38
xor ecx, ecx
call fcn.140146820
test rax, rax
je 0x14015013f
mov rcx, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], 2
mov rax, qword [0x141af8080]
nop word cs:[rax + rax]
mov rdx, rax
inc rdx
je 0x14015013f
lock cmpxchg qword [0x141af8080], rdx
jne 0x14014fdb0
mov qword [rcx + 0x28], rdx
mov byte [rcx + 0x30], 0
cmp qword [rbx], 0
jne 0x14015013f
mov qword [rbx], rcx
lock inc qword [rcx]
jle 0x14015013f
lea rax, [rdi - 2]
mov qword [rsp + 0x28], rcx
mov byte [rsp + 0x38], 0
mov qword [rsp + 0x30], rax
mov rax, rdi
lock cmpxchg qword [rsi], r13
je 0x140150040
mov rdi, rax
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x14014fc70
lock dec qword [rax]
jne 0x14014fc70
lea rcx, [rsp + 0x28]
call fcn.140156d30
jmp 0x14014fc70
lea rcx, [0x140212138]
call fcn.140149310
mov ecx, eax
jmp 0x14014fd0a
lea rcx, [0x140212138]
call fcn.140149310
mov ecx, eax
jmp 0x14014fd22
mov ecx, dword [0x140212150]
test ecx, ecx
je 0x14014fe83
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jbe 0x14014fea0
mov rdi, rax
add rdi, 8
jmp 0x14014ff3f
lea rcx, [0x140212138]
call fcn.140149310
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
ja 0x14014fe77
nop dword [rax]
je 0x14015013f
movzx eax, byte [0x141af8129]
mov edx, 0x10
xor ecx, ecx
call fcn.140146820
test rax, rax
je 0x14015013f
mov rdi, rax
mov r15, rax
lea rax, [0x140212138]
mov qword [rdi], rax
mov qword [rdi + 8], 0
mov ecx, dword [0x140212150]
test ecx, ecx
je 0x140150012
dec ecx
call sub.KERNEL32.dll_TlsGetValue
mov rbx, rax
mov ecx, dword [0x140212150]
test ecx, ecx
je 0x140150025
dec ecx
add rdi, 8
mov rdx, r15
call sub.KERNEL32.dll_TlsSetValue
test rbx, rbx
je 0x14014ff3f
mov rax, qword [rbx + 8]
test rax, rax
je 0x14014ff2e
lock dec qword [rax]
jne 0x14014ff2e
mov rcx, rbx
add rcx, 8
call fcn.140156d30
mov rcx, qword [0x141af8068]
xor edx, edx
mov r8, rbx
call sub.KERNEL32.dll_HeapFree
mov rbx, qword [rdi]
test rbx, rbx
jne 0x14014ffbc
movzx eax, byte [0x141af8129]
mov edx, 0x38
xor ecx, ecx
call fcn.140146820
test rax, rax
je 0x14015013f
mov rbx, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], 2
mov rax, qword [0x141af8080]
nop word cs:[rax + rax]
mov rcx, rax
inc rcx
je 0x14015013f
lock cmpxchg qword [0x141af8080], rcx
jne 0x14014ff90
mov qword [rbx + 0x28], rcx
mov byte [rbx + 0x30], 0
cmp qword [rdi], 0
jne 0x14015013f
mov qword [rdi], rbx
lock inc qword [rbx]
jle 0x14015013f
mov qword [rsp + 0x50], rbx
lock dec byte [rbx + 0x30]
je 0x140150000
lea rdi, [rbx + 0x30]
nop word cs:[rax + rax]
mov r8d, 1
mov rcx, rdi
mov rdx, r12
mov r9d, 0xffffffff
call sub.api_ms_win_core_synch_l1_2_0.dll_WaitOnAddress
mov al, 1
lock cmpxchg byte [rdi], r14b
jne 0x14014ffe0
lock dec qword [rbx]
jne 0x140150040
lea rcx, [rsp + 0x50]
call fcn.140156d30
jmp 0x140150040
lea rcx, [0x140212138]
call fcn.140149310
mov ecx, eax
jmp 0x14014feea
lea rcx, [0x140212138]
call fcn.140149310
mov ecx, eax
jmp 0x14014ff02
movzx eax, byte [rsp + 0x38]
test al, al
je 0x14014fe60
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x140150070
lock dec qword [rax]
jne 0x140150070
lea rcx, [rsp + 0x28]
call fcn.140156d30
nop word [rax + rax]
mov rax, qword [rsi]
mov rdi, rax
test rax, rax
jne 0x14014fc46
jmp 0x14014fc2b
cmp rdi, 1
mov qword [rsp + 0x28], 3
sete byte [rsp + 0x30]
lea rdx, [rsp + 0x28]
mov rcx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x48]
call qword [rax + 0x20]
mov rax, qword [rsp + 0x28]
xchg qword [rsi], rax
mov ecx, eax
and ecx, 3
cmp ecx, 2
jne 0x14015013f
add rax, 0xfffffffffffffffe
je 0x14015012e
lea rsi, [rsp + 0x28]
jmp 0x1401500d8
mov rax, rdi
test rdi, rdi
je 0x14015012e
mov rdi, qword [rax + 8]
mov rcx, qword [rax]
mov qword [rax], 0
test rcx, rcx
je 0x14015013f
mov qword [rsp + 0x28], rcx
mov byte [rax + 0x10], 1
mov al, 1
xchg byte [rcx + 0x30], al
cmp al, 0xff
je 0x140150110
mov rax, qword [rsp + 0x28]
lock dec qword [rax]
jne 0x1401500d0
jmp 0x140150124
add rcx, 0x30
call fcn.1401e62f0
mov rax, qword [rsp + 0x28]
lock dec qword [rax]
jne 0x1401500d0
mov rcx, rsi
call fcn.140156d30
jmp 0x1401500d0
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2