Function at 0x14001b200
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 + 0x50], r8
mov qword [rsp + 0x40], rdx
mov rsi, rcx
mov r13, qword [rcx]
xor r15d, r15d
lea r12, [0x1401ccaf0]
jmp 0x14001b233
mov r13, qword [rsi]
mov rbx, r13
and rbx, 3
je 0x14001b250
cmp ebx, 1
je 0x14001b270
jmp 0x14001b782
cmp qword [rsp + 0x40], 0
je 0x14001b270
lea rcx, [r13 + 1]
mov rax, r13
lock cmpxchg qword [rsi], rcx
mov r13, rax
jne 0x14001b233
jmp 0x14001b7a2
lea r14, [rsp + rbx]
add r14, 0x28
nop dword [rax + rax]
mov ecx, dword [0x1401a70a8]
test ecx, ecx
je 0x14001b2aa
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x14001b2d0
mov rbp, rax
cmp qword [rax + 8], 0
je 0x14001b2d0
add rbp, 0x10
jmp 0x14001b390
lea rcx, [0x1401a7090]
call fcn.140082e00
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x14001b297
nop word cs:[rax + rax]
mov ecx, dword [0x1401a70a8]
test ecx, ecx
je 0x14001b331
dec ecx
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
jne 0x14001b350
movzx eax, byte [0x14024a149]
mov edx, 0x18
xor ecx, ecx
call fcn.140080d30
test rax, rax
je 0x14001b8a2
mov rdi, rax
lea rax, [0x1401a7090]
mov qword [rdi], rax
mov qword [rdi + 8], 0
mov ecx, dword [0x1401a70a8]
test ecx, ecx
je 0x14001b472
dec ecx
mov rdx, rdi
call sub.KERNEL32.dll_TlsSetValue
jmp 0x14001b35d
lea rcx, [0x1401a7090]
call fcn.140082e00
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x14001b2e6
nop dword [rax]
mov rdi, rax
cmp rax, 1
je 0x14001b8a2
lea rbp, [rdi + 0x10]
mov rcx, qword [rdi + 0x10]
cmp qword [rdi + 8], 0
mov qword [rdi + 8], 1
mov qword [rdi + 0x10], 0
je 0x14001b390
test rcx, rcx
je 0x14001b390
lock dec qword [rcx]
jne 0x14001b390
call fcn.1400c5730
nop dword [rax]
mov rcx, qword [rbp]
test rcx, rcx
jne 0x14001b40e
movzx eax, byte [0x14024a149]
mov edx, 0x30
xor ecx, ecx
call fcn.140080d30
test rax, rax
je 0x14001b8a2
mov rcx, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x18], 0
mov rax, qword [0x14024a108]
nop word cs:[rax + rax]
mov rdx, rax
inc rdx
je 0x14001b8a2
lock cmpxchg qword [0x14024a108], rdx
jne 0x14001b3e0
mov qword [rcx + 0x10], rdx
mov byte [rcx + 0x28], 0
cmp qword [rbp], 0
jne 0x14001b8a2
mov qword [rbp], rcx
lock inc qword [rcx]
jle 0x14001b8a2
mov rax, r13
and rax, 0xfffffffffffffffc
mov qword [rsp + 0x28], rcx
mov byte [rsp + 0x38], 0
mov qword [rsp + 0x30], rax
mov rax, r13
lock cmpxchg qword [rsi], r14
je 0x14001b720
mov r13, rax
and eax, 3
cmp rax, rbx
jne 0x14001b760
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x14001b280
lock dec qword [rax]
jne 0x14001b280
mov rcx, qword [rsp + 0x28]
call fcn.1400c5730
jmp 0x14001b280
lea rcx, [0x1401a7090]
call fcn.140082e00
mov ecx, eax
jmp 0x14001b327
mov ecx, dword [0x1401a70a8]
test ecx, ecx
je 0x14001b4ba
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x14001b4e0
mov rbp, rax
cmp qword [rax + 8], 0
je 0x14001b4e0
add rbp, 0x10
jmp 0x14001b5a0
lea rcx, [0x1401a7090]
call fcn.140082e00
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x14001b4a7
nop word cs:[rax + rax]
mov ecx, dword [0x1401a70a8]
test ecx, ecx
je 0x14001b541
dec ecx
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
jne 0x14001b560
movzx eax, byte [0x14024a149]
mov edx, 0x18
xor ecx, ecx
call fcn.140080d30
test rax, rax
je 0x14001b8a2
mov rdi, rax
lea rax, [0x1401a7090]
mov qword [rdi], rax
mov qword [rdi + 8], 0
mov ecx, dword [0x1401a70a8]
test ecx, ecx
je 0x14001b702
dec ecx
mov rdx, rdi
call sub.KERNEL32.dll_TlsSetValue
jmp 0x14001b56d
lea rcx, [0x1401a7090]
call fcn.140082e00
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x14001b4f6
nop dword [rax]
mov rdi, rax
cmp rax, 1
je 0x14001b8a2
lea rbp, [rdi + 0x10]
mov rcx, qword [rdi + 0x10]
cmp qword [rdi + 8], 0
mov qword [rdi + 8], 1
mov qword [rdi + 0x10], 0
je 0x14001b5a0
test rcx, rcx
je 0x14001b5a0
lock dec qword [rcx]
jne 0x14001b5a0
call fcn.1400c5730
nop dword [rax]
mov r13, qword [rbp]
test r13, r13
jne 0x14001b61f
movzx eax, byte [0x14024a149]
mov edx, 0x30
xor ecx, ecx
call fcn.140080d30
test rax, rax
je 0x14001b8a2
mov r13, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x18], 0
mov rax, qword [0x14024a108]
nop word cs:[rax + rax]
mov rcx, rax
inc rcx
je 0x14001b8a2
lock cmpxchg qword [0x14024a108], rcx
jne 0x14001b5f0
mov qword [r13 + 0x10], rcx
mov byte [r13 + 0x28], 0
cmp qword [rbp], 0
jne 0x14001b8a2
mov qword [rbp], r13
lock inc qword [r13]
jle 0x14001b8a2
lock dec byte [r13 + 0x28]
je 0x14001b66e
lea rbp, [r13 + 0x28]
mov rdi, qword [0x14024a128]
test rdi, rdi
je 0x14001b686
nop word cs:[rax + rax]
mov r8d, 1
mov rcx, rbp
mov rdx, r12
mov r9d, 0xffffffff
call rdi
mov al, 1
lock cmpxchg byte [rbp], r15b
jne 0x14001b650
lock dec qword [r13]
jne 0x14001b720
mov rcx, r13
call fcn.1400c5730
jmp 0x14001b720
mov rcx, qword [0x1401a70b8]
cmp rcx, 0xffffffffffffffff
jne 0x14001b6df
mov qword [rsp + 0x48], 0xffffffffffffffff
mov rax, qword [str.___b_]
lea rcx, [rsp + 0x48]
mov edx, 0xc0000000
xor r8d, r8d
xor r9d, r9d
call rax
test eax, eax
jne 0x14001b8a2
mov rcx, qword [rsp + 0x48]
mov rax, 0xffffffffffffffff
lock cmpxchg qword [0x1401a70b8], rcx
je 0x14001b6df
mov rdi, rax
call sub.KERNEL32.dll_CloseHandle
mov rcx, rdi
mov rax, qword [0x1401a70b0]
mov rdx, rbp
xor r8d, r8d
xor r9d, r9d
call rax
xor eax, eax
xchg byte [rbp], al
lock dec qword [r13]
jne 0x14001b720
jmp 0x14001b679
lea rcx, [0x1401a7090]
call fcn.140082e00
mov ecx, eax
jmp 0x14001b537
movzx eax, byte [rsp + 0x38]
test al, al
je 0x14001b490
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x14001b230
lock dec qword [rax]
jne 0x14001b230
mov rcx, qword [rsp + 0x28]
call fcn.1400c5730
jmp 0x14001b230
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x14001b77a
lock dec qword [rax]
jne 0x14001b77a
mov rcx, qword [rsp + 0x28]
call fcn.1400c5730
mov r13, qword [rsi]
jmp 0x14001b233
cmp ebx, 2
jne 0x14001b7a0
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
jmp 0x14001b7a0
mov rcx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x50]
call qword [rax + 0x20]
movzx eax, al
add rax, rax
xchg qword [rsi], rax
mov ecx, eax
and ecx, 3
cmp ecx, 1
jne 0x14001b8a2
dec rax
je 0x14001b787
lea rsi, [rsp + 0x28]
jmp 0x14001b7e8
mov rax, r15
test r15, r15
je 0x14001b787
mov rdi, qword [rax]
mov r15, qword [rax + 8]
mov qword [rax], 0
test rdi, rdi
je 0x14001b8a2
mov byte [rax + 0x10], 1
mov al, 1
xchg byte [rdi + 0x28], al
cmp al, 0xff
jne 0x14001b821
lea rbx, [rdi + 0x28]
mov rax, qword [0x14024a130]
test rax, rax
je 0x14001b831
mov rcx, rbx
call rax
lock dec qword [rdi]
jne 0x14001b7e0
mov rcx, rdi
call fcn.1400c5730
jmp 0x14001b7e0
mov rcx, qword [0x1401a70b8]
cmp rcx, 0xffffffffffffffff
jne 0x14001b884
mov qword [rsp + 0x28], 0xffffffffffffffff
mov rax, qword [str.___b_]
mov rcx, rsi
mov edx, 0xc0000000
xor r8d, r8d
xor r9d, r9d
call rax
test eax, eax
jne 0x14001b8a2
mov rcx, qword [rsp + 0x28]
mov rax, 0xffffffffffffffff
lock cmpxchg qword [0x1401a70b8], rcx
je 0x14001b884
mov r14, rax
call sub.KERNEL32.dll_CloseHandle
mov rcx, r14
mov rax, qword [0x1401a70e0]
mov rdx, rbx
xor r8d, r8d
xor r9d, r9d
call rax
lock dec qword [rdi]
jne 0x14001b7e0
jmp 0x14001b827
ud2