Function at 0x1400a9700
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 rbx, r8
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x14010c038]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov qword [rcx + 0x18], 0
mov qword [rcx + 0x20], r9
test rdx, rdx
jne 0x1400a9779
xor ebp, ebp
mov qword [rsi], rbp
shl rbx, 4
add rbx, rbp
mov qword [rsi + 0x10], rbx
mov qword [rsi + 8], rbx
shl rdi, 4
add rdi, rbp
mov qword [rsi + 0x18], rdi
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400797f0
mov rax, rsi
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.1400a6eb0
mov qword [rsp + 0x40], rax
mov r15, rax
mov rbp, rdi
shl rbp, 4
mov eax, 0x40
mov ecx, 0x40
je 0x1400a97a1
bsr rcx, rbp
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x1400ee840]
mov cl, byte [rax + rcx]
mov rdx, rbp
shr rdx, cl
and edx, 7
lea rcx, [0x1400ee890]
mov rcx, qword [rcx + rax*8]
and rcx, rbp
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1400eea98]
movzx r13d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x4f], 0
cmp byte [r15 + 2], 0
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x30], r15
je 0x1400a9897
mov r14d, dword [0x140117fa0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r14, rax
test r12d, r12d
jne 0x1400a988c
cmp r14, 1
jbe 0x1400a98f9
inc qword [r14 + 0x298]
cmp r13w, 0x29
jae 0x1400a991f
mov r12, r13
shl r12, 4
mov r15, r14
add r15, r12
cmp qword [r14 + r12], 0
je 0x1400a99cc
inc qword [r14 + 0x2a0]
mov rbp, qword [r15]
mov rax, qword [rbp]
test rax, rax
je 0x1400a9873
mov rcx, rax
not rcx
cmp qword [rbp + 8], rcx
jne 0x1400a99f6
bswap rax
dec byte [r14 + r12 + 8]
mov qword [r15], rax
test rbp, rbp
jne 0x1400a973b
jmp 0x1400a992d
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400a981c
lea rax, [r13*4]
add rax, r13
mov r15, qword [rsp + 0x40]
lea r13, [r15 + rax*8]
add r13, 0x10
add r15, 8
mov ebp, 1
xor r14d, r14d
mov r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r15
call r12
test al, al
jne 0x1400a998e
jmp 0x1400a9a0a
pause
dec eax
jne 0x1400a98d5
add r14d, ebp
add ebp, ebp
cmp ebp, 0x40
mov eax, 0x40
cmovge ebp, eax
cmp r14d, 0x3e8
jl 0x1400a98c2
jmp 0x1400a9986
je 0x1400a992d
mov rbp, qword [rsp + 0x30]
mov byte [rbp + 2], 0
mov rcx, rbp
call fcn.14006e580
mov r14, rax
mov byte [rbp + 2], 1
inc qword [rax + 0x298]
jmp 0x1400a982d
inc qword [r14 + 0x2b8]
inc qword [r14 + 0x2a8]
lea rax, [r13*4]
add rax, r13
mov r15, qword [rsp + 0x40]
lea r13, [r15 + rax*8]
add r13, 0x10
add r15, 8
mov ebp, 1
xor r14d, r14d
mov r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r15
call r12
test al, al
jne 0x1400a998e
jmp 0x1400a99fb
pause
dec eax
jne 0x1400a9967
add r14d, ebp
add ebp, ebp
cmp ebp, 0x40
mov eax, 0x40
cmovge ebp, eax
cmp r14d, 0x3e8
jl 0x1400a9958
mov rcx, r15
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r13]
mov rbp, qword [rax]
test rbp, rbp
je 0x1400a9a19
mov byte [rsp + 0x4f], 0
mov rcx, qword [rbp]
test rcx, rcx
je 0x1400a99b4
mov rdx, rcx
not rdx
cmp qword [rbp + 8], rdx
jne 0x1400a99f6
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x1400a973b
inc qword [r14 + 0x2b0]
inc qword [r14 + 0x2a8]
mov rcx, r14
mov rdx, r13
call fcn.14006e800
mov rbp, qword [r15]
test rbp, rbp
jne 0x1400a985a
jmp 0x1400a992d
call 0x1400a5820
mov eax, ebp
test ebp, ebp
jg 0x1400a9967
jmp 0x1400a9970
mov eax, ebp
test ebp, ebp
jg 0x1400a98d5
jmp 0x1400a98de
lea rax, [rsp + 0x4f]
mov qword [rsp + 0x20], rax
mov rcx, r13
mov rdx, qword [rsp + 0x30]
xor r8d, r8d
mov r9, qword [rsp + 0x38]
call fcn.140050620
mov rbp, rax
jmp 0x1400a99be