Function at 0x140040820
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x88
mov qword [rsp + 0x78], rcx
mov ecx, dword [0x1402980b0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, qword [rsp + 0x78]
add rax, 0x60
mov qword [rsp + 0x80], rax
cmp qword [rcx], 0
jle 0x140040c02
mov rax, qword [rsp + 0x78]
add rax, 8
mov qword [rsp + 0x68], rax
xor eax, eax
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x60], rax
mov eax, dword [0x140273fb8]
imul eax, dword [0x140273fbc]
imul eax, eax, 0x10f1c0a
and eax, 0x9c6b3b36
mov ecx, eax
xor ecx, 0xf63a15a8
mov edx, 0xffffffff
xor edx, 0xf63a15a8
and eax, edx
shl eax, 1
sub eax, ecx
mov ecx, 0x2b419e13
xor ecx, 0x2a407d7e
cmp eax, ecx
jb 0x140040c40
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x68]
mov eax, dword [0x140273fc0]
mov r8d, dword [0x140273fc4]
mov r9d, 0x1a0cf5fc
xor r9d, 0x8b7c4868
sub eax, r9d
sub eax, r8d
add eax, 0x9170bd94
mov r8d, 0xdc1a9e27
xor r8d, 0xfbaa0406
sub eax, r8d
imul eax, eax, 0x1380d416
xor r8d, r8d
sub r8d, eax
xor eax, eax
sub eax, 0xf33fd6d5
add r8d, eax
xor eax, eax
sub eax, r8d
mov rcx, qword [rcx]
mov rcx, qword [rcx + rdx*8 + 8]
mov qword [rsp + 0x50], rcx
cmp rcx, 0
sete cl
mov byte [rsp + 0x5f], cl
cmp eax, 0x5ff92f25
je 0x140040c40
mov al, byte [rsp + 0x5f]
test al, 1
jne 0x140040bb6
jmp 0x140040945
mov rax, qword [rsp + 0x50]
mov rcx, 0xffffffffffffffff
xor rcx, 0xfffffffffffffff0
xor edx, edx
sub rdx, 1
sub rcx, rdx
sub rax, rcx
mov qword [rsp + 0x40], rax
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
cmp rax, 0x10
jb 0x140040a71
mov r8, qword [rsp + 0x48]
movabs rcx, 0x25deb276d1107135
movabs rax, 0x2018feb261d21d8a
xor rcx, rax
mov rax, r8
add rax, rcx
add rax, 0xfffffffffffffff0
movabs rcx, 0x5c64cc4b0c26cbf
sub rax, rcx
mov qword [rsp + 0x38], rax
mov rcx, rax
or rcx, rcx
xor rcx, 0xffffffffffffffff
mov rdx, r8
or rdx, rdx
movabs r9, 0x7a8dbf231e55d476
movabs r10, 0x857240dce1aa2b89
xor r9, r10
xor rdx, r9
or rcx, rdx
xor rcx, 0xffffffffffffffff
mov rdx, rax
xor rdx, 0xffffffffffffffff
movabs r9, 0x683cf09ea93bde2c
movabs r10, 0x97c30f6156c421d3
xor r9, r10
xor r8, r9
and rdx, r8
or rcx, rdx
xor rcx, 0xffffffffffffffff
movabs rdx, 0x5b86f65526307ac4
movabs r8, 0x5b86f65526307ac4
xor rdx, r8
cmp rcx, rdx
setl dl
cmp rax, 0xffffffffffffffff
setg al
xor al, 0xff
xor dl, 0xff
mov cl, 1
xor cl, 1
or al, dl
or cl, 1
xor edx, edx
xor dl, 1
xor al, dl
and al, cl
test al, 1
jne 0x140040a55
jmp 0x140040a5f
call fcn.14000f24b
jmp 0x140040bb6
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
mov qword [rax], rcx
jmp 0x140040bb6
mov rcx, qword [rsp + 0x50]
call fcn.1401d80e0
mov rax, qword [rsp + 0x80]
cmp byte [rax], 0
jne 0x140040c37
mov eax, dword [0x140273fc8]
mov ecx, dword [0x140273fcc]
xor ecx, 0x5a69299f
or eax, ecx
sub eax, 0x49d78a53
mov ecx, 0x4027341e
xor ecx, 0xc0edf43c
imul eax, ecx
add eax, 0xedabd7d7
mov ecx, 0xb58309b6
xor ecx, 0x596f4377
cmp eax, ecx
je 0x140040c49
mov rcx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x68]
mov edx, dword [0x140273fd0]
add edx, dword [0x140273fd4]
mov r10d, 0xffffffff
xor r10d, 0x3f2431e7
mov r9d, edx
and r9d, r10d
mov r8d, edx
or r8d, r10d
mov r10d, 0x9b1bb536
xor r10d, 0x64e44ac9
xor r8d, r10d
imul r8d, r9d
mov r9d, edx
and r9d, 0x3f2431e7
or edx, 0x3f2431e7
imul edx, r9d
add edx, r8d
mov r8d, 0x59744802
xor r8d, 0x5e82eadc
add edx, r8d
sub edx, 0x48f7680a
sub edx, 0x7f6a2de
mov r8d, 0xd843d401
xor r8d, 0x637382cf
and r8d, edx
xor r8d, 0xffffffff
mov r9d, 0xfeabff1a
xor r9d, 0x459ba9d4
add edx, r9d
add edx, 1
add edx, r8d
mov dword [rsp + 0x34], edx
mov rax, qword [rax]
mov rax, qword [rax + rcx*8 + 8]
xor ecx, ecx
sub rcx, 0xfffffffffffffff0
sub rax, rcx
mov qword [rsp + 0x28], rax
mov ecx, dword [0x1402980b0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdx, qword [rsp + 0x28]
mov rcx, rax
add rcx, 0x68
call fcn.1400190f0
mov eax, dword [rsp + 0x34]
cmp eax, 0xeb1f67c6
jae 0x140040acb
jmp 0x140040bb6
mov rcx, qword [rsp + 0x78]
mov rax, qword [rsp + 0x60]
movabs rdx, 0x8b2cb5e58cdea78c
add rax, rdx
movabs rdx, 0xb7fa23d501a8f3ae
movabs r8, 0xb7fa23d501a8f3af
xor rdx, r8
add rax, rdx
movabs rdx, 0x8b2cb5e58cdea78c
sub rax, rdx
cmp rax, qword [rcx]
mov qword [rsp + 0x70], rax
jl 0x140040868
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 8]
mov qword [rsp + 0x20], rax
cmp rax, 0
je 0x140040c37
mov ecx, dword [0x1402980b0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdx, qword [rsp + 0x20]
mov rcx, rax
add rcx, 0x68
call fcn.1400190f0
nop
add rsp, 0x88
ret
test byte [0x1aeed317a], ah
cld
invalid
scasd eax, dword [rdi]
mov bl, 0x37
jmp 0x140040acb