Function at 0x14002b010
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, [0x1427fc4c8]
mov rdi, rax
test rax, rax
jne 0x14002b076
jmp 0x14002b05b
cmp byte [rsp + 0x27], 0
je 0x14002b56f
mov rax, rdi
mov ecx, 2
lock cmpxchg qword [rsi], rcx
je 0x14002b4b4
mov rdi, rax
test rax, rax
je 0x14002b05b
cmp rdi, 1
je 0x14002b050
cmp rdi, 3
je 0x14002b55e
mov eax, edi
and eax, 3
cmp eax, 2
je 0x14002b0ae
jmp 0x14002b56f
mov eax, edi
and eax, 3
cmp eax, 2
jne 0x14002b4a0
mov ecx, dword [0x1400570e0]
test ecx, ecx
je 0x14002b0d1
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jbe 0x14002b0f0
mov rbx, rax
add rbx, 8
jmp 0x14002b18f
lea rcx, [0x1400570c8]
call fcn.140027d80
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
ja 0x14002b0c5
nop word [rax + rax]
je 0x14002b56f
movzx eax, byte [0x142802108]
mov edx, 0x10
xor ecx, ecx
call fcn.1400259b0
test rax, rax
je 0x14002b56f
mov rbx, rax
mov r15, rax
lea rax, [0x1400570c8]
mov qword [rbx], rax
mov qword [rbx + 8], 0
mov ecx, dword [0x1400570e0]
test ecx, ecx
je 0x14002b261
dec ecx
call sub.KERNEL32.dll_TlsGetValue
mov rbp, rax
mov ecx, dword [0x1400570e0]
test ecx, ecx
je 0x14002b274
dec ecx
add rbx, 8
mov rdx, r15
call sub.KERNEL32.dll_TlsSetValue
test rbp, rbp
je 0x14002b18f
mov rax, qword [rbp + 8]
test rax, rax
je 0x14002b17e
lock dec qword [rax]
jne 0x14002b17e
mov rcx, rbp
add rcx, 8
call fcn.140034ff0
mov rcx, qword [0x142802058]
xor edx, edx
mov r8, rbp
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [rbx]
test rcx, rcx
jne 0x14002b20c
movzx eax, byte [0x142802108]
mov edx, 0x38
xor ecx, ecx
call fcn.1400259b0
test rax, rax
je 0x14002b56f
mov rcx, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], 2
mov rax, qword [0x142802078]
nop word cs:[rax + rax]
mov rdx, rax
inc rdx
je 0x14002b56f
lock cmpxchg qword [0x142802078], rdx
jne 0x14002b1e0
mov qword [rcx + 0x28], rdx
mov byte [rcx + 0x30], 0
cmp qword [rbx], 0
jne 0x14002b56f
mov qword [rbx], rcx
lock inc qword [rcx]
jle 0x14002b56f
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 0x14002b470
mov rdi, rax
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x14002b0a0
lock dec qword [rax]
jne 0x14002b0a0
invalid
invalid
invalid
invalid
lea rcx, [rsp + 0x28]
call fcn.140034ff0
jmp 0x14002b0a0
lea rcx, [0x1400570c8]
call fcn.140027d80
mov ecx, eax
jmp 0x14002b13a
lea rcx, [0x1400570c8]
call fcn.140027d80
mov ecx, eax
jmp 0x14002b152
mov ecx, dword [0x1400570e0]
test ecx, ecx
je 0x14002b2b3
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jbe 0x14002b2d0
mov rdi, rax
add rdi, 8
jmp 0x14002b36f
lea rcx, [0x1400570c8]
call fcn.140027d80
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
ja 0x14002b2a7
nop dword [rax]
je 0x14002b56f
movzx eax, byte [0x142802108]
mov edx, 0x10
xor ecx, ecx
call fcn.1400259b0
test rax, rax
je 0x14002b56f
mov rdi, rax
mov r15, rax
lea rax, [0x1400570c8]
mov qword [rdi], rax
mov qword [rdi + 8], 0
mov ecx, dword [0x1400570e0]
test ecx, ecx
je 0x14002b442
dec ecx
call sub.KERNEL32.dll_TlsGetValue
mov rbx, rax
mov ecx, dword [0x1400570e0]
test ecx, ecx
je 0x14002b455
dec ecx
add rdi, 8
mov rdx, r15
call sub.KERNEL32.dll_TlsSetValue
test rbx, rbx
je 0x14002b36f
mov rax, qword [rbx + 8]
test rax, rax
je 0x14002b35e
lock dec qword [rax]
jne 0x14002b35e
mov rcx, rbx
add rcx, 8
call fcn.140034ff0
mov rcx, qword [0x142802058]
xor edx, edx
mov r8, rbx
call sub.KERNEL32.dll_HeapFree
mov rbx, qword [rdi]
test rbx, rbx
jne 0x14002b3ec
movzx eax, byte [0x142802108]
mov edx, 0x38
xor ecx, ecx
call fcn.1400259b0
test rax, rax
je 0x14002b56f
mov rbx, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], 2
mov rax, qword [0x142802078]
nop word cs:[rax + rax]
mov rcx, rax
inc rcx
je 0x14002b56f
lock cmpxchg qword [0x142802078], rcx
jne 0x14002b3c0
mov qword [rbx + 0x28], rcx
mov byte [rbx + 0x30], 0
cmp qword [rdi], 0
jne 0x14002b56f
mov qword [rdi], rbx
lock inc qword [rbx]
jle 0x14002b56f
mov qword [rsp + 0x50], rbx
lock dec byte [rbx + 0x30]
je 0x14002b430
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 0x14002b410
lock dec qword [rbx]
jne 0x14002b470
lea rcx, [rsp + 0x50]
call fcn.140034ff0
jmp 0x14002b470
lea rcx, [0x1400570c8]
call fcn.140027d80
mov ecx, eax
jmp 0x14002b31a
lea rcx, [0x1400570c8]
call fcn.140027d80
mov ecx, eax
jmp 0x14002b332
movzx eax, byte [rsp + 0x38]
test al, al
je 0x14002b290
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x14002b4a0
lock dec qword [rax]
jne 0x14002b4a0
lea rcx, [rsp + 0x28]
call fcn.140034ff0
nop word [rax + rax]
mov rax, qword [rsi]
mov rdi, rax
test rax, rax
jne 0x14002b076
jmp 0x14002b05b
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 0x14002b56f
add rax, 0xfffffffffffffffe
je 0x14002b55e
lea rsi, [rsp + 0x28]
jmp 0x14002b508
mov rax, rdi
test rdi, rdi
je 0x14002b55e
mov rdi, qword [rax + 8]
mov rcx, qword [rax]
mov qword [rax], 0
test rcx, rcx
leave
je 0x14002b56f
mov qword [rsp + 0x28], rcx
mov byte [rax + 0x10], 1
mov al, 1
xchg byte [rcx + 0x30], al
cmp al, 0xff
je 0x14002b540
mov rax, qword [rsp + 0x28]
lock dec qword [rax]
or byte [rbp - 0x38], dh
jmp 0x14002b554
add rcx, 0x30
call sub.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle
mov rax, qword [rsp + 0x28]
lock dec qword [rax]
or byte [rbp - 0x54], dh
mov rcx, rsi
call fcn.140034ff0
jmp 0x14002b500
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2