Function at 0x1400a5b00
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, 0x38
mov r12, rcx
mov rax, qword [0x14010c038]
xor rax, rsp
mov qword [rsp + 0x30], rax
call fcn.1400a6eb0
mov r14, rax
mov r15, rax
mov eax, 0x40
mov ecx, 0x40
test r12, r12
je 0x1400a5b44
bsr rcx, r12
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x1400ee840]
mov cl, byte [rax + rcx]
mov rdx, r12
shr rdx, cl
and edx, 7
lea rcx, [0x1400ee890]
mov rcx, qword [rcx + rax*8]
and rcx, r12
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1400eea98]
movzx r13d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2f], 0
cmp byte [r15 + 2], 0
je 0x1400a5c4e
mov edi, dword [0x140117fa0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test ebx, ebx
jne 0x1400a5c41
cmp rdi, 1
jbe 0x1400a5ca8
inc qword [rdi + 0x298]
cmp r13w, 0x29
jae 0x1400a5ccb
mov rsi, r13
shl rsi, 4
mov rbp, rdi
add rbp, rsi
cmp qword [rdi + rsi], 0
je 0x1400a5d6e
inc qword [rdi + 0x2a0]
mov rbx, qword [rbp]
mov rax, qword [rbx]
test rax, rax
je 0x1400a5c0c
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x1400a5d99
bswap rax
dec byte [rdi + rsi + 8]
mov qword [rbp], rax
test rbx, rbx
je 0x1400a5cd9
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400797f0
mov rax, rbx
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400a5bb5
lea rax, [r13*4]
add rax, r13
lea rsi, [r14 + rax*8]
add rsi, 0x10
add r14, 8
mov edi, 1
xor ebx, ebx
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov ebp, 0x40
mov rcx, r14
call r13
test al, al
jne 0x1400a5d32
jmp 0x1400a5dad
pause
dec eax
jne 0x1400a5c8b
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, ebp
cmp ebx, 0x3e8
jl 0x1400a5c78
jmp 0x1400a5d2a
je 0x1400a5cd9
mov byte [r15 + 2], 0
mov rcx, r15
call fcn.14006e580
mov rdi, rax
mov byte [r15 + 2], 1
inc qword [rax + 0x298]
jmp 0x1400a5bc6
inc qword [rdi + 0x2b8]
inc qword [rdi + 0x2a8]
lea rax, [r13*4]
add rax, r13
lea rsi, [r14 + rax*8]
add rsi, 0x10
add r14, 8
mov edi, 1
xor ebx, ebx
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov ebp, 0x40
mov rcx, r14
call r13
test al, al
jne 0x1400a5d32
jmp 0x1400a5d9e
pause
dec eax
jne 0x1400a5d12
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, ebp
cmp ebx, 0x3e8
jl 0x1400a5d03
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rbx, qword [rax]
test rbx, rbx
je 0x1400a5dbc
mov byte [rsp + 0x2f], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400a5d56
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x1400a5d99
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x1400a5c20
inc qword [rdi + 0x2b0]
inc qword [rdi + 0x2a8]
mov rcx, rdi
mov rdx, r13
call fcn.14006e800
mov rbx, qword [rbp]
test rbx, rbx
jne 0x1400a5bf4
jmp 0x1400a5cd9
call 0x1400a5820
mov eax, edi
test edi, edi
jg 0x1400a5d12
jmp 0x1400a5d1a
mov eax, edi
test edi, edi
jg 0x1400a5c8b
jmp 0x1400a5c93
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r15
xor r8d, r8d
mov r9, r12
call fcn.140050620
mov rbx, rax
jmp 0x1400a5d60