Function at 0x140012720
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 [0x140163028]
xor rax, rsp
mov qword [rsp + 0x80], rax
cmp byte [r8], 0
je 0x1400128ec
mov r14, r9
mov rdi, r8
mov r13d, edx
mov rsi, rcx
mov ecx, dword [0x140166310]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140012796
movsxd rcx, dword [rsi + 0x308]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rsi + 0x30c]
jne 0x140012796
cmp qword [rax + rcx], 0
jne 0x1400128ec
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, ebx
jne 0x140012882
mov rax, qword [0x14016baa8]
cmp rax, 1
jbe 0x140012a06
mov eax, dword [0x14016baa0]
mov ecx, dword [0x1401666f4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400128b4
mov ecx, dword [0x140166310]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1400129a9
movsxd rcx, dword [0x14016ba98]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x14016ba9c]
jne 0x1400129a9
mov rbx, qword [rax + rcx]
test rbx, rbx
je 0x140012a56
mov qword [rsp + 0x70], rbx
mov eax, dword [0x1401698a0]
mov ecx, dword [0x1401666f4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400129b7
mov rbp, qword [0x140169898]
mov ecx, dword [0x140166310]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1400129b0
movsxd rcx, dword [rbp]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rbp + 4]
jne 0x1400129b0
mov rax, qword [rax + rcx]
test rbx, rbx
je 0x140012882
cmp rbx, rax
jne 0x1400128f0
mov sil, 1
test byte [rdi], 8
jne 0x140012a6c
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140107cc0
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, [0x14016baa0]
call fcn.1401050e8
cmp dword [0x14016baa0], 0xffffffff
jne 0x1400127da
lea rcx, [0x14016ba98]
xor edx, edx
call fcn.14002ec30
lea rcx, [0x14016baa0]
call fcn.1401052d4
jmp 0x1400127da
xor esi, esi
jmp 0x14001288e
cmp byte [rbx], 0
je 0x140012882
mov r15, qword [0x140169898]
mov ecx, dword [0x140166310]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140012a62
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 0x140012a49
add rsi, 0x108
lea rbp, [rsp + 0x50]
lea r12, [rsp + 0xf8]
mov rcx, rsi
mov rdx, rbp
mov r8, r12
call fcn.140015460
mov rax, qword [rbp]
test rax, rax
jne 0x140012a94
lea r9, [rsp + 0x78]
mov qword [r9], r12
lea rbp, [rsp + 0x50]
mov rcx, rsi
mov rdx, rbp
mov r8, r12
call fcn.140015750
mov rcx, qword [rbp]
add rcx, 0x18
mov rdx, rbx
call fcn.140014d26
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x140012882
xor ebx, ebx
jmp 0x14001280f
xor eax, eax
jmp 0x140012878
lea rcx, [0x1401698a0]
call fcn.1401050e8
cmp dword [0x1401698a0], 0xffffffff
jne 0x140012842
mov ecx, 8
call fcn.140105030
mov r15, rax
mov qword [rax], 0
mov rcx, rax
xor edx, edx
call fcn.14002ec30
mov qword [0x140169898], r15
lea rcx, [0x1401698a0]
call fcn.1401052d4
jmp 0x140012842
lea rcx, [0x14016baa8]
call fcn.14000c730
test al, al
je 0x140012b4f
mov ecx, pe_nt_image_headers64
call fcn.140105030
mov rbx, rax
mov rcx, rax
call fcn.14000f5e0
lea rcx, [0x14016baa8]
mov rdx, rbx
xor r8d, r8d
xor r9d, r9d
call fcn.14000a660
jmp 0x1400127b5
mov rcx, r15
call fcn.1400071b0
jmp 0x140012941
lea rbx, [0x14014cb4b]
jmp 0x140012818
call fcn.140021dc0
jmp 0x140012912
mov rax, qword [rsp + 0x100]
mov r9, qword [rsp + 0xf0]
mov qword [rsp + 0x20], rax
mov ecx, r13d
mov rdx, rdi
mov r8, r14
call fcn.1400a6fe0
jmp 0x14001288e
movabs rcx, 0xaaaaaaaaaaaaaaaa
lea rbx, [rsp + 0x50]
mov qword [rbx + 0x10], rcx
movaps xmm0, xmmword [0x140141df0]
movaps xmmword [rbx], xmm0
lea rcx, [0x140142244]
lea r8, [rsp + 0x40]
mov qword [r8], rcx
mov qword [r8 + 8], 1
lea rsi, [rax + 0x18]
movzx ecx, byte [rax + 0x2f]
test cl, cl
mov rbp, qword [rax + 0x18]
cmovns rbp, rsi
lea rdx, [rsp + 0x30]
mov qword [rdx], rbp
cmovs rcx, qword [rax + 0x20]
mov qword [rdx + 8], rcx
mov dword [rsp + 0x20], 1
mov rcx, rbx
xor r9d, r9d
call fcn.1400507b0
lea rdx, [rsp + 0x70]
mov rcx, rbx
call fcn.1400a6f70
test al, al
jne 0x140012b32
mov rax, qword [rsp + 0x50]
cmp rax, qword [rsp + 0x58]
je 0x140012b25
mov rcx, rsi
mov dl, 0x2c
call fcn.14000335c
mov rdx, qword [rsp + 0x70]
mov rcx, rsi
call fcn.14002321c
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14001299b
mov qword [rsp + 0x58], rcx
call fcn.140105028
jmp 0x14001299b
mov rax, qword [0x14016baa8]
jmp 0x1400127b5