Function at 0x17f2160
Capabilities:
Get thread local storage value

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov r14, rcx
xor ebp, ebp
mov qword [rax - 0x40], rbp
mov rax, qword [0x039f1180]
mov ecx, dword [rax + 8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x17f21a9
lea rbx, [rax + 0x20]
jmp 0x17f21ab
xor ebx, ebx
mov qword [rsp + 0x38], rbx
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VarBstrFromCy]
mov r12, rax
mov qword [rsp + 0x40], rax
mov rcx, qword [r14 + 0x78]
test rcx, rcx
jne 0x17f21df
xor ebp, ebp
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0x78]
jmp 0x17f2415
mov rax, qword [rcx]
mov edx, dword [r14 + 0x38]
call qword [rax + 0x200]
mov r13, rax
movzx r15d, byte [r14 + 0x18]
shr r15b, 1
and r15b, 1
je 0x17f2222
mov edx, 2
mov rcx, r14
call fcn.01187de0
mov ebp, eax
test eax, eax
jns 0x17f2222
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0x78]
jmp 0x17f2415
test r13, r13
je 0x17f23e1
cmp qword [r13 + 0x78], 0
je 0x17f22d5
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
mov edx, 0x3ffe
call qword [rax + SafeArrayCopy]
mov rdi, rax
test rax, rax
jne 0x17f227c
mov qword [rsp + 0x20], 0x1000000f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov ecx, 0xc1030001
call fcn.0124e580
mov ebp, eax
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0x78]
jmp 0x17f2415
mov edx, 0x1fff
mov rcx, rax
call qword [r13 + 0x78]
test eax, eax
je 0x17f23e1
mov rax, qword [r14]
mov r9d, 0x10000000
lea r8, [0x01581080]
mov rdx, rdi
mov rcx, r14
call qword [rax + 0x1c8]
mov edx, reloc.OLEAUT32.dll_VarI4FromDisp
mov rcx, r14
call fcn.0116e6d0
mov ebp, eax
test eax, eax
jns 0x17f23e1
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0x78]
jmp 0x17f2415
mov rax, qword [r13 + 0x68]
test rax, rax
je 0x17f23e1
movzx ecx, byte [rax - 5]
test cl, 0x40
jne 0x17f22f0
test cl, 0x20
je 0x17f22f3
mov rax, qword [rax]
test rax, rax
je 0x17f23e1
mov rsi, qword [r13 + 0x68]
test rsi, rsi
je 0x17f2316
movzx eax, byte [rsi - 5]
test al, 0x40
jne 0x17f2311
test al, 0x20
je 0x17f2318
mov rsi, qword [rsi]
jmp 0x17f2318
xor esi, esi
lea rdi, [0x0124f320]
mov ecx, setsockopt
repe cmpsw word [rsi], word [rdi]
jne 0x17f234d
mov rcx, r14
call fcn.017f17b0
mov ebp, eax
test eax, eax
jns 0x17f23e1
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0x78]
jmp 0x17f2415
mov rsi, qword [r13 + 0x68]
test rsi, rsi
je 0x17f2367
movzx eax, byte [rsi - 5]
test al, 0x40
jne 0x17f2362
test al, 0x20
je 0x17f2369
mov rsi, qword [rsi]
jmp 0x17f2369
xor esi, esi
lea rdi, [0x01222248]
mov ecx, setsockopt
repe cmpsw word [rsi], word [rdi]
jne 0x17f2397
mov rcx, r14
call fcn.017f0b80
mov ebp, eax
test eax, eax
jns 0x17f23e1
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0x78]
jmp 0x17f2415
mov rsi, qword [r13 + 0x68]
test rsi, rsi
je 0x17f23b1
movzx eax, byte [rsi - 5]
test al, 0x40
jne 0x17f23ac
test al, 0x20
je 0x17f23b3
mov rsi, qword [rsi]
jmp 0x17f23b3
xor esi, esi
lea rdi, [0x01222228]
mov ecx, reloc.OLEAUT32.dll_SafeArrayDestroy
repe cmpsw word [rsi], word [rdi]
jne 0x17f23e1
mov rcx, r14
call fcn.017f0ef0
mov ebp, eax
test eax, eax
jns 0x17f23e1
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0x78]
jmp 0x17f2415
test r15b, r15b
je 0x17f2408
mov edx, 2
mov rcx, r14
call fcn.0116e6d0
mov ebp, eax
test eax, eax
jns 0x17f2408
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0x78]
jmp 0x17f2415
mov rcx, qword [rbx + 0x30]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + 0x78]
mov eax, ebp
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret