Function at 0x14002b0c0
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, [0x142f4cf38]
mov rdi, rax
test rax, rax
jne 0x14002b126
jmp 0x14002b10b
cmp byte [rsp + 0x27], 0
je 0x14002b61f
mov rax, rdi
mov ecx, 2
lock cmpxchg qword [rsi], rcx
je 0x14002b564
mov rdi, rax
test rax, rax
je 0x14002b10b
cmp rdi, 1
je 0x14002b100
cmp rdi, 3
je 0x14002b60e
mov eax, edi
and eax, 3
cmp eax, 2
je 0x14002b15e
jmp 0x14002b61f
mov eax, edi
and eax, 3
cmp eax, 2
jne 0x14002b550
mov ecx, dword [0x1400570e0]
test ecx, ecx
je 0x14002b181
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jbe 0x14002b1a0
mov rbx, rax
add rbx, 8
jmp 0x14002b23f
lea rcx, [0x1400570c8]
call fcn.140027e30
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
ja 0x14002b175
nop word [rax + rax]
je 0x14002b61f
movzx eax, byte [0x142f53108]
mov edx, 0x10
xor ecx, ecx
call fcn.140025a60
test rax, rax
je 0x14002b61f
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 0x14002b311
dec ecx
call sub.KERNEL32.dll_TlsGetValue
mov rbp, rax
mov ecx, dword [0x1400570e0]
test ecx, ecx
je 0x14002b324
dec ecx
add rbx, 8
mov rdx, r15
call sub.KERNEL32.dll_TlsSetValue
test rbp, rbp
je 0x14002b23f
mov rax, qword [rbp + 8]
test rax, rax
je 0x14002b22e
lock dec qword [rax]
jne 0x14002b22e
mov rcx, rbp
add rcx, 8
call fcn.1400350a0
mov rcx, qword [0x142f53058]
xor edx, edx
mov r8, rbp
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [rbx]
test rcx, rcx
jne 0x14002b2bc
movzx eax, byte [0x142f53108]
mov edx, 0x38
xor ecx, ecx
call fcn.140025a60
test rax, rax
je 0x14002b61f
mov rcx, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], 2
mov rax, qword [0x142f53078]
nop word cs:[rax + rax]
mov rdx, rax
inc rdx
je 0x14002b61f
lock cmpxchg qword [0x142f53078], rdx
jne 0x14002b290
mov qword [rcx + 0x28], rdx
mov byte [rcx + 0x30], 0
cmp qword [rbx], 0
jne 0x14002b61f
mov qword [rbx], rcx
lock inc qword [rcx]
jle 0x14002b61f
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 0x14002b520
mov rdi, rax
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x14002b150
lock dec qword [rax]
jne 0x14002b150
lea rcx, [rsp + 0x28]
call fcn.1400350a0
jmp 0x14002b150
lea rcx, [0x1400570c8]
call fcn.140027e30
mov ecx, eax
jmp 0x14002b1ea
lea rcx, [0x1400570c8]
call fcn.140027e30
mov ecx, eax
jmp 0x14002b202
mov ecx, dword [0x1400570e0]
test ecx, ecx
je 0x14002b363
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jbe 0x14002b380
mov rdi, rax
add rdi, 8
jmp 0x14002b41f
lea rcx, [0x1400570c8]
call fcn.140027e30
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
ja 0x14002b357
nop dword [rax]
je 0x14002b61f
movzx eax, byte [0x142f53108]
mov edx, 0x10
xor ecx, ecx
call fcn.140025a60
test rax, rax
je 0x14002b61f
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 0x14002b4f2
dec ecx
call sub.KERNEL32.dll_TlsGetValue
mov rbx, rax
mov ecx, dword [0x1400570e0]
test ecx, ecx
je 0x14002b505
dec ecx
add rdi, 8
mov rdx, r15
call sub.KERNEL32.dll_TlsSetValue
test rbx, rbx
je 0x14002b41f
mov rax, qword [rbx + 8]
test rax, rax
je 0x14002b40e
lock dec qword [rax]
jne 0x14002b40e
mov rcx, rbx
add rcx, 8
call fcn.1400350a0
mov rcx, qword [0x142f53058]
xor edx, edx
mov r8, rbx
call sub.KERNEL32.dll_HeapFree
mov rbx, qword [rdi]
test rbx, rbx
jne 0x14002b49c
movzx eax, byte [0x142f53108]
mov edx, 0x38
xor ecx, ecx
call fcn.140025a60
test rax, rax
je 0x14002b61f
mov rbx, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], 2
mov rax, qword [0x142f53078]
nop word cs:[rax + rax]
mov rcx, rax
inc rcx
je 0x14002b61f
lock cmpxchg qword [0x142f53078], rcx
jne 0x14002b470
mov qword [rbx + 0x28], rcx
mov byte [rbx + 0x30], 0
cmp qword [rdi], 0
jne 0x14002b61f
mov qword [rdi], rbx
lock inc qword [rbx]
jle 0x14002b61f
mov qword [rsp + 0x50], rbx
lock dec byte [rbx + 0x30]
je 0x14002b4e0
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 0x14002b4c0
lock dec qword [rbx]
jne 0x14002b520
lea rcx, [rsp + 0x50]
call fcn.1400350a0
jmp 0x14002b520
lea rcx, [0x1400570c8]
call fcn.140027e30
mov ecx, eax
jmp 0x14002b3ca
lea rcx, [0x1400570c8]
call fcn.140027e30
mov ecx, eax
jmp 0x14002b3e2
movzx eax, byte [rsp + 0x38]
test al, al
je 0x14002b340
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x14002b550
lock dec qword [rax]
jne 0x14002b550
lea rcx, [rsp + 0x28]
call fcn.1400350a0
nop word [rax + rax]
mov rax, qword [rsi]
mov rdi, rax
test rax, rax
jne 0x14002b126
jmp 0x14002b10b
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 0x14002b61f
add rax, 0xfffffffffffffffe
je 0x14002b60e
lea rsi, [rsp + 0x28]
jmp 0x14002b5b8
mov rax, rdi
test rdi, rdi
je 0x14002b60e
mov rdi, qword [rax + 8]
mov rcx, qword [rax]
mov qword [rax], 0
test rcx, rcx
leave
je 0x14002b61f
mov qword [rsp + 0x28], rcx
mov byte [rax + 0x10], 1
mov al, 1
xchg byte [rcx + 0x30], al
cmp al, 0xff
je 0x14002b5f0
mov rax, qword [rsp + 0x28]
lock dec qword [rax]
or byte [rbp - 0x38], dh
jmp 0x14002b604
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.1400350a0
jmp 0x14002b5b0
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2