Function at 0x40dc21
Capabilities:
Get common file path
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
push 0x44e184
lea ecx, [ebp - 0x10]
mov dword [ebp - 0xc], ebx
call fcn.004025b6
mov esi, dword [ebp - 0x10]
cmp dword [esi - 0xc], ebx
jle 0x40dc71
lea eax, [ebp - 0x44]
push eax
push esi
call dword [sym.imp.ole32.dll_CLSIDFromString]
test eax, eax
js 0x40dc5e
mov byte [ebp - 5], 1
jmp 0x40dc74
lea eax, [ebp - 0x44]
push eax
push esi
call dword [sym.imp.ole32.dll_CLSIDFromProgID]
mov byte [ebp - 5], 1
test eax, eax
jns 0x40dc74
mov byte [ebp - 5], bl
lea ecx, [esi - 0x10]
call fcn.0040169b
cmp byte [ebp - 5], bl
je 0x40e14a
lea ecx, [edi + 4]
mov eax, dword [ecx]
cmp dword [eax - 0xc], ebx
jle 0x40dca2
lea eax, [ebp - 0xc]
push eax
push ecx
lea edx, [ebp - 0x44]
call fcn.0040d6a8
pop ecx
pop ecx
test eax, eax
jns 0x40dcc0
lea eax, [ebp - 0xc]
push eax
push 0x450000
push 7
push ebx
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40e14a
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
push 0x10
lea esi, [ebp - 0x154]
pop edi
mov ecx, esi
call fcn.0040d690
add esi, 0x10
dec edi
jns 0x40dcd3
mov esi, dword [ebp + 8]
mov esi, dword [esi + 4]
test esi, esi
je 0x40dd03
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40dcef
sub ecx, edx
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x40dd07
mov eax, ebx
jmp 0x40dd1b
lea eax, [edi + edi]
call fcn.0044c2f1
mov ecx, esp
mov edx, esi
push 3
push edi
call fcn.00409179
push eax
lea ecx, [ebp - 0x54]
call fcn.0040da7f
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x64]
push dword [esi + 0x10]
call fcn.0040da7f
push dword [esi + 0x14]
lea ecx, [ebp - 0x74]
call fcn.0040da7f
push dword [esi]
lea ecx, [ebp - 0x84]
call fcn.0040da7f
cmp dword [esi + 8], ebx
je 0x40dd69
mov ecx, dword [esi + 8]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40dd55
sub ecx, edx
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x40dd6d
mov eax, ebx
jmp 0x40dd82
lea eax, [edi + edi]
call fcn.0044c2f1
mov edx, dword [esi + 8]
mov ecx, esp
push 3
push edi
call fcn.00409179
push eax
lea ecx, [ebp - 0x94]
call fcn.0040da7f
push 0x44de30
lea ecx, [ebp - 0xa4]
call fcn.0040da7f
push 0xffffffffffffffff
lea ecx, [ebp - 0xb4]
call fcn.0040dad5
push ebx
lea ecx, [ebp - 0xc4]
call fcn.0040dad5
push 0xffffffffffffffff
lea ecx, [ebp - 0xd4]
call fcn.0040dad5
cmp dword [esi + 0xc], ebx
je 0x40dde3
mov ecx, dword [esi + 0xc]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ddcf
sub ecx, edx
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x40dde7
mov eax, ebx
jmp 0x40ddfc
lea eax, [edi + edi]
call fcn.0044c2f1
mov edx, dword [esi + 0xc]
mov ecx, esp
push 3
push edi
call fcn.00409179
push eax
lea ecx, [ebp - 0xe4]
call fcn.0040da7f
mov edi, 0x44de30
lea ecx, [ebp - 0xf4]
push edi
call fcn.0040da7f
push edi
lea ecx, [ebp - 0x104]
call fcn.0040da7f
push 0xffffffffffffffff
lea ecx, [ebp - 0x114]
call fcn.0040dad5
push 0x15
pop edi
cmp word [ebp - 0x124], di
je 0x40de5a
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
js 0x40e168
mov word [ebp - 0x124], di
push ebx
lea ecx, [ebp - 0x134]
mov dword [ebp - 0x11c], ebx
mov dword [ebp - 0x118], ebx
call fcn.0040dad5
push ebx
lea ecx, [ebp - 0x144]
call fcn.0040dad5
push str.autoleftup
lea ecx, [ebp - 0x154]
call fcn.0040da7f
lea eax, [ebp - 0x24]
push eax
push 0x11
lea eax, [ebp - 0x154]
push eax
push str.AddTask11
lea ecx, [ebp - 0xc]
call fcn.0040d71d
push 0x10
mov dword [ebp - 0x10], eax
lea edi, [ebp - 0x44]
pop esi
sub edi, 0x10
push edi
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
dec esi
jns 0x40deb1
cmp dword [ebp - 0x10], ebx
jge 0x40e032
push 9
lea edi, [ebp - 0xe4]
pop esi
mov ecx, edi
call fcn.0040d690
add edi, 0x10
dec esi
jns 0x40ded0
mov esi, dword [ebp + 8]
mov edi, dword [esi + 4]
test edi, edi
je 0x40df02
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40deec
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp + 8], eax
cmp eax, 0x3fffffff
jle 0x40df06
mov eax, ebx
jmp 0x40df1b
add eax, eax
call fcn.0044c2f1
mov ecx, esp
mov edx, edi
push 3
push dword [ebp + 8]
call fcn.00409179
push eax
lea ecx, [ebp - 0x54]
call fcn.0040da7f
push dword [esi + 0x10]
lea ecx, [ebp - 0x64]
call fcn.0040da7f
push dword [esi + 0x14]
lea ecx, [ebp - 0x74]
call fcn.0040da7f
push dword [esi]
lea ecx, [ebp - 0x84]
call fcn.0040da7f
cmp dword [esi + 8], ebx
je 0x40df66
mov ecx, dword [esi + 8]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40df52
sub ecx, edx
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x40df6a
mov eax, ebx
jmp 0x40df7f
lea eax, [edi + edi]
call fcn.0044c2f1
mov edx, dword [esi + 8]
mov ecx, esp
push 3
push edi
call fcn.00409179
push eax
lea ecx, [ebp - 0x94]
call fcn.0040da7f
push 0xffffffffffffffff
lea ecx, [ebp - 0xa4]
call fcn.0040dad5
push ebx
lea ecx, [ebp - 0xb4]
call fcn.0040dad5
push 0xffffffffffffffff
lea ecx, [ebp - 0xc4]
call fcn.0040dad5
mov edi, dword [esi + 0xc]
test edi, edi
je 0x40dfd1
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40dfbd
sub ecx, edx
lea esi, [ecx + 1]
cmp esi, 0x3fffffff
jle 0x40dfd5
mov eax, ebx
jmp 0x40dfe9
lea eax, [esi + esi]
call fcn.0044c2f1
mov ecx, esp
mov edx, edi
push 3
push esi
call fcn.00409179
push eax
lea ecx, [ebp - 0xd4]
call fcn.0040da7f
push 0x44de30
lea ecx, [ebp - 0xe4]
call fcn.0040da7f
lea eax, [ebp - 0x24]
push eax
push 0xa
lea eax, [ebp - 0xe4]
push eax
push str.AddTask3
lea ecx, [ebp - 0xc]
call fcn.0040d71d
push 9
lea esi, [ebp - 0x44]
pop edi
sub esi, 0x10
push esi
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
dec edi
jns 0x40e025
call fcn.0040129e
push eax
lea ecx, [ebp + 8]
call fcn.004028e5
mov edi, 0x400
lea ecx, [ebp + 8]
push edi
call fcn.00401ad3
mov esi, dword [ebp + 8]
cmp dword [esi - 4], 1
jle 0x40e065
push dword [esi - 0xc]
lea ecx, [ebp + 8]
call fcn.00401c45
mov esi, dword [ebp + 8]
push edi
push esi
push 0x4501cc
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push eax
lea ecx, [ebp + 8]
call fcn.0040606c
call fcn.0040129e
push eax
lea ecx, [ebp + 8]
call fcn.004028e5
push edi
lea ecx, [ebp + 8]
call fcn.00401ad3
mov eax, dword [ebp + 8]
cmp dword [eax - 4], 1
jle 0x40e0a9
push dword [eax - 0xc]
lea ecx, [ebp + 8]
call fcn.00401c45
mov eax, dword [ebp + 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push eax
lea ecx, [ebp + 8]
call fcn.0040606c
mov edi, str.Temp
mov ecx, edi
call fcn.00401bae
push eax
push edi
lea ecx, [ebp + 8]
call fcn.00401a0b
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.004020f3
test al, al
je 0x40e0ec
push edi
push 0x4501cc
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov bl, 1
lea ecx, [ebp - 0x34]
call fcn.0040d690
push 1
lea ecx, [ebp - 0x34]
call fcn.0040dad5
lea eax, [ebp - 0x24]
push eax
push 1
lea eax, [ebp - 0x34]
push eax
push str.CommitTasks2
lea ecx, [ebp - 0xc]
call fcn.0040d71d
test bl, bl
je 0x40e125
push esi
push 0x4501cc
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea eax, [ebp - 0x34]
push eax
call ebx
lea ecx, [edi - 0x10]
call fcn.0040169b
lea ecx, [esi - 0x10]
call fcn.0040169b
lea eax, [ebp - 0x24]
push eax
call ebx
xor ebx, ebx
inc ebx
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x40e157
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov al, bl
lea esp, [ebp - 0x164]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, eax
call fcn.0040167c
int3