Function at 0x140042ac0
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x28
mov r15, rcx
lea rax, fcn.140125d80
mov qword [rcx], rax
lea rax, [0x1401cd110]
mov qword [rcx + 8], rax
mov eax, dword [0x1402003f8]
mov ecx, dword [0x1401f8a8c]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140042cb5
lea rdi, [r15 + 8]
mov ecx, dword [0x1401f6f88]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140042cf8
movsxd rcx, dword [0x1402003f0]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x1402003f4]
jne 0x140042cf8
mov rcx, qword [rax + rcx]
mov rdx, r15
call fcn.140021030
call fcn.14001aea0
mov rcx, rax
mov rdx, rdi
xor r8d, r8d
call fcn.140028890
mov r14, qword [r15 + 0x10]
add r14, 8
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140042ca8
mov rcx, r15
call fcn.14014a090
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r9, qword [r15 + 0x10]
mov r10, qword [r9 + 0x310]
test r10, r10
je 0x140042d6d
mov r8d, eax
movsxd rdi, eax
mov rax, r10
shr rax, 1
movabs rcx, 0x5555555555555555
and rcx, rax
mov rax, r10
sub rax, rcx
movabs rcx, 0x3333333333333333
mov rdx, rax
and rdx, rcx
shr rax, 2
and rax, rcx
add rax, rdx
mov rcx, rax
shr rcx, 4
add rcx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rcx
movabs rsi, 0x101010101010101
imul rsi, rax
shr rsi, 0x38
cmp rsi, 1
ja 0x140042c7e
lea rcx, [r10 - 1]
and rcx, rdi
mov r12, qword [r9 + 0x308]
mov rax, qword [r12 + rcx*8]
test rax, rax
je 0x140042d6d
mov rbx, qword [rax]
test rbx, rbx
je 0x140042d6d
lea r11, [r10 - 1]
mov rax, qword [rbx + 8]
cmp rax, rdi
jne 0x140042c3d
cmp dword [rbx + 0x10], r8d
je 0x140042c6a
jmp 0x140042c5d
cmp esi, 1
ja 0x140042c47
and rax, r11
jmp 0x140042c54
cmp rax, r10
jb 0x140042c54
xor edx, edx
div r10
mov rax, rdx
cmp rax, rcx
jne 0x140042d6d
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140042c2c
jmp 0x140042d6d
cmp esi, 1
ja 0x140042c96
and rdi, r11
mov r8, qword [r12 + rdi*8]
mov rax, qword [r8]
jmp 0x140042d05
mov rcx, rdi
cmp r10, rdi
ja 0x140042c08
mov rax, rdi
xor edx, edx
div r10
mov rcx, rdx
jmp 0x140042c08
cmp r10, rdi
ja 0x140042c72
mov rax, rdi
xor edx, edx
div r10
mov rdi, rdx
jmp 0x140042c72
mov rcx, r14
call fcn.1400b0d10
jmp 0x140042b77
lea rcx, [0x1402003f8]
call fcn.1400f0548
cmp dword [0x1402003f8], 0xffffffff
jne 0x140042b0a
mov qword [0x1402003f0], 0
lea rcx, [0x1402003f0]
xor edx, edx
call fcn.14000d6e0
lea rcx, [0x1402003f8]
call fcn.1400f07ac
jmp 0x140042b0a
xor ecx, ecx
jmp 0x140042b43
mov r8, rax
mov rax, qword [rax]
cmp rax, rbx
jne 0x140042cff
lea rax, [r9 + 0x318]
cmp r8, rax
jne 0x140042e51
mov rax, qword [rbx]
test rax, rax
jne 0x140042e19
mov qword [r12 + rdi*8], 0
mov rcx, qword [rbx]
test rcx, rcx
jne 0x140042df1
xor ecx, ecx
mov qword [r8], rcx
mov qword [rbx], 0
dec qword [r9 + 0x320]
test rbx, rbx
je 0x140042d6d
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140042d65
lock dec dword [rcx + 8]
je 0x140042e75
mov rcx, rbx
call fcn.1400f0498
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rsi, qword [r15 + 0x10]
mov ecx, dword [0x1401f6f88]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140042db4
movsxd rcx, dword [rsi + 0x2f0]
shl rcx, 4
mov qword [rax + rcx], 0
mov ecx, dword [rsi + 0x2f4]
movsxd rdx, dword [rsi + 0x2f0]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
mov rdi, qword [r15 + 0x18]
mov qword [r15 + 0x18], 0
test rdi, rdi
je 0x140042de2
mov rcx, rdi
call fcn.140149420
mov rcx, rdi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
jmp fcn.1400f0498
nop
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov rax, qword [rcx + 8]
cmp esi, 1
ja 0x140042e33
and rax, r11
cmp rax, rdi
je 0x140042d3c
mov rcx, qword [r9 + 0x308]
mov qword [rcx + rax*8], r8
mov rcx, qword [rbx]
jmp 0x140042d3c
mov rax, qword [rax + 8]
cmp esi, 1
ja 0x140042e42
and rax, r11
cmp rax, rdi
je 0x140042d2e
jmp 0x140042d26
cmp rax, r10
jb 0x140042dfd
xor edx, edx
div r10
mov rax, rdx
jmp 0x140042dfd
cmp rax, r10
jb 0x140042e25
xor edx, edx
div r10
mov rax, rdx
jmp 0x140042e25
mov rax, qword [r8 + 8]
cmp esi, 1
jbe 0x140042e87
cmp rax, r10
jb 0x140042e67
xor edx, edx
div r10
mov rax, rdx
cmp rax, rdi
jne 0x140042d1a
jmp 0x140042d2e
add rcx, 8
add rcx, 0xfffffffffffffff8
call fcn.1400e2480
jmp 0x140042d65
and rax, r11
jmp 0x140042e67