Function at 0x1401313e0
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 [0x140213038]
xor rax, rsp
mov qword [rsp + 0x30], rax
call fcn.140132790
mov r14, rax
mov r15, rax
mov eax, 0x40
mov ecx, 0x40
test r12, r12
je 0x140131424
bsr rcx, r12
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x1401dc230]
mov cl, byte [rax + rcx]
mov rdx, r12
shr rdx, cl
and edx, 7
lea rcx, [0x1401dc280]
mov rcx, qword [rcx + rax*8]
and rcx, r12
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1401dc488]
movzx r13d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2f], 0
cmp byte [r15 + 2], 0
je 0x14013152e
mov edi, dword [0x140221510]
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 0x140131521
cmp rdi, 1
jbe 0x140131588
inc qword [rdi + 0x298]
cmp r13w, 0x29
jae 0x1401315ab
mov rsi, r13
shl rsi, 4
mov rbp, rdi
add rbp, rsi
cmp qword [rdi + rsi], 0
je 0x14013164e
inc qword [rdi + 0x2a0]
mov rbx, qword [rbp]
mov rax, qword [rbx]
test rax, rax
je 0x1401314ec
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x140131679
bswap rax
dec byte [rdi + rsi + 8]
mov qword [rbp], rax
test rbx, rbx
je 0x1401315b9
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1401013e0
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 0x140131495
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 0x140131612
jmp 0x14013168d
pause
dec eax
jne 0x14013156b
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, ebp
cmp ebx, 0x3e8
jl 0x140131558
jmp 0x14013160a
je 0x1401315b9
mov byte [r15 + 2], 0
mov rcx, r15
call fcn.1400f6c10
mov rdi, rax
mov byte [r15 + 2], 1
inc qword [rax + 0x298]
jmp 0x1401314a6
inc qword [rdi + 0x2b8]
inc qword [rdi + reloc.SHELL32.dll_IsUserAnAdmin]
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 0x140131612
jmp 0x14013167e
pause
dec eax
jne 0x1401315f2
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, ebp
cmp ebx, 0x3e8
jl 0x1401315e3
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rbx, qword [rax]
test rbx, rbx
je 0x14013169c
mov byte [rsp + 0x2f], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x140131636
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x140131679
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x140131500
inc qword [rdi + 0x2b0]
inc qword [rdi + reloc.SHELL32.dll_IsUserAnAdmin]
mov rcx, rdi
mov rdx, r13
call fcn.1400f6e90
mov rbx, qword [rbp]
test rbx, rbx
jne 0x1401314d4
jmp 0x1401315b9
call 0x140131100
mov eax, edi
test edi, edi
jg 0x1401315f2
jmp 0x1401315fa
mov eax, edi
test edi, edi
jg 0x14013156b
jmp 0x140131573
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r15
xor r8d, r8d
mov r9, r12
call fcn.1400cea80
mov rbx, rax
jmp 0x140131640