Function at 0x14003a3d0
Capabilities:
Get 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 r12, rdx
mov rbx, rcx
mov rax, qword [0x140154028]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp rcx, 0x10
ja 0x14003a644
lea rax, [rbx - 1]
test rbx, rax
sete al
test rbx, rbx
setne cl
test cl, al
je 0x14003a97f
mov r15, qword [0x14015a738]
test r15, r15
je 0x14003a982
movabs rax, 0xaaaaaaaaaaaaaaaa
mov edx, 0x40
mov ecx, 0x40
test r12, r12
je 0x14003a448
bsr rcx, r12
xor rcx, 0x3f
sub rdx, rcx
lea rcx, [0x14013adb0]
mov cl, byte [rdx + rcx]
mov rbp, r12
shr rbp, cl
and ebp, 7
lea rcx, [0x14013ae00]
mov rcx, qword [rcx + rdx*8]
and rcx, r12
lea rdx, [rdx*8]
add rdx, rbp
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x14013a598]
movzx r14d, word [rcx + rdx*2 + 0x400]
mov byte [rsp + 0x4f], 0
mov qword [rsp + 0x40], rax
cmp byte [r15], 2
je 0x14003a98f
cmp byte [r15 + 2], 0
je 0x14003a9a7
mov ebx, dword [0x14015e040]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test edi, edi
jne 0x14003a866
cmp rbx, 2
jb 0x14003a9e8
inc qword [rbx + 0x5a0]
cmp word [0x1401572c0], r14w
jb 0x14003a575
mov rsi, r14
shl rsi, 4
mov rbp, rbx
add rbp, rsi
mov rdi, qword [rbx + rsi]
test rdi, rdi
je 0x14003a834
inc qword [rbx + 0x5a8]
mov rax, qword [rdi]
test rax, rax
je 0x14003a80e
mov rcx, rax
not rcx
cmp qword [rdi + 8], rcx
jne 0x14003aa60
bswap rax
prefetcht0 byte [rax]
dec byte [rbx + rsi + 8]
mov qword [rbp], rax
movzx eax, word [rbx + rsi + 0xa]
mov qword [rsp + 0x40], rax
movzx eax, word [rbx + rsi + 0xa]
sub qword [rbx + 0x590], rax
test rdi, rdi
je 0x14003a583
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140097620
mov rax, rdi
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
inc qword [rbx + 0x5c0]
inc qword [rbx + 0x5b0]
lea rax, [r14 + r14*4]
lea rsi, [r15 + rax*8]
add rsi, 0x10
lea r14, [r15 + 8]
mov edi, 1
xor ebx, ebx
mov rbp, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r14
call rbp
test al, al
jne 0x14003a5d4
jmp 0x14003a87a
pause
dec eax
jne 0x14003a5af
add ebx, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebx, 0x3e8
jl 0x14003a5a1
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rdi, qword [rax]
test rdi, rdi
je 0x14003a61b
mov byte [rsp + 0x4f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x14003a807
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x14003aa60
bswap rcx
prefetcht0 byte [rcx]
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14003a554
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
mov rcx, rsi
mov rdx, r15
xor r8d, r8d
mov r9, r12
int3
mov r14, qword [0x14015a738]
test r14, r14
je 0x14003aa65
lea rsi, [rbx - 1]
test rbx, rsi
sete al
test rbx, rbx
setne cl
test cl, al
je 0x14003aa72
cmp rbx, 0x100001
jae 0x14003aa75
cmp rbx, 0x4001
jb 0x14003a68f
cmp r12, 0xf0001
jae 0x14003aab4
cmp rbx, 0x4000
ja 0x14003a968
cmp r12, rbx
jae 0x14003a815
mov r15, rbx
mov ebx, 0x4000
cmp r15, r12
jb 0x14003aaa8
movabs rax, 0xaaaaaaaaaaaaaaaa
mov edx, 0x40
mov ecx, 0x40
test r15, r15
je 0x14003a6d7
bsr rcx, r15
xor rcx, 0x3f
sub rdx, rcx
lea rcx, [0x14013adb0]
mov cl, byte [rdx + rcx]
mov rbp, r15
shr rbp, cl
and ebp, 7
lea rcx, [0x14013ae00]
mov rcx, qword [rcx + rdx*8]
and rcx, r15
lea rdx, [rdx*8]
add rdx, rbp
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x14013a598]
movzx r13d, word [rcx + rdx*2 + 0x400]
mov byte [rsp + 0x4f], 0
mov qword [rsp + 0x40], rax
cmp byte [r14], 2
je 0x14003aa78
mov qword [rsp + 0x38], rsi
cmp byte [r14 + 2], 0
je 0x14003aa00
cmp rbx, 0x4000
ja 0x14003aa00
mov esi, dword [0x14015e040]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test edi, edi
jne 0x14003a948
cmp rsi, 2
jb 0x14003aa90
inc qword [rsi + 0x5a0]
cmp word [0x1401572c0], r13w
jb 0x14003a955
mov rbp, r13
shl rbp, 4
mov r12, rsi
add r12, rbp
mov rdi, qword [rsi + rbp]
test rdi, rdi
je 0x14003a889
inc qword [rsi + 0x5a8]
mov rax, qword [rdi]
test rax, rax
je 0x14003a873
mov rcx, rax
not rcx
cmp qword [rdi + 8], rcx
jne 0x14003aa60
bswap rax
prefetcht0 byte [rax]
dec byte [rsi + rbp + 8]
mov qword [r12], rax
movzx eax, word [rsi + rbp + 0xa]
mov qword [rsp + 0x40], rax
movzx eax, word [rsi + rbp + 0xa]
sub qword [rsi + 0x590], rax
test rdi, rdi
je 0x14003a8af
test qword [rsp + 0x38], rdi
je 0x14003a554
int3
xor ecx, ecx
jmp 0x14003a606
xor eax, eax
jmp 0x14003a531
mov rax, r12
dec rax
je 0x14003a85f
bsr rcx, rax
xor rcx, 0x3f
neg cl
mov ebx, 1
shl rbx, cl
jmp 0x14003a6a5
inc qword [rbx + 0x5b8]
inc qword [rbx + 0x5b0]
mov rcx, rbx
mov rdx, r14
int3
mov ecx, 0x40
jmp 0x14003a825
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14003a4cf
xor eax, eax
jmp 0x14003a7d2
mov eax, edi
test edi, edi
jg 0x14003a5af
jmp 0x14003a5b7
inc qword [rsi + 0x5b8]
inc qword [rsi + 0x5b0]
mov rcx, rsi
mov rdx, r13
int3
lea rax, [r13*4]
add rax, r13
lea rsi, [r14 + rax*8]
add rsi, 0x10
lea r12, [r14 + 8]
mov edi, 1
xor ebp, ebp
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r12
call r13
test al, al
jne 0x14003a908
jmp 0x14003a970
pause
dec eax
jne 0x14003a8e3
add ebp, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebp, 0x3e8
jl 0x14003a8d4
mov rcx, r12
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rdi, qword [rax]
test rdi, rdi
jne 0x14003aa35
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
mov rcx, rsi
mov rdx, r14
xor r8d, r8d
mov r9, r15
int3
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14003a7f9
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14003a770
inc qword [rsi + 0x5c0]
inc qword [rsi + 0x5b0]
jmp 0x14003a8af
mov r15, r12
jmp 0x14003a6b6
mov eax, edi
test edi, edi
jg 0x14003a8e3
jmp 0x14003a8eb
int3
int3
mov al, byte [0x1401572b8]
cmp al, 2
jne 0x14003a4a3
int3
lea rsi, [r14 + r14*4]
lea r14, [r15 + 8]
mov rcx, r14
int3
lea r8, [rsp + 0x40]
mov rcx, r15
mov edx, r14d
int3
lea r12, [r14 + 8]
mov rcx, r12
int3
mov byte [rsp + 0x4f], 0
mov rcx, qword [rdi]
test rcx, rcx
je 0x14003aab0
mov rdx, rcx
not rdx
cmp qword [rdi + 8], rdx
jne 0x14003aa60
bswap rcx
prefetcht0 byte [rcx]
mov qword [rax], rcx
inc word [rax + 0x18]
jmp 0x14003a93a
call fcn.1400c2bc0
int3
int3
int3
mov al, byte [0x1401572b8]
cmp al, 2
jne 0x14003a732
int3
lea r8, [rsp + 0x40]
mov rcx, r14
mov edx, r13d
int3
mov rcx, r12
int3
xor ecx, ecx
jmp 0x14003aa54
int3