Function at 0x17e7510
Capabilities:
Get thread local storage value
Query environment variable

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2c0
mov qword [rsp + 0x90], 0xfffffffffffffffe
mov qword [rsp + 0x310], rbx
mov rax, qword [0x039f1190]
xor rax, rsp
mov qword [rsp + 0x2b0], rax
mov r12, rdx
mov rbp, rcx
xor r15d, r15d
mov qword [rsp + 0x80], r15
mov rax, qword [0x039f1180]
mov ecx, dword [rax + 8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x17e7575
lea rdi, [rax + 0x20]
jmp 0x17e7578
mov rdi, r15
mov qword [rsp + 0x80], rdi
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VarBstrFromCy]
mov rsi, rax
mov qword [rsp + 0x88], rax
lea rcx, [rsp + 0x40]
call fcn.0116d180
nop
lea rax, [0x01165c20]
mov qword [rsp + 0x58], rax
lea rbx, [0x01000000]
lea rcx, [rbx + 0x4f0d0]
mov qword [rsp + 0x40], rcx
lea rax, [0x0109b930]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
lea r13, [0x0104ef20]
mov qword [rsp + 0x40], r13
lea r14, [0x0109b930]
mov qword [rsp + 0x58], r14
xor edx, edx
lea rcx, [rsp + 0x40]
call fcn.0116cfa0
xor edx, edx
lea rcx, [rsp + 0x40]
mov rax, qword [rsp + 0x40]
call qword [rax + 0x180]
nop
mov edx, dword [reloc.OLEAUT32.dll_VariantInit]
and edx, 7
lea rax, [rdx + rdx*2]
movzx ecx, byte [rbx + rax*2 + 0x173e9d]
movzx eax, byte [rbx + rax*2 + 0x173e9c]
add eax, ecx
cdqe
movabs r8, 0x7fffffffffffffff
mov rcx, r8
sub rcx, rax
shr rcx, 1
sub rcx, 1
cmp rcx, 0x104
jge 0x17e7699
lea r8, [0x017e8010]
mov edx, 0x100a
lea rcx, [0x01580f90]
call fcn.017eea00
mov ebx, eax
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov r8, qword [rcx]
mov rdx, rsi
call qword [r8 + 0x78]
jmp 0x17e7fe0
lea rax, [rdx + rdx*2]
movzx ecx, byte [rbx + rax*2 + 0x173e9d]
movzx eax, byte [rbx + rax*2 + 0x173e9c]
add ecx, eax
movsxd rbx, ecx
add rbx, 0x20a
mov rcx, qword [rdi + 0x30]
cmp rbx, r8
jae 0x17e7fa0
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + SafeArrayCopy]
test rax, rax
je 0x17e7fa0
mov rcx, qword [rdi + 0x28]
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], rbx
lea rcx, [rsp + 0x30]
call fcn.0116a950
nop
mov r9, qword [rdi + 0x40]
xor r8d, r8d
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x30]
call fcn.0118a2d0
mov ebx, eax
test eax, eax
jns 0x17e7749
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov rcx, qword [0x039f11b0]
cmp qword [rcx + 0x168], 0
je 0x17e7763
mov rax, qword [rcx + 0x168]
jmp 0x17e7766
mov rax, rcx
movzx eax, byte [rax + 0x248]
shr al, 3
test al, 1
jne 0x17e79fa
cmp qword [rcx + 0xb90], 0
je 0x17e79fa
mov qword [rsp + 0x38], r15
mov rcx, qword [rcx + 0xb90]
test rcx, rcx
je 0x17e77da
lea rdx, [rsp + 0x38]
call fcn.01175210
mov ebx, eax
test eax, eax
je 0x17e77da
test eax, eax
jns 0x17e77c4
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x17e7856
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
jmp 0x17e7856
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x17e7856
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
jmp 0x17e7856
mov rax, qword [rsp + 0x38]
test rax, rax
jne 0x17e7814
mov qword [rsp + 0x20], 0x1000000f
xor r9d, r9d
xor r8d, r8d
mov edx, r15d
mov ecx, 0xc1000002
call fcn.0124e580
mov ebx, eax
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x17e7856
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
jmp 0x17e7856
lea rcx, [rax + 0x18]
mov rax, qword [rcx]
lea r8, [rsp + 0x30]
mov edx, 1
call qword [rax + 0xc0]
mov ebx, eax
test eax, eax
jns 0x17e7843
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x17e7856
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
jmp 0x17e7856
mov ebx, r15d
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x17e7856
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
test ebx, ebx
jns 0x17e788c
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x17e78be
test byte [rax - 5], 0x40
jne 0x17e78a2
movsxd rcx, dword [rax - 4]
jmp 0x17e78b2
mov rcx, qword [rax]
call qword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ecx, eax
mov rax, qword [rsp + 0x30]
shr rcx, 1
test rcx, rcx
jg 0x17e7c20
mov rax, qword [0x039f11b0]
mov qword [rsp + 0x38], r15
mov rcx, qword [rax + 0xb90]
test rcx, rcx
je 0x17e7919
lea rdx, [rsp + 0x38]
call fcn.01175210
mov ebx, eax
test eax, eax
je 0x17e7919
test eax, eax
jns 0x17e7903
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x17e7992
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
jmp 0x17e7992
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x17e7992
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
jmp 0x17e7992
mov rax, qword [rsp + 0x38]
test rax, rax
jne 0x17e7953
mov qword [rsp + 0x20], 0x1000000f
xor r9d, r9d
xor r8d, r8d
mov edx, r15d
mov ecx, 0xc1000002
call fcn.0124e580
mov ebx, eax
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x17e7992
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
jmp 0x17e7992
lea rcx, [rax + 0x18]
mov rax, qword [rcx]
lea r8, [rsp + 0x30]
xor edx, edx
call qword [rax + 0xc0]
mov ebx, eax
test eax, eax
jns 0x17e797f
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x17e7992
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
jmp 0x17e7992
mov ebx, r15d
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x17e7992
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
test ebx, ebx
jns 0x17e79c8
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x17e79fa
test byte [rax - 5], 0x40
jne 0x17e79de
movsxd rcx, dword [rax - 4]
jmp 0x17e79ee
mov rcx, qword [rax]
call qword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ecx, eax
mov rax, qword [rsp + 0x30]
shr rcx, 1
test rcx, rcx
jg 0x17e7c20
mov word [rsp + 0xa0], 0
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0xa2]
call sub.MSVCR80.dll_memset
mov r8d, 0x103
lea rdx, [rsp + 0xa0]
lea rcx, [0x01581058]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x17e7b19
mov r9d, 7
xor r8d, r8d
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x30]
call fcn.0118a4d0
mov ebx, eax
test eax, eax
cmovns ebx, r15d
test ebx, ebx
jns 0x17e7a95
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x17e7b19
test byte [rax - 5], 0x40
jne 0x17e7aab
movsxd rcx, dword [rax - 4]
jmp 0x17e7ab6
mov rcx, qword [rax]
call qword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ecx, eax
shr rcx, 1
test rcx, rcx
jle 0x17e7b19
mov r9b, 1
movzx r8d, r9b
movzx edx, r9b
lea rcx, [rsp + 0x30]
call fcn.017d5690
mov ebx, eax
test eax, eax
jns 0x17e7b0b
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
test eax, eax
jne 0x17e7b19
mov rax, qword [rsp + 0x30]
jmp 0x17e7c20
mov r8d, 0x103
lea rdx, [rsp + 0xa0]
lea rcx, [0x01581050]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x17e7c1b
mov r9d, 7
xor r8d, r8d
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x30]
call fcn.0118a4d0
mov ebx, eax
test eax, eax
cmovns ebx, r15d
test ebx, ebx
jns 0x17e7b95
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x17e7d93
test byte [rax - 5], 0x40
jne 0x17e7baf
movsxd rcx, dword [rax - 4]
jmp 0x17e7bbf
mov rcx, qword [rax]
call qword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ecx, eax
mov rax, qword [rsp + 0x30]
shr rcx, 1
test rcx, rcx
jle 0x17e7c20
mov r9b, 1
movzx r8d, r9b
movzx edx, r9b
lea rcx, [rsp + 0x30]
call fcn.017d5690
mov ebx, eax
test eax, eax
jns 0x17e7c14
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov rax, qword [rsp + 0x30]
jmp 0x17e7c20
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x17e7d93
test byte [rax - 5], 0x40
jne 0x17e7c35
movsxd rcx, dword [rax - 4]
jmp 0x17e7c40
mov rcx, qword [rax]
call qword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ecx, eax
shr rcx, 1
je 0x17e7d93
mov r9b, 1
movzx r8d, r9b
movzx edx, r9b
lea rcx, [rsp + 0x30]
call fcn.017d5690
mov ebx, eax
test eax, eax
jns 0x17e7c96
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
test eax, eax
jne 0x17e7d93
lea rcx, [rsp + 0x30]
call fcn.017e5470
mov ebx, eax
test eax, eax
jns 0x17e7ce0
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov r8, r15
cmp qword [r12], r15
jne 0x17e7d0d
mov rax, qword [rsp + 0x30]
mov cl, byte [rax - 5]
and ecx, 7
lea rdx, [rcx + rcx*2]
lea rcx, [0x01000000]
movzx ecx, byte [rcx + rdx*2 + 0x173e9a]
sub rax, rcx
mov r8, qword [rax]
mov r9d, 7
lea rdx, [rsp + 0x30]
mov rcx, r12
call fcn.01174350
mov ebx, eax
test eax, eax
cmovns ebx, r15d
test ebx, ebx
jns 0x17e7d5e
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov ebx, r15d
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.012cebe0
mov ebx, eax
test eax, eax
jns 0x17e7dd7
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov rdx, qword [rbp + 0x168]
mov rax, rbp
test rdx, rdx
cmovne rax, rdx
movzx eax, byte [rax + 0x248]
shr al, 1
test al, 1
je 0x17e7e6c
mov rax, rbp
test rdx, rdx
cmovne rax, rdx
movzx eax, byte [rax + 0x248]
shr al, 3
test al, 1
jne 0x17e7e6c
mov rax, rbp
test rdx, rdx
cmovne rax, rdx
movzx eax, byte [rax + 0x248]
shr al, 2
test al, 1
jne 0x17e7e6c
mov rdx, r12
mov rcx, rbp
call fcn.017e6ae0
mov ebx, eax
test eax, eax
jns 0x17e7f6e
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
lea rdx, [rsp + 0x30]
mov rcx, rbp
call fcn.017d4290
mov ebx, eax
test eax, eax
jns 0x17e7eb1
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
lea rcx, [rsp + 0x30]
call fcn.017e5470
mov ebx, eax
test eax, eax
jns 0x17e7ef3
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov r8, r15
cmp qword [r12], r15
jne 0x17e7f20
mov rax, qword [rsp + 0x30]
mov cl, byte [rax - 5]
and ecx, 7
lea rdx, [rcx + rcx*2]
lea rcx, [0x01000000]
movzx ecx, byte [rcx + rdx*2 + 0x173e9a]
sub rax, rcx
mov r8, qword [rax]
mov r9d, 7
lea rdx, [rsp + 0x30]
mov rcx, r12
call fcn.01174350
mov ebx, eax
test eax, eax
cmovns ebx, r15d
test ebx, ebx
jns 0x17e7f6e
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov ebx, r15d
lea rcx, [rsp + 0x30]
call fcn.0116a920
nop
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
jmp 0x17e7fe0
mov qword [rsp + 0x20], 0x1000000f
xor r9d, r9d
xor r8d, r8d
mov edx, r15d
mov ecx, 0xc1030001
call fcn.0124e580
mov ebx, eax
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x58], r14
lea rcx, [rsp + 0x40]
call fcn.0116d120
nop
mov rcx, qword [rdi + 0x30]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x78]
mov eax, ebx
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.01003340
mov rbx, qword [rsp + 0x310]
add rsp, 0x2c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret