Function at 0x1400ccb80
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, 0x78
mov rdi, rdx
mov r12, rcx
mov rax, qword [0x14015e028]
xor rax, rsp
mov qword [rsp + 0x70], rax
movabs r14, 0xaaaaaaaaaaaaaaa
mov rax, qword [rcx]
mov r15, qword [rcx + 8]
sub r15, rax
sar r15, 3
movabs rdx, 0xaaaaaaaaaaaaaaab
imul r15, rdx
lea rcx, [r15 + 1]
cmp rcx, r14
ja 0x1400cd232
mov rbp, qword [r12 + 0x10]
sub rbp, rax
sar rbp, 3
imul rbp, rdx
mov rax, rbp
add rax, rbp
cmp rax, rcx
cmovb rax, rcx
movabs rcx, 0x555555555555555
cmp rbp, rcx
cmovb r14, rax
test r14, r14
jne 0x1400ccc91
xor ebx, ebx
lea rax, [r15 + r15*2]
lea rbp, [rbx + rax*8]
lea rcx, [r14 + r14*2]
lea rsi, [rbx + rcx*8]
mov rcx, qword [rdi + 0x10]
mov qword [rbp + 0x10], rcx
movups xmm0, xmmword [rdi]
movups xmmword [rbp], xmm0
lea rbx, [rbx + rax*8]
add rbx, 0x18
mov rdi, qword [r12]
mov r8, qword [r12 + 8]
sub r8, rdi
sub rbp, r8
test r8, r8
jle 0x1400ccc5b
mov rcx, rbp
mov rdx, rdi
call fcn.14009f630
mov rdi, qword [r12]
mov qword [r12], rbp
mov qword [r12 + 8], rbx
mov qword [r12 + 0x10], rsi
test rdi, rdi
jne 0x1400ccdb4
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.14009d180
nop
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.1400c9e00
mov qword [rsp + 0x48], rax
mov r13, rax
lea rax, [r14*8]
lea rsi, [rax + rax*2]
mov eax, 0x40
mov ecx, 0x40
test rsi, rsi
je 0x1400cccc1
bsr rcx, rsi
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x14013b9d0]
mov cl, byte [rax + rcx]
mov rdx, rsi
shr rdx, cl
and edx, 7
lea rcx, [0x14013ba20]
mov rcx, qword [rcx + rax*8]
and rcx, rsi
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x14013bc28]
movzx eax, word [rcx + rax*2 + 0x400]
mov qword [rsp + 0x28], rax
mov byte [rsp + 0x60], 0
cmp byte [r13 + 2], 0
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], r13
je 0x1400ccee6
mov ebp, dword [0x140169500]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbp, rax
test ebx, ebx
jne 0x1400ccecc
cmp rbp, 1
mov rdx, qword [rsp + 0x28]
jbe 0x1400ccfd9
inc qword [rbp + 0x298]
cmp dx, 0x29
jae 0x1400cd06e
mov r13, rdx
shl r13, 4
mov rsi, rbp
add rsi, r13
cmp qword [rbp + r13], 0
je 0x1400cd114
inc qword [rbp + 0x2a0]
mov rbx, qword [rsi]
mov rax, qword [rbx]
test rax, rax
je 0x1400ccd9b
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x1400cd21e
bswap rax
dec byte [rbp + r13 + 8]
mov qword [rsi], rax
test rbx, rbx
jne 0x1400ccc11
jmp 0x1400cd07c
call fcn.1400c9e00
mov rax, rdi
and rax, 0xffffffffffe00000
mov rcx, rdi
shr rcx, 9
and ecx, 0xfe0
lea r15, [rax + rcx]
add r15, 0x1000
movzx ecx, word [r15 + 0x1e]
mov r13, rcx
neg r13
shl rcx, 5
mov r12, r15
sub r12, rcx
mov rcx, r12
and rcx, 0xfffffffffffff000
mov r14, qword [rcx]
cmp byte [r14], 2
je 0x1400ccf3f
cmp byte [r14 + 2], 0
je 0x1400cd14c
mov rax, r13
shl rax, 5
mov rbx, qword [r15 + rax + 0x10]
cmp byte [rbx + 0x1c], 0
je 0x1400cd14c
mov esi, dword [0x140169500]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test ebp, ebp
jne 0x1400cced9
cmp rsi, 2
jb 0x1400cd14c
sub rbx, r14
add rbx, 0xfffffffffffffff0
sar rbx, 3
movabs rax, 0xcccccccccccccccd
imul rax, rbx
inc qword [rsi + 0x2c0]
cmp rax, 0x28
ja 0x1400cd145
shl rax, 4
mov rcx, qword [rsi + rax]
bswap rcx
mov qword [rdi], rcx
not rcx
mov qword [rdi + 8], rcx
mov qword [rsi + rax], rdi
inc byte [rsi + rax + 8]
inc qword [rsi + 0x2c8]
movzx r8d, byte [rsi + rax + 9]
cmp byte [rsi + rax + 8], r8b
jae 0x1400cd208
mov al, byte [rsi + 0x290]
test al, 1
je 0x1400ccc72
mov rcx, rsi
call fcn.14007f6c0
jmp 0x1400ccc72
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400ccd40
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400cce48
mov rax, qword [rsp + 0x28]
lea rax, [rax + rax*4]
mov rsi, qword [rsp + 0x48]
lea r13, [rsi + rax*8]
add r13, 0x10
add rsi, 8
mov ebx, 1
xor ebp, ebp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x1400cd0cf
jmp 0x1400cd249
pause
dec eax
jne 0x1400ccf1d
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x1400ccf07
jmp 0x1400cd0c7
mov rcx, r13
shl rcx, 5
mov rdx, qword [r15 + rcx + 0x10]
cmp byte [rdx + 0x1c], 0
je 0x1400cce06
lea rdx, [r15 + rcx]
add rdx, 0x10
mov rbp, qword [0x14015eeb0]
and ebp, 1
shl rbp, 0xe
add rbp, rax
mov rcx, rdi
shr rcx, 4
shr rdi, 7
and edi, 0x3ff8
mov eax, 1
shl rax, cl
lock or qword [rdi + rbp + 0x4000], rax
mov rax, qword [rdx]
mov eax, dword [rax + 0x18]
mov rcx, rax
lock xadd qword [0x14015eea0], rcx
add rcx, rax
mov rax, qword [0x14015eea8]
cmp rcx, rax
jbe 0x1400ccc72
mov al, byte [0x14015eec0]
test al, 1
jne 0x1400ccc72
lea rcx, [0x14015ee10]
mov edx, 1
call fcn.1400c8970
jmp 0x1400ccc72
je 0x1400cd07c
mov rsi, qword [rsp + 0x38]
mov byte [rsi + 2], 0
mov rcx, rsi
mov rbx, rdx
call fcn.14007f0f0
mov byte [rsi + 2], 1
mov qword [rsp + 0x30], rax
inc qword [rax + 0x298]
cmp bx, 0x29
jae 0x1400cd291
mov rbp, qword [rsp + 0x28]
shl rbp, 4
mov rax, qword [rsp + 0x30]
mov r13, rax
add r13, rbp
cmp qword [rax + rbp], 0
je 0x1400cd2ae
mov rax, qword [rsp + 0x30]
inc qword [rax + 0x2a0]
mov rbx, qword [r13]
mov rax, qword [rbx]
test rax, rax
je 0x1400cd054
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x1400cd21e
bswap rax
mov rcx, qword [rsp + 0x30]
dec byte [rcx + rbp + 8]
mov qword [r13], rax
mov rdx, qword [rsp + 0x28]
jmp 0x1400ccda6
inc qword [rbp + 0x2b8]
inc qword [rbp + 0x2a8]
lea rax, [rdx + rdx*4]
mov rsi, qword [rsp + 0x48]
lea r13, [rsi + rax*8]
add r13, 0x10
add rsi, 8
mov ebx, 1
xor ebp, ebp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x1400cd0cf
jmp 0x1400cd23a
pause
dec eax
jne 0x1400cd0aa
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x1400cd098
mov rcx, rsi
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r13]
mov rbx, qword [rax]
test rbx, rbx
je 0x1400cd26a
mov byte [rsp + 0x60], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400cd0fc
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x1400cd21e
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x1400ccc11
inc qword [rbp + 0x2b0]
inc qword [rbp + 0x2a8]
mov rcx, rbp
mov rdx, qword [rsp + 0x28]
call fcn.14007f370
mov rdx, qword [rsp + 0x28]
mov rbx, qword [rsi]
test rbx, rbx
jne 0x1400ccd83
jmp 0x1400cd07c
inc qword [rsi + 0x2d0]
add r14, 8
xorps xmm0, xmm0
movaps xmmword [rsp + 0x60], xmm0
mov esi, 1
xor ebp, ebp
mov rbx, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r14
call rbx
test al, al
jne 0x1400cd199
jmp 0x1400cd223
pause
dec eax
jne 0x1400cd174
add ebp, esi
add esi, esi
cmp esi, 0x40
mov eax, 0x40
cmovge esi, eax
cmp ebp, 0x3e8
jl 0x1400cd166
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r12]
cmp rax, rdi
je 0x1400cd2e3
bswap rax
mov qword [rdi], rax
not rax
mov qword [rdi + 8], rax
mov qword [r12], rdi
shl r13, 5
movzx eax, word [r15 + r13 + 0x18]
dec eax
mov word [r15 + r13 + 0x18], ax
test ax, ax
jle 0x1400cd258
xorps xmm0, xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x60], xmm0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp qword [rsp + 0x60], 0
je 0x1400ccc72
lea rcx, [rsp + 0x60]
call fcn.14003df10
jmp 0x1400ccc72
mov rdx, rsi
add rdx, rax
shr r8, 1
mov rcx, rsi
call fcn.14007f500
jmp 0x1400cceb1
call 0x1400c8770
mov eax, esi
test esi, esi
jg 0x1400cd174
jmp 0x1400cd17c
mov rcx, r12
call fcn.1400c86e0
mov eax, ebx
test ebx, ebx
jg 0x1400cd0aa
jmp 0x1400cd0b2
mov eax, ebx
test ebx, ebx
jg 0x1400ccf1d
jmp 0x1400ccf25
lea rdx, [rsp + 0x50]
mov rcx, r12
call fcn.14007f740
jmp 0x1400cd1da
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rcx, r13
mov rdx, qword [rsp + 0x38]
xor r8d, r8d
mov r9, qword [rsp + 0x40]
call fcn.140061300
mov rbx, rax
jmp 0x1400cd106
mov rax, qword [rsp + 0x30]
inc qword [rax + 0x2b8]
inc qword [rax + 0x2a8]
mov rdx, qword [rsp + 0x28]
jmp 0x1400cd07c
mov rcx, qword [rsp + 0x30]
inc qword [rcx + 0x2b0]
inc qword [rcx + 0x2a8]
mov rsi, qword [rsp + 0x28]
mov rdx, rsi
call fcn.14007f370
mov rdx, rsi
mov rbx, qword [r13]
test rbx, rbx
jne 0x1400cd03c
jmp 0x1400cd07c
int3