Function at 0x140135510
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, 0x78
mov rdi, rdx
mov r12, rcx
mov rax, qword [0x140213038]
xor rax, rsp
mov qword [rsp + 0x70], rax
movabs r14, 0xaaaaaaaaaaaaaaa
mov rax, qword [rcx]
mov r15, qword [rcx + 8]
sub r15, rax
sar r15, 3
movabs rdx, 0xaaaaaaaaaaaaaaab
imul r15, rdx
lea rcx, [r15 + 1]
cmp rcx, r14
ja 0x140135bc2
mov rbp, qword [r12 + 0x10]
sub rbp, rax
sar rbp, 3
imul rbp, rdx
mov rax, rbp
add rax, rbp
cmp rax, rcx
cmovb rax, rcx
movabs rcx, 0x555555555555555
cmp rbp, rcx
cmovb r14, rax
test r14, r14
jne 0x140135621
xor ebx, ebx
lea rax, [r15 + r15*2]
lea rbp, [rbx + rax*8]
lea rcx, [r14 + r14*2]
lea rsi, [rbx + rcx*8]
mov rcx, qword [rdi + 0x10]
mov qword [rbp + 0x10], rcx
movups xmm0, xmmword [rdi]
movups xmmword [rbp], xmm0
lea rbx, [rbx + rax*8]
add rbx, 0x18
mov rdi, qword [r12]
mov r8, qword [r12 + 8]
sub r8, rdi
sub rbp, r8
test r8, r8
jle 0x1401355eb
mov rcx, rbp
mov rdx, rdi
call fcn.140103960
mov rdi, qword [r12]
mov qword [r12], rbp
mov qword [r12 + 8], rbx
mov qword [r12 + 0x10], rsi
test rdi, rdi
jne 0x140135744
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1401013e0
nop
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.140132790
mov qword [rsp + 0x48], rax
mov r13, rax
lea rax, [r14*8]
lea rsi, [rax + rax*2]
mov eax, 0x40
mov ecx, 0x40
test rsi, rsi
je 0x140135651
bsr rcx, rsi
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x1401dc230]
mov cl, byte [rax + rcx]
mov rdx, rsi
shr rdx, cl
and edx, 7
lea rcx, [0x1401dc280]
mov rcx, qword [rcx + rax*8]
and rcx, rsi
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1401dc488]
movzx eax, word [rcx + rax*2 + 0x400]
mov qword [rsp + 0x28], rax
mov byte [rsp + 0x60], 0
cmp byte [r13 + 2], 0
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], r13
je 0x140135876
mov ebp, dword [0x140221510]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbp, rax
test ebx, ebx
jne 0x14013585c
cmp rbp, 1
mov rdx, qword [rsp + 0x28]
jbe 0x140135969
inc qword [rbp + 0x298]
cmp dx, 0x29
jae 0x1401359fe
mov r13, rdx
shl r13, 4
mov rsi, rbp
add rsi, r13
cmp qword [rbp + r13], 0
je 0x140135aa4
inc qword [rbp + 0x2a0]
mov rbx, qword [rsi]
mov rax, qword [rbx]
test rax, rax
je 0x14013572b
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x140135bae
bswap rax
dec byte [rbp + r13 + 8]
mov qword [rsi], rax
test rbx, rbx
jne 0x1401355a1
jmp 0x140135a0c
call fcn.140132790
mov rax, rdi
and rax, 0xffffffffffe00000
mov rcx, rdi
shr rcx, 9
and ecx, 0xfe0
lea r15, [rax + rcx]
add r15, 0x1000
movzx ecx, word [r15 + 0x1e]
mov r13, rcx
neg r13
shl rcx, 5
mov r12, r15
sub r12, rcx
mov rcx, r12
and rcx, 0xfffffffffffff000
mov r14, qword [rcx]
cmp byte [r14], 2
je 0x1401358cf
cmp byte [r14 + 2], 0
je 0x140135adc
mov rax, r13
shl rax, 5
mov rbx, qword [r15 + rax + 0x10]
cmp byte [rbx + 0x1c], 0
je 0x140135adc
mov esi, dword [0x140221510]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test ebp, ebp
jne 0x140135869
cmp rsi, 2
jb 0x140135adc
sub rbx, r14
add rbx, 0xfffffffffffffff0
sar rbx, 3
movabs rax, 0xcccccccccccccccd
imul rax, rbx
inc qword [rsi + 0x2c0]
cmp rax, 0x28
ja 0x140135ad5
shl rax, 4
mov rcx, qword [rsi + rax]
bswap rcx
mov qword [rdi], rcx
not rcx
mov qword [rdi + 8], rcx
mov qword [rsi + rax], rdi
inc byte [rsi + rax + 8]
inc qword [rsi + 0x2c8]
movzx r8d, byte [rsi + rax + 9]
cmp byte [rsi + rax + 8], r8b
jae 0x140135b98
mov al, byte [rsi + 0x290]
test al, 1
je 0x140135602
mov rcx, rsi
call fcn.1400f71e0
jmp 0x140135602
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1401356d0
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1401357d8
mov rax, qword [rsp + 0x28]
lea rax, [rax + rax*4]
mov rsi, qword [rsp + 0x48]
lea r13, [rsi + rax*8]
add r13, 0x10
add rsi, 8
mov ebx, 1
xor ebp, ebp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x140135a5f
jmp 0x140135bd9
pause
dec eax
jne 0x1401358ad
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x140135897
jmp 0x140135a57
mov rcx, r13
shl rcx, 5
mov rdx, qword [r15 + rcx + 0x10]
cmp byte [rdx + 0x1c], 0
je 0x140135796
lea rdx, [r15 + rcx]
add rdx, 0x10
mov rbp, qword [0x140214000]
and ebp, 1
shl rbp, 0xe
add rbp, rax
mov rcx, rdi
shr rcx, 4
shr rdi, 7
and edi, 0x3ff8
mov eax, 1
shl rax, cl
lock or qword [rdi + rbp + 0x4000], rax
mov rax, qword [rdx]
mov eax, dword [rax + 0x18]
mov rcx, rax
lock xadd qword [0x140213ff0], rcx
add rcx, rax
mov rax, qword [0x140213ff8]
cmp rcx, rax
jbe 0x140135602
mov al, byte [0x140214010]
test al, 1
jne 0x140135602
lea rcx, [0x140213f60]
mov edx, 1
call fcn.140131300
jmp 0x140135602
je 0x140135a0c
mov rsi, qword [rsp + 0x38]
mov byte [rsi + 2], 0
mov rcx, rsi
mov rbx, rdx
call fcn.1400f6c10
mov byte [rsi + 2], 1
mov qword [rsp + 0x30], rax
inc qword [rax + 0x298]
cmp bx, 0x29
jae 0x140135c21
mov rbp, qword [rsp + 0x28]
shl rbp, 4
mov rax, qword [rsp + 0x30]
mov r13, rax
add r13, rbp
cmp qword [rax + rbp], 0
je 0x140135c3e
mov rax, qword [rsp + 0x30]
inc qword [rax + 0x2a0]
mov rbx, qword [r13]
mov rax, qword [rbx]
test rax, rax
je 0x1401359e4
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x140135bae
bswap rax
mov rcx, qword [rsp + 0x30]
dec byte [rcx + rbp + 8]
mov qword [r13], rax
mov rdx, qword [rsp + 0x28]
jmp 0x140135736
inc qword [rbp + 0x2b8]
inc qword [rbp + reloc.SHELL32.dll_IsUserAnAdmin]
lea rax, [rdx + rdx*4]
mov rsi, qword [rsp + 0x48]
lea r13, [rsi + rax*8]
add r13, 0x10
add rsi, 8
mov ebx, 1
xor ebp, ebp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x140135a5f
jmp 0x140135bca
pause
dec eax
jne 0x140135a3a
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x140135a28
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r13]
mov rbx, qword [rax]
test rbx, rbx
je 0x140135bfa
mov byte [rsp + 0x60], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x140135a8c
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x140135bae
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x1401355a1
inc qword [rbp + 0x2b0]
inc qword [rbp + reloc.SHELL32.dll_IsUserAnAdmin]
mov rcx, rbp
mov rdx, qword [rsp + 0x28]
call fcn.1400f6e90
mov rdx, qword [rsp + 0x28]
mov rbx, qword [rsi]
test rbx, rbx
jne 0x140135713
jmp 0x140135a0c
inc qword [rsi + 0x2d0]
add r14, 8
xorps xmm0, xmm0
movaps xmmword [rsp + 0x60], xmm0
mov esi, 1
xor ebp, ebp
mov rbx, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r14
call rbx
test al, al
jne 0x140135b29
jmp 0x140135bb3
pause
dec eax
jne 0x140135b04
add ebp, esi
add esi, esi
cmp esi, 0x40
mov eax, 0x40
cmovge esi, eax
cmp ebp, 0x3e8
jl 0x140135af6
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r12]
cmp rax, rdi
je 0x140135c73
bswap rax
mov qword [rdi], rax
not rax
mov qword [rdi + 8], rax
mov qword [r12], rdi
shl r13, 5
movzx eax, word [r15 + r13 + 0x18]
dec eax
mov word [r15 + r13 + 0x18], ax
test ax, ax
jle 0x140135be8
xorps xmm0, xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x60], xmm0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp qword [rsp + 0x60], 0
je 0x140135602
lea rcx, [rsp + 0x60]
call fcn.140098180
jmp 0x140135602
mov rdx, rsi
add rdx, rax
shr r8, 1
mov rcx, rsi
call fcn.1400f7020
jmp 0x140135841
call 0x140131100
mov eax, esi
test esi, esi
jg 0x140135b04
jmp 0x140135b0c
mov rcx, r12
call fcn.140131070
mov eax, ebx
test ebx, ebx
jg 0x140135a3a
jmp 0x140135a42
mov eax, ebx
test ebx, ebx
jg 0x1401358ad
jmp 0x1401358b5
lea rdx, [rsp + 0x50]
mov rcx, r12
call fcn.1400f7260
jmp 0x140135b6a
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rcx, r13
mov rdx, qword [rsp + 0x38]
xor r8d, r8d
mov r9, qword [rsp + 0x40]
call fcn.1400cea80
mov rbx, rax
jmp 0x140135a96
mov rax, qword [rsp + 0x30]
inc qword [rax + 0x2b8]
inc qword [rax + reloc.SHELL32.dll_IsUserAnAdmin]
mov rdx, qword [rsp + 0x28]
jmp 0x140135a0c
mov rcx, qword [rsp + 0x30]
inc qword [rcx + 0x2b0]
inc qword [rcx + reloc.SHELL32.dll_IsUserAnAdmin]
mov rsi, qword [rsp + 0x28]
mov rdx, rsi
call fcn.1400f6e90
mov rdx, rsi
mov rbx, qword [r13]
test rbx, rbx
jne 0x1401359cc
jmp 0x140135a0c
int3