Function at 0x14008d840
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 [0x1400e5028]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov qword [rcx + 0x18], 0
mov qword [rcx + 0x20], r9
test rdx, rdx
jne 0x14008d8b9
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.14005e850
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.14008aff0
mov qword [rsp + 0x40], rax
mov r15, rax
mov rbp, rdi
shl rbp, 4
mov eax, 0x40
mov ecx, 0x40
je 0x14008d8e1
bsr rcx, rbp
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x1400cc640]
mov cl, byte [rax + rcx]
mov rdx, rbp
shr rdx, cl
and edx, 7
lea rcx, [0x1400cc690]
mov rcx, qword [rcx + rax*8]
and rcx, rbp
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1400cc898]
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 0x14008d9d7
mov r14d, dword [0x1400f0298]
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 0x14008d9cc
cmp r14, 1
jbe 0x14008da39
inc qword [r14 + 0x298]
cmp r13w, 0x29
jae 0x14008da5f
mov r12, r13
shl r12, 4
mov r15, r14
add r15, r12
cmp qword [r14 + r12], 0
je 0x14008db0c
inc qword [r14 + 0x2a0]
mov rbp, qword [r15]
mov rax, qword [rbp]
test rax, rax
je 0x14008d9b3
mov rcx, rax
not rcx
cmp qword [rbp + 8], rcx
jne 0x14008db36
bswap rax
dec byte [r14 + r12 + 8]
mov qword [r15], rax
test rbp, rbp
jne 0x14008d87b
jmp 0x14008da6d
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14008d95c
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 0x14008dace
jmp 0x14008db4a
pause
dec eax
jne 0x14008da15
add r14d, ebp
add ebp, ebp
cmp ebp, 0x40
mov eax, 0x40
cmovge ebp, eax
cmp r14d, 0x3e8
jl 0x14008da02
jmp 0x14008dac6
je 0x14008da6d
mov rbp, qword [rsp + 0x30]
mov byte [rbp + 2], 0
mov rcx, rbp
call fcn.140054960
mov r14, rax
mov byte [rbp + 2], 1
inc qword [rax + 0x298]
jmp 0x14008d96d
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 0x14008dace
jmp 0x14008db3b
pause
dec eax
jne 0x14008daa7
add r14d, ebp
add ebp, ebp
cmp ebp, 0x40
mov eax, 0x40
cmovge ebp, eax
cmp r14d, 0x3e8
jl 0x14008da98
mov rcx, r15
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r13]
mov rbp, qword [rax]
test rbp, rbp
je 0x14008db59
mov byte [rsp + 0x4f], 0
mov rcx, qword [rbp]
test rcx, rcx
je 0x14008daf4
mov rdx, rcx
not rdx
cmp qword [rbp + 8], rdx
jne 0x14008db36
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14008d87b
inc qword [r14 + 0x2b0]
inc qword [r14 + 0x2a8]
mov rcx, r14
mov rdx, r13
call fcn.140054be0
mov rbp, qword [r15]
test rbp, rbp
jne 0x14008d99a
jmp 0x14008da6d
call 0x140089960
mov eax, ebp
test ebp, ebp
jg 0x14008daa7
jmp 0x14008dab0
mov eax, ebp
test ebp, ebp
jg 0x14008da15
jmp 0x14008da1e
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.14003bd50
mov rbp, rax
jmp 0x14008dafe