Function at 0x14002ea80
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x30
mov rsi, rcx
mov rax, qword [0x14012c028]
xor rax, rsp
mov qword [rsp + 0x28], rax
lea rax, [0x140113640]
mov qword [rcx], rax
lea rdi, [rcx + 8]
lea rax, [0x140113fe8]
mov qword [rcx + 8], rax
lea rbx, [rsp + 0x20]
mov rcx, rbx
call fcn.140081300
mov rbx, qword [rbx]
lea rcx, [rbx + 0x468]
mov rdx, rsi
call fcn.1400157c0
mov rax, qword [0x14012dfa0]
and rax, rbx
cmp rax, qword [0x14012df88]
je 0x14002ed63
call fcn.14000cbc0
mov rcx, rax
mov rdx, rdi
xor r8d, r8d
call fcn.140086c20
mov rdi, qword [rsi + 0x10]
add rdi, 8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14002edda
mov rax, qword [rsi + 0x18]
test rax, rax
jne 0x14002ede7
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r9, qword [rsi + 0x10]
mov r10, qword [r9 + 0x348]
test r10, r10
je 0x14002ec6b
mov ecx, eax
mov rax, r10
shr rax, 1
movabs rdx, 0x5555555555555555
and rdx, rax
mov rax, r10
sub rax, rdx
movabs rdx, 0x3333333333333333
mov r8, rax
and r8, rdx
shr rax, 2
and rax, rdx
add rax, r8
mov rdx, rax
shr rdx, 4
add rdx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rdx
movabs r11, 0x101010101010101
imul r11, rax
shr r11, 0x38
cmp r11, 1
ja 0x14002ed08
lea eax, [r10 - 1]
mov r8d, ecx
and r8d, eax
mov r15, qword [r9 + 0x340]
mov rax, qword [r15 + r8*8]
test rax, rax
je 0x14002ec6b
mov rbx, qword [rax]
test rbx, rbx
je 0x14002ec6b
lea r14, [r10 - 1]
mov rax, qword [rbx + 8]
cmp rax, rcx
jne 0x14002ee24
cmp dword [rbx + 0x10], ecx
jne 0x14002ee36
mov r12, qword [rbx]
cmp r11d, 1
ja 0x14002ed24
and ecx, r14d
mov rax, qword [r15 + rcx*8]
mov r13, rax
mov rax, qword [rax]
cmp rax, rbx
jne 0x14002ec03
lea rax, [r9 + 0x350]
cmp r13, rax
jne 0x14002edb1
test r12, r12
jne 0x14002ed3d
mov qword [r15 + rcx*8], 0
mov r12, qword [rbx]
test r12, r12
jne 0x14002ed70
xor r12d, r12d
mov qword [r13], r12
mov qword [rbx], 0
dec qword [r9 + 0x358]
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x14002ec63
lock dec dword [rcx + 8]
je 0x14002ee47
mov rcx, rbx
call fcn.140096334
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rdi, qword [rsi + 0x10]
mov ecx, dword [0x14013b660]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x14002ecb2
mov rcx, qword [rdi + 0x310]
shl rcx, 4
mov qword [rax + rcx], 0
mov ecx, dword [rdi + 0x318]
mov rdx, qword [rdi + 0x310]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
mov rdi, qword [rsi + 0x18]
mov qword [rsi + 0x18], 0
test rdi, rdi
jne 0x14002ee51
mov rcx, qword [rsi + 0x10]
mov rax, qword [0x14012dfa0]
and rax, rcx
cmp rax, qword [0x14012df88]
je 0x14002ee66
mov qword [rsi + 0x10], 0
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400985e0
nop
add rsp, 0x30
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r8, rcx
cmp r10, rcx
ja 0x14002ebb5
mov rax, rcx
xor edx, edx
div r10
mov r8, rdx
jmp 0x14002ebb5
cmp r10, rcx
ja 0x14002ebff
mov rax, rcx
xor edx, edx
div r10
mov rcx, rdx
jmp 0x14002ebff
mov r8, qword [r12 + 8]
mov rdx, r8
cmp r11d, 1
jbe 0x14002eda7
cmp r8, r10
jb 0x14002ed58
mov rax, r8
xor edx, edx
div r10
cmp rdx, rcx
jne 0x14002ec27
jmp 0x14002ed75
mov rcx, rbx
call fcn.14006a8b0
jmp 0x14002eaf0
mov r8, qword [r12 + 8]
cmp r11d, 1
jbe 0x14002edac
cmp r8, r10
jb 0x14002ed8b
mov rax, r8
xor edx, edx
div r10
mov r8, rdx
cmp r8, rcx
je 0x14002ec3e
mov rax, qword [r9 + 0x340]
mov qword [rax + r8*8], r13
mov r12, qword [rbx]
jmp 0x14002ec3e
and rdx, r14
jmp 0x14002ed58
and r8, r14
jmp 0x14002ed8b
mov rax, qword [r13 + 8]
cmp r11d, 1
jbe 0x14002ee7f
cmp rax, r10
jb 0x14002edcc
xor edx, edx
div r10
mov rax, rdx
cmp rax, rcx
jne 0x14002ec1e
jmp 0x14002ec32
mov rcx, rdi
call fcn.140062160
jmp 0x14002eb1c
mov rcx, qword [rsi + 0x10]
mov edx, dword [rcx + 0x39c]
cmp edx, dword [rsi + 0x28]
jne 0x14002eb29
mov rcx, qword [rcx + 0x20]
mov qword [rsi + 0x18], 0
lea r8, [rsp + 0x20]
mov qword [r8], rax
mov rdx, qword [rsi + 0x20]
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140150008]
jmp 0x14002eb29
cmp r11d, 1
ja 0x14002ee70
and rax, r14
cmp rax, r8
jne 0x14002ec6b
mov rbx, qword [rbx]
test rbx, rbx
jne 0x14002ebd9
jmp 0x14002ec6b
call fcn.140075c60
jmp 0x14002ec63
mov rcx, rdi
call fcn.1400edc50
mov rcx, rdi
call fcn.140096334
jmp 0x14002ecc7
call fcn.14006a8b0
jmp 0x14002ece2
cmp rax, r10
jb 0x14002ee2d
xor edx, edx
div r10
mov rax, rdx
jmp 0x14002ee2d
and rax, r14
jmp 0x14002edcc