Function at 0x1400eec00
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 r15, rdx
mov rdi, rcx
mov rax, qword [0x140213038]
xor rax, rsp
mov qword [rsp + 0x30], rax
cmp rcx, 0x10
ja 0x1400eee3a
lea rax, [rdi - 1]
test rdi, rax
sete al
test rdi, rdi
setne cl
test cl, al
je 0x1400ef0dc
mov r14, qword [0x14021dc18]
test r14, r14
je 0x1400ef0df
mov eax, 0x40
mov ecx, 0x40
test r15, r15
je 0x1400eec6e
bsr rcx, r15
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x1401f0db0]
mov cl, byte [rax + rcx]
mov rdx, r15
shr rdx, cl
and edx, 7
lea rcx, [0x1401f0e00]
mov rcx, qword [rcx + rax*8]
and rcx, r15
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1401f0590]
movzx r13d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2f], 0
cmp byte [r14 + 2], 0
je 0x1400ef16b
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 0x1400ef068
cmp rdi, 1
jbe 0x1400ef1c7
add qword [rdi + 0x298], 1
cmp r13w, 0x29
jb 0x1400eedc7
add qword [rdi + 0x2b8], 1
add qword [rdi + reloc.SHELL32.dll_IsUserAnAdmin], 1
lea rax, [r13*4]
add rax, r13
lea rdi, [r14 + rax*8]
add rdi, 0x10
lea rsi, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r13d, 0x40
mov rcx, rsi
call r12
test al, al
jne 0x1400eed67
jmp 0x1400eefb9
pause
dec eax
jne 0x1400eed46
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
cmovge ebx, r13d
cmp ebp, 0x3e8
jl 0x1400eed37
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rdi]
mov rbx, qword [rax]
test rbx, rbx
je 0x1400eee17
mov byte [rsp + 0x2f], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400eed93
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x1400ef362
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
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 rsi, r13
shl rsi, 4
mov rbp, rdi
add rbp, rsi
cmp qword [rdi + rsi], 0
je 0x1400eef8e
inc qword [rdi + 0x2a0]
mov rbx, qword [rbp]
mov rax, qword [rbx]
test rax, rax
je 0x1400eee02
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x1400ef362
bswap rax
dec byte [rdi + rsi + 8]
mov qword [rbp], rax
test rbx, rbx
jne 0x1400eeda6
jmp 0x1400eed0c
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, r14
xor r8d, r8d
mov r9, r15
call fcn.1400cea80
mov rbx, rax
jmp 0x1400eed9d
mov r14, qword [0x14021dc18]
test r14, r14
je 0x1400ef23f
lea r12, [rdi - 1]
test rdi, r12
sete al
test rdi, rdi
setne cl
test cl, al
je 0x1400ef2cb
cmp r15, rdi
jae 0x1400eef68
cmp rdi, r15
jb 0x1400ef2ce
bsr rax, rdi
xor rax, 0xffffffffffffffc0
lea rcx, [0x1401f0db0]
mov cl, byte [rax + rcx + 0x41]
mov rdx, rdi
shr rdx, cl
and edx, 7
lea rcx, [0x1401f0e00]
mov rcx, qword [rcx + rax*8 + 0x208]
and rcx, rdi
lea rax, [rdx + rax*8]
add rax, 0x208
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1401f0590]
movzx r15d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2e], 0
cmp byte [r14 + 2], 0
je 0x1400ef2d6
mov esi, dword [0x140221510]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test ebx, ebx
jne 0x1400ef095
cmp rsi, 1
jbe 0x1400ef367
inc qword [rsi + 0x298]
cmp r15w, 0x29
jae 0x1400eefc8
mov rbp, r15
shl rbp, 4
mov r13, rsi
add r13, rbp
cmp qword [rsi + rbp], 0
je 0x1400ef0a2
inc qword [rsi + 0x2a0]
mov rbx, qword [r13]
mov rax, qword [rbx]
test rax, rax
je 0x1400eef4c
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x1400ef362
bswap rax
dec byte [rsi + rbp + 8]
mov qword [r13], rax
test rbx, rbx
je 0x1400eefd6
test r12, rbx
je 0x1400eeda6
int3
mov rax, r15
dec rax
je 0x1400eef87
bsr rcx, rax
xor rcx, 0x3f
neg cl
mov edi, 1
shl rdi, cl
jmp 0x1400eee6b
mov ecx, 0x40
jmp 0x1400eef78
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 0x1400eedea
jmp 0x1400eed0c
mov eax, ebx
test ebx, ebx
jg 0x1400eed46
jmp 0x1400eed4e
inc qword [rsi + 0x2b8]
inc qword [rsi + reloc.SHELL32.dll_IsUserAnAdmin]
lea rax, [r15 + r15*4]
lea rsi, [r14 + rax*8]
add rsi, 0x10
lea r15, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r15
call r13
test al, al
jne 0x1400ef028
jmp 0x1400ef0cd
pause
dec eax
jne 0x1400ef003
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x1400eeff4
mov rcx, r15
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rbx, qword [rax]
test rbx, rbx
je 0x1400ef075
mov byte [rsp + 0x2e], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400ef050
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x1400ef362
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x1400eef5c
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400eecdf
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r14
xor r8d, r8d
mov r9, rdi
call fcn.1400cea80
mov rbx, rax
jmp 0x1400ef05a
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400eeef5
inc qword [rsi + 0x2b0]
inc qword [rsi + reloc.SHELL32.dll_IsUserAnAdmin]
mov rcx, rsi
mov rdx, r15
call fcn.1400f6e90
mov rbx, qword [r13]
test rbx, rbx
jne 0x1400eef34
jmp 0x1400eefd6
mov eax, ebx
test ebx, ebx
jg 0x1400ef003
jmp 0x1400ef00b
int3
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x14021dc20], cl
jne 0x1400ef0e1
mov r14, qword [0x14021dc18]
test r14, r14
jne 0x1400ef15f
mov dword [0x14021dc28], 0x1000000
lea r14, [0x14021dc28]
mov byte [0x14021dc2e], 1
mov byte [0x14021f060], 0
mov qword [0x14021f138], 0
lea rcx, [0x14021dc30]
mov r8d, 0x1408
xor edx, edx
call fcn.140103d70
lea rcx, [0x14021f068]
mov r8d, 0xca
xor edx, edx
call fcn.140103d70
mov rcx, r14
mov edx, 0x1010100
call fcn.14001b280
mov qword [0x14021dc18], r14
mov byte [0x14021dc20], 0
jmp 0x1400eec57
lea rax, [r13*4]
add rax, r13
lea rdi, [r14 + rax*8]
add rdi, 0x10
lea rsi, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r12, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r13d, 0x40
mov rcx, rsi
call r12
test al, al
jne 0x1400eed67
jmp 0x1400ef38e
pause
dec eax
jne 0x1400ef1a9
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
cmovge ebx, r13d
cmp ebp, 0x3e8
jl 0x1400ef196
jmp 0x1400eed5f
je 0x1400eed0c
mov byte [r14 + 2], 0
mov rcx, r14
call fcn.1400f6c10
mov rdi, rax
mov byte [r14 + 2], 1
inc qword [rax + 0x298]
cmp r13w, 0x29
jae 0x1400ef3ac
mov rsi, r13
shl rsi, 4
mov r12, rdi
add r12, rsi
cmp qword [rdi + rsi], 0
je 0x1400ef3bf
inc qword [rdi + 0x2a0]
mov rbx, qword [r12]
mov rax, qword [rbx]
test rax, rax
je 0x1400ef22f
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x1400ef362
bswap rax
dec byte [rdi + rsi + 8]
mov qword [r12], rax
jmp 0x1400eee0d
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x14021dc20], cl
jne 0x1400ef241
mov r14, qword [0x14021dc18]
test r14, r14
jne 0x1400ef2bf
mov dword [0x14021dc28], 0x1000000
lea r14, [0x14021dc28]
mov byte [0x14021dc2e], 1
mov byte [0x14021f060], 0
mov qword [0x14021f138], 0
lea rcx, [0x14021dc30]
mov r8d, 0x1408
xor edx, edx
call fcn.140103d70
lea rcx, [0x14021f068]
mov r8d, 0xca
xor edx, edx
call fcn.140103d70
mov rcx, r14
mov edx, 0x1010100
call fcn.14001b280
mov qword [0x14021dc18], r14
mov byte [0x14021dc20], 0
jmp 0x1400eee4a
int3
mov rcx, r15
call fcn.14018df10
lea rax, [r15 + r15*4]
lea r15, [r14 + rax*8]
add r15, 0x10
lea rsi, [r14 + 8]
mov ebx, 1
xor ebp, ebp
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, rsi
call r13
test al, al
jne 0x1400ef328
jmp 0x1400ef39d
pause
dec eax
jne 0x1400ef303
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x1400ef2f4
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r15]
mov rbx, qword [rax]
test rbx, rbx
je 0x1400ef3ea
mov byte [rsp + 0x2e], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400ef350
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x1400ef362
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, rsi
jmp 0x1400ef05d
call 0x140131100
je 0x1400eefd6
mov byte [r14 + 2], 0
mov rcx, r14
call fcn.1400f6c10
mov rsi, rax
mov byte [r14 + 2], 1
inc qword [rax + 0x298]
jmp 0x1400eef06
mov eax, ebx
test ebx, ebx
jg 0x1400ef1a9
jmp 0x1400ef1b1
mov eax, ebx
test ebx, ebx
jg 0x1400ef303
jmp 0x1400ef30b
inc qword [rdi + 0x2b8]
inc qword [rdi + reloc.SHELL32.dll_IsUserAnAdmin]
jmp 0x1400eed0c
inc qword [rdi + 0x2b0]
inc qword [rdi + reloc.SHELL32.dll_IsUserAnAdmin]
mov rcx, rdi
mov rdx, r13
call fcn.1400f6e90
mov rbx, qword [r12]
test rbx, rbx
jne 0x1400ef217
jmp 0x1400eed0c
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x20], rax
mov rcx, r15
mov rdx, r14
xor r8d, r8d
mov r9, rdi
call fcn.1400cea80
mov rbx, rax
jmp 0x1400ef35a