Function at 0x14005cfd0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov rax, rsp
push rbp
push rbx
lea rbp, [rax - 0x5f]
sub rsp, 0xf8
mov rbx, qword [0x1403a9510]
mov qword [rax - 0x18], rsi
mov rsi, rdx
mov qword [rax - 0x20], rdi
mov qword [rax - 0x30], r14
mov r14, rcx
mov ecx, dword [rbx + 0x40]
mov qword [rax - 0x38], r15
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [rbx + 0x40]
lea rdx, [rax + 1]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rbx, [r14 + 0x18]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword gs:[0x58]
mov ecx, dword [0x1404415e8]
mov edx, 0x1c
mov rcx, qword [rax + rcx*8]
mov eax, dword [rdx + rcx]
cmp dword [0x1403a9578], eax
jg 0x14005d3b1
mov r15, qword [0x1403a9548]
xor edi, edi
test r15, r15
je 0x14005d0d4
mov r8, r15
mov qword [rsp + 0xe0], r12
lea rdx, [rbp + 0x67]
lea rcx, [r14 + 0xb0]
call fcn.14004c780
mov edx, dword [rbp + 0x67]
cmp edx, 0xffffffff
je 0x14005d086
lea rcx, [r14 + 0xb0]
call fcn.140059260
jmp 0x14005d0cc
mov r8, r15
lea rdx, [rbp + 0x77]
lea rcx, [r14 + 0x100]
call fcn.14004c780
movsxd rax, dword [rbp + 0x77]
cmp eax, 0xffffffff
je 0x14005d0b2
mov rcx, rax
shl rcx, 5
add rcx, qword [r14 + 0x100]
jmp 0x14005d0b5
mov rcx, rdi
test rcx, rcx
lea rax, [rcx + 8]
cmove rax, rdi
movups xmm0, xmmword [rax]
movups xmmword [0x14034d348], xmm0
nop
int3
mov r12, qword [rsp + 0xe0]
mov r8, rsi
lea rdx, [rbp + 0x7f]
lea rcx, [r14 + 0xb0]
call fcn.14004c780
mov edx, dword [rbp + 0x7f]
cmp edx, 0xffffffff
je 0x14005d0fd
lea rcx, [r14 + 0xb0]
call fcn.140059260
jmp 0x14005d145
mov r8, rsi
lea rdx, [rsp + 0x20]
lea rcx, [r14 + 0x100]
call fcn.14004c780
movsxd rax, dword [rsp + 0x20]
cmp eax, 0xffffffff
je 0x14005d12b
mov rcx, rax
shl rcx, 5
add rcx, qword [r14 + 0x100]
jmp 0x14005d12e
mov rcx, rdi
test rcx, rcx
lea rax, [rcx + 8]
cmove rax, rdi
movups xmm0, xmmword [rax]
movups xmmword [0x14034d348], xmm0
nop
int3
lea r15, [r14 + 0x100]
mov r8, rsi
mov rcx, r15
lea rdx, [rsp + 0x24]
call fcn.14004c780
movsxd rax, dword [rsp + 0x24]
cmp eax, 0xffffffff
je 0x14005d172
mov rcx, rax
shl rcx, 5
add rcx, qword [r15]
jmp 0x14005d175
mov rcx, rdi
test rcx, rcx
lea rax, [rcx + 8]
cmove rax, rdi
test rax, rax
je 0x14005d196
movups xmm0, xmmword [rax]
movups xmmword [0x14034d348], xmm0
nop
int3
mov r10d, dword [r15 + 0x28]
lea r9, [r15 + 0x10]
mov dword [rsp + 0x28], edi
mov r14d, 1
mov dword [rbp - 0x7d], r14d
mov r8d, edi
mov qword [rbp - 0x79], r9
mov dword [rbp - 0x71], 0xffffffff
mov qword [rbp - 0x6d], rdi
test r10d, r10d
je 0x14005d230
mov rax, qword [r9 + 0x10]
test rax, rax
cmovne r9, rax
lea eax, [r10 - 1]
cdq
and edx, 0x1f
add edx, eax
mov ecx, dword [r9]
sar edx, 5
test ecx, ecx
jne 0x14005d209
lea ecx, [rdi + 1]
add r8d, 0x20
mov dword [rsp + 0x28], ecx
mov edi, ecx
mov dword [rbp - 0x69], r8d
cmp ecx, edx
jg 0x14005d22c
movsxd rax, ecx
mov dword [rbp - 0x71], 0xffffffff
mov ecx, dword [r9 + rax*4]
test ecx, ecx
je 0x14005d1e2
mov eax, ecx
neg eax
and ecx, eax
mov dword [rbp - 0x7d], ecx
add rcx, rcx
or rcx, r14
bsr rax, rcx
mov dword [rbp - 0x19], eax
dec eax
add eax, r8d
mov dword [rbp - 0x6d], eax
cmp eax, r10d
jle 0x14005d230
mov dword [rbp - 0x6d], r10d
movups xmm4, xmmword [rbp - 0x71]
mov qword [rbp + 0x17], r15
movups xmm0, xmmword [rsp + 0x28]
mov qword [rbp - 0x11], r15
movups xmmword [rbp + 7], xmm4
mov qword [rbp - 0x29], r15
movups xmmword [rbp - 9], xmm0
mov word [rbp - 0x21], 0
movups xmm3, xmmword [rbp - 1]
movups xmm0, xmmword [rbp + 0xf]
movups xmm2, xmmword [rbp - 0x11]
movq rax, xmm3
movaps xmmword [rbp - 0x49], xmm3
movaps xmm1, xmm4
movaps xmmword [rbp - 0x59], xmm2
movq rcx, xmm4
unpckhpd xmm1, xmm4
movsd xmm0, xmm1
shr rcx, 0x20
movups xmmword [rbp + 0xf], xmm0
movaps xmmword [rbp - 0x39], xmm0
cmp ecx, dword [rax + 0x18]
jge 0x14005d35c
mov ecx, dword [rbp - 0x3d]
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rbp - 0x59]
movsxd r8, ecx
shl r8, 5
add r8, qword [rax]
mov rcx, qword [r8]
cmp rsi, rcx
jl 0x14005d2cd
add rcx, qword [r8 + 8]
cmp rsi, rcx
jge 0x14005d2cd
movups xmm0, xmmword [r8 + 8]
movups xmmword [0x14034d348], xmm0
nop
int3
mov eax, dword [rbp - 0x4d]
lea rcx, [rbp - 0x51]
not eax
and dword [rbp - 0x41], eax
call fcn.140016530
mov rax, qword [rbp - 0x49]
mov ecx, dword [rbp - 0x3d]
cmp ecx, dword [rax + 0x18]
jl 0x14005d2a0
cmp byte [rbp - 0x21], 0
je 0x14005d35c
cmp byte [rbp - 0x20], 0
je 0x14005d35c
mov r8, qword [rbp - 0x29]
mov r9d, dword [r8 + 8]
sub r9d, dword [r8 + 0x34]
cmp r9d, 4
jb 0x14005d33c
mov ecx, r9d
shr ecx, 1
add ecx, 8
mov eax, ecx
dec ecx
add rcx, rcx
add rax, rax
or rcx, r14
or rax, r14
bsr rdx, rax
bsr rax, rcx
mov ecx, 0xffffffe0
sub ecx, edx
shl ecx, 0x1a
sar ecx, 0x1f
not ecx
and ecx, eax
shl r14d, cl
test r9d, r9d
jle 0x14005d35c
mov eax, dword [r8 + 0x48]
test eax, eax
je 0x14005d350
cmp eax, r14d
jl 0x14005d350
jle 0x14005d35c
mov rcx, r8
mov dword [r8 + 0x48], r14d
call fcn.1400586c0
mov r15, qword [rsp + 0xd0]
mov r14, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0xe8]
mov rsi, qword [rsp + 0xf0]
test rbx, rbx
je 0x14005d38a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [0x1403a9510]
mov ecx, dword [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [rbx + 0x40]
lea rdx, [rax - 1]
add rsp, 0xf8
pop rbx
pop rbp
jmp qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rcx, [0x1403a9578]
call fcn.14024f710
cmp dword [0x1403a9578], 0xffffffff
jne 0x14005d047
lea rcx, [0x14025d610]
call fcn.14024f570
lea rcx, [0x1403a9578]
call fcn.14024f6b0
jmp 0x14005d047