Function at 0x14004f080
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, 0x88
mov ebx, dword [rsp + 0xf8]
mov rax, qword [0x14016e028]
xor rax, rsp
mov qword [rsp + 0x80], rax
cmp byte [r8], 0
je 0x14004f24c
mov r14, r9
mov rdi, r8
mov r12d, edx
mov rsi, rcx
mov ecx, dword [0x140171588]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x14004f0f6
movsxd rcx, dword [rsi + 0x300]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rsi + 0x304]
jne 0x14004f0f6
cmp qword [rax + rcx], 0
jne 0x14004f24c
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, ebx
jne 0x14004f1e2
mov rax, qword [0x1401796c8]
cmp rax, 1
jbe 0x14004f37a
mov eax, dword [0x1401796c0]
mov ecx, dword [0x1401719a0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14004f214
mov ecx, dword [0x140171588]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x14004f3d4
movsxd rcx, dword [0x1401796b8]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x1401796bc]
jne 0x14004f3d4
mov rbx, qword [rax + rcx]
test rbx, rbx
je 0x14004f31f
mov qword [rsp + 0x68], rbx
mov eax, dword [0x140175fc8]
mov ecx, dword [0x1401719a0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14004f32b
mov rbp, qword [0x140175fc0]
mov ecx, dword [0x140171588]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x14004f3db
movsxd rcx, dword [rbp]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rbp + 4]
jne 0x14004f3db
mov rax, qword [rax + rcx]
test rbx, rbx
je 0x14004f1e2
cmp rbx, rax
jne 0x14004f250
mov sil, 1
test byte [rdi], 8
jne 0x14004f3e2
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14007d5a0
mov eax, esi
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x1401796c0]
call fcn.14007b4e8
cmp dword [0x1401796c0], 0xffffffff
jne 0x14004f13a
lea rcx, [0x1401796b8]
xor edx, edx
call fcn.140050d20
lea rcx, [0x1401796c0]
call fcn.14007ac34
jmp 0x14004f13a
xor esi, esi
jmp 0x14004f1ee
cmp byte [rbx], 0
je 0x14004f1e2
mov r15, qword [0x140175fc0]
mov ecx, dword [0x140171588]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x14004f3ca
movsxd rcx, dword [r15]
shl rcx, 4
mov qword [rax + rcx], rbx
mov ecx, dword [r15 + 4]
movsxd rdx, dword [r15]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
lea r15, [rsi + 0x10]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14004f3bd
add rsi, 0x108
lea r13, [rsp + 0x50]
lea rbp, [rsp + 0xf8]
mov rcx, rsi
mov rdx, r13
mov r8, rbp
call fcn.1400b0270
mov rax, qword [r13]
test rax, rax
jne 0x14004f40a
lea rax, [rsp + 0x78]
mov qword [rax], rbp
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
lea r9, [0x1401524fb]
lea r13, [rsp + 0x50]
mov rcx, rsi
mov rdx, r13
mov r8, rbp
call fcn.14004f632
mov rcx, qword [r13]
add rcx, 0x18
mov rdx, rbx
call fcn.14004f4e4
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14004f1e2
lea rbx, [0x14015623b]
jmp 0x14004f178
lea rcx, [0x140175fc8]
call fcn.14007b4e8
cmp dword [0x140175fc8], 0xffffffff
jne 0x14004f1a2
mov ecx, 8
call fcn.14007a994
mov r15, rax
mov qword [rax], 0
mov rcx, rax
xor edx, edx
call fcn.140050d20
mov qword [0x140175fc0], r15
lea rcx, [0x140175fc8]
call fcn.14007ac34
jmp 0x14004f1a2
lea rcx, [0x1401796c8]
call fcn.14004bff0
test al, al
je 0x14004f4d7
mov ecx, pe_nt_image_headers64
call fcn.14007a994
mov rbx, rax
mov rcx, rax
call fcn.1400bb5e0
lea rcx, [0x1401796c8]
mov rdx, rbx
xor r8d, r8d
xor r9d, r9d
call fcn.14004be50
jmp 0x14004f115
mov rcx, r15
call fcn.140039d60
jmp 0x14004f2a1
call fcn.140008040
jmp 0x14004f272
xor ebx, ebx
jmp 0x14004f16f
xor eax, eax
jmp 0x14004f1d8
mov rax, qword [rsp + 0x100]
mov r9, qword [rsp + 0xf0]
mov qword [rsp + 0x20], rax
mov ecx, r12d
mov rdx, rdi
mov r8, r14
call fcn.1400fe8e0
jmp 0x14004f1ee
movabs rcx, 0xaaaaaaaaaaaaaaaa
lea rbx, [rsp + 0x50]
mov qword [rbx + 0x10], rcx
movaps xmm0, xmmword [0x140147b90]
movaps xmmword [rbx], xmm0
lea rcx, [0x14014b191]
lea r8, [rsp + 0x40]
mov qword [r8], rcx
mov qword [r8 + 8], 1
lea rbp, [rax + 0x18]
movzx ecx, byte [rax + 0x2f]
test cl, cl
mov rsi, qword [rax + 0x18]
cmovns rsi, rbp
lea rdx, [rsp + 0x30]
mov qword [rdx], rsi
cmovs rcx, qword [rax + 0x20]
mov qword [rdx + 8], rcx
mov dword [rsp + 0x20], 1
mov rcx, rbx
xor r9d, r9d
call fcn.1400075c0
mov rdx, qword [rbx]
mov rbx, qword [rbx + 8]
lea rsi, [rsp + 0x78]
lea r9, [rsp + 0x68]
mov rcx, rsi
mov r8, rbx
call fcn.1400fe870
cmp qword [rsi], rbx
je 0x14004f4b2
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14004f311
mov qword [rsp + 0x58], rcx
call fcn.14007a98c
jmp 0x14004f311
mov rax, qword [rsp + 0x50]
cmp rax, qword [rsp + 0x58]
je 0x14004f4c8
mov rcx, rbp
mov dl, 0x2c
call fcn.1400323e6
mov rdx, qword [rsp + 0x68]
mov rcx, rbp
call fcn.14006f38c
jmp 0x14004f495
mov rax, qword [0x1401796c8]
jmp 0x14004f115