Function at 0x140060110
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 [0x14029a038]
xor rax, rsp
mov qword [rsp + 0x28], rax
lea rax, [0x14026d080]
mov qword [rcx], rax
lea rax, [0x14026e0f0]
mov qword [rcx + 8], rax
mov eax, dword [0x1402a44f8]
mov ecx, dword [0x14029dfe4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400604c2
lea rdi, [rsi + 8]
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140060510
mov rcx, qword [0x1402a44e8]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x1402a44f0]
jne 0x140060510
mov rcx, qword [rax + rcx]
mov rdx, rsi
call fcn.140032610
call fcn.140003150
mov rcx, rax
mov rdx, rdi
xor r8d, r8d
call fcn.140152500
mov rdi, qword [rsi + 0x10]
add rdi, 8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1400604b5
mov rax, qword [rsi + 0x18]
test rax, rax
je 0x140060215
mov rcx, qword [rsi + 0x10]
mov edx, dword [rcx + 0x39c]
cmp edx, dword [rsi + 0x28]
jne 0x140060215
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 [case.0x1401e7f70.0]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r9, qword [rsi + 0x10]
mov r10, qword [r9 + 0x348]
test r10, r10
je 0x14006039f
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 0x14006029f
lea eax, [r10 - 1]
mov r8d, ecx
and r8d, eax
jmp 0x1400602b2
mov r8, rcx
cmp r10, rcx
ja 0x1400602b2
mov rax, rcx
xor edx, edx
div r10
mov r8, rdx
mov r15, qword [r9 + 0x340]
mov rax, qword [r15 + r8*8]
test rax, rax
je 0x14006039f
mov rbx, qword [rax]
test rbx, rbx
je 0x14006039f
lea r14, [r10 - 1]
mov rax, qword [rbx + 8]
cmp rax, rcx
jne 0x1400602e6
cmp dword [rbx + 0x10], ecx
je 0x140060314
jmp 0x140060307
cmp r11d, 1
ja 0x1400602f1
and rax, r14
jmp 0x1400602fe
cmp rax, r10
jb 0x1400602fe
xor edx, edx
div r10
mov rax, rdx
cmp rax, r8
jne 0x14006039f
mov rbx, qword [rbx]
test rbx, rbx
jne 0x1400602d6
jmp 0x14006039f
mov r12, qword [rbx]
cmp r11d, 1
ja 0x140060322
and ecx, r14d
jmp 0x140060332
cmp r10, rcx
ja 0x140060332
mov rax, rcx
xor edx, edx
div r10
mov rcx, rdx
mov rax, qword [r15 + rcx*8]
mov r13, rax
mov rax, qword [rax]
cmp rax, rbx
jne 0x140060336
lea rax, [r9 + 0x350]
cmp r13, rax
jne 0x14006048c
test r12, r12
jne 0x140060425
mov qword [r15 + rcx*8], 0
mov r12, qword [rbx]
test r12, r12
jne 0x140060442
xor r12d, r12d
mov qword [r13], r12
mov qword [rbx], 0
dec qword [r9 + 0x358]
mov r14, qword [rbx + 0x18]
test r14, r14
je 0x140060397
lock dec dword [r14 + 8]
je 0x140060517
mov rcx, rbx
call fcn.14017b254
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rdi, qword [rsi + 0x10]
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1400603e6
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
je 0x140060407
mov rcx, rdi
call fcn.1401f9890
mov rcx, rdi
call fcn.14017b254
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14017e7b0
nop
add rsp, 0x30
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r8, qword [r12 + 8]
mov rdx, r8
cmp r11d, 1
jbe 0x140060449
cmp r8, r10
jb 0x14006044c
mov rax, r8
xor edx, edx
div r10
jmp 0x14006044c
mov r8, qword [r12 + 8]
jmp 0x140060455
and rdx, r14
cmp rdx, rcx
jne 0x14006035a
cmp r11d, 1
jbe 0x14006046d
cmp r8, r10
jb 0x140060470
mov rax, r8
xor edx, edx
div r10
mov r8, rdx
jmp 0x140060470
and r8, r14
cmp r8, rcx
je 0x140060371
mov rax, qword [r9 + 0x340]
mov qword [rax + r8*8], r13
mov r12, qword [rbx]
jmp 0x140060371
mov rax, qword [r13 + 8]
cmp r11d, 1
jbe 0x140060574
cmp rax, r10
jb 0x1400604a7
xor edx, edx
div r10
mov rax, rdx
cmp rax, rcx
jne 0x140060351
jmp 0x140060365
mov rcx, rdi
call fcn.1400fdfc0
jmp 0x1400601d8
lea rcx, [0x1402a44f8]
call fcn.14017b2bc
cmp dword [0x1402a44f8], 0xffffffff
jne 0x14006016b
mov qword [0x1402a44f0], 0
lea rcx, [0x1402a44e8]
mov qword [0x1402a44e8], 0xffffffffffffffff
xor edx, edx
call fcn.140002850
lea rcx, [0x1402a44f8]
call fcn.14017b25c
jmp 0x14006016b
xor ecx, ecx
jmp 0x1400601a4
mov rcx, qword [r14]
mov rax, qword [rcx + 8]
lea rdx, [0x1401e6bb0]
cmp qword [rcx + 0x10], rdx
jne 0x14006057c
lea rcx, [0x140203760]
cmp rax, rcx
jne 0x14006057c
mov rcx, qword [r14 + 0x18]
test rcx, rcx
je 0x140060545
lock dec dword [rcx]
je 0x14006058f
mov r15, qword [r14 + 0x10]
test r15, r15
je 0x140060554
lock dec dword [r15]
je 0x140060561
mov rcx, r14
call fcn.14017b254
jmp 0x140060397
lea rcx, [r15 + 8]
call fcn.1400091b0
mov rcx, r15
call fcn.14017b254
jmp 0x140060554
and rax, r14
jmp 0x1400604a7
mov rcx, r14
mov edx, 1
call qword [case.0x1401e7f70.0]
jmp 0x140060397
call fcn.14017b254
jmp 0x140060545