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

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rbx, qword [rcx + 0x28]
mov r13, rcx
mov rdi, rdx
mov rsi, r8
test rbx, rbx
je 0x14020ddf0
mov qword [rsp + 0x40], 0
lea rbp, [rsp + 0x40]
mov qword [rsp + 0x48], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [rsp + 0x48]
mov dword [rsp + 0x40], eax
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rdx, rbp
mov rcx, rbx
call fcn.14026f690
test eax, eax
je 0x14020ddd8
mov rbp, qword [rbx]
mov r12, qword [rbx + 8]
mov qword [rbx], 0
mov qword [rbx + 0x30], 0
test rsi, rsi
jne 0x14020dd74
jmp 0x14020de30
add rdi, rbx
sub rsi, rbx
je 0x14020de30
mov rbx, qword [r13 + 0x38]
mov qword [rsp + 0x28], r12
mov rdx, rdi
mov rcx, r13
mov qword [rsp + 0x20], rbp
cmp rsi, rbx
cmovbe rbx, rsi
xor r9d, r9d
mov r8, rbx
call fcn.14020da80
test eax, eax
jne 0x14020dd68
test rbp, rbp
je 0x14020ddc6
mov rbx, qword [r13 + 0x28]
mov rcx, rbp
mov dword [rsp + 0x3c], eax
mov qword [rbx], rbp
mov rdx, qword [rbx + 8]
call fcn.1402f5e00
mov qword [rbx + 8], 0
mov eax, dword [rsp + 0x3c]
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
xor ebp, ebp
xor r12d, r12d
mov eax, 1
test rsi, rsi
jne 0x14020dd74
jmp 0x14020ddc6
mov eax, dword [rcx + 0x14]
test eax, eax
je 0x14020de17
mov r9, qword [rcx + 0x68]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.14020a6c0
mov qword [r13 + 0x28], rax
mov rbx, rax
test rax, rax
jne 0x14020dd02
xor eax, eax
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov eax, 1
jmp 0x14020dd9e
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x14048efd0]
xor r8d, r8d
mov eax, dword [rbx]
mov rsi, rcx
mov edi, edx
mov ecx, 1
cmp eax, 2
jne 0x14020e925
jmp 0x14020e93b
cmp eax, 1
jne 0x14020e978
mov eax, r8d
lock cmpxchg dword [rbx], ecx
test eax, eax
jne 0x14020e920
call fcn.14020a530
mov dword [rbx], 2
mov rax, qword [0x14048cd30]
mov edx, dword [rax]
test edx, edx
je 0x14020e97f
call fcn.14020b6c0
test rax, rax
je 0x14020e97f
lea rdx, [0x140360960]
cmp rax, rdx
je 0x14020e97f
mov edx, edi
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.14020b750
mov eax, dword [rbx]
cmp eax, 2
je 0x14020e93b
mov eax, dword [0x1404ce3c4]
xor edx, edx
mov ecx, 1
cmp eax, 2
jne 0x14020e99d
jmp 0x14020e9ba
cmp eax, 1
jne 0x14020ea08
mov eax, edx
lock cmpxchg dword [0x1404ce3c4], ecx
test eax, eax
jne 0x14020e998
call fcn.14020e780
mov dword [0x1404ce3c4], 2
mov eax, dword [0x1404ce3c8]
test eax, eax
je 0x14020ea13
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12, qword [0x14048ee70]
mov ebp, eax
mov ecx, dword [r12]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebp
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
je 0x14020ea20
movsxd r8, edi
mov rdx, rsi
mov rcx, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp 0x14020dce0
mov eax, dword [0x1404ce3c4]
cmp eax, 2
je 0x14020e9ba
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov ecx, 4
call fcn.1401fec30
test eax, eax
je 0x14020ea13
mov rax, qword [0x14048e340]
mov rcx, qword [rax]
call fcn.14020e540
mov ecx, dword [r12]
mov rbx, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test rbx, rbx
je 0x14020ea13
jmp 0x14020e9ed