Function at 0x401ed7
Capabilities:
Get common file path
Query environment variable
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x411610]
xor eax, dword [ebp + 4]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
push esi
mov dword [ebp - 4], eax
xor bl, bl
call fcn.0040752d
mov edi, eax
test edi, edi
pop ecx
mov dword [ebp - 0x18], edi
jne 0x401f0a
xor al, al
jmp 0x40215c
push esi
push 0
push edi
call fcn.00407080
push esi
push 0
push dword [ebp + 0xc]
call fcn.00407080
add esp, 0x18
push dword [ebp + 8]
push esi
push edi
push 0x40e34f
push str.TARGET
push str.autorun
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x402153
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x402007
push 0x25
push edi
call fcn.004072a0
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 8], eax
push edi
je 0x401fe8
and byte [eax], 0
call esi
push dword [ebp + 0xc]
mov ebx, eax
call esi
add ebx, eax
cmp ebx, dword [ebp + 0x10]
jg 0x401f81
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, dword [ebp - 8]
inc edi
push 0x25
push edi
call fcn.004072a0
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
je 0x401f99
and byte [eax], 0
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x11c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
mov dword [ebp - 0xc], eax
je 0x401fd1
push dword [ebp + 0xc]
call esi
add eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x10]
ja 0x401fd1
lea eax, [ebp - 0x11c]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp - 0x10], 0
je 0x401fdc
mov edi, dword [ebp - 0x10]
jmp 0x401fe5
push edi
call esi
add dword [ebp - 8], eax
mov edi, dword [ebp - 8]
inc edi
jmp 0x40200c
call esi
push dword [ebp + 0xc]
mov ebx, eax
call esi
add ebx, eax
cmp ebx, dword [ebp + 0x10]
jg 0x402002
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push edi
call esi
add edi, eax
mov ebx, 0x104
cmp byte [edi], 0
jne 0x401f4e
mov edi, dword [ebp + 0xc]
cmp byte [edi], 0x5b
jne 0x40214e
push 0x5d
push edi
call fcn.004072a0
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
je 0x40214e
and byte [eax], 0
push ebx
lea eax, [ebp - 0x11c]
push 0
push eax
call fcn.00407080
add esp, 0xc
lea eax, [edi + 1]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push str.ProgramFilesFolder
push eax
mov dword [ebp - 0xc], eax
call edi
test eax, eax
jne 0x4020c5
push ebx
lea eax, [ebp - 0x11c]
push eax
push str.PROGRAMFILES
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x402104
lea eax, [ebp - 8]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
mov dword [ebp - 0x10], 1
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40214e
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push str.ProgramFilesDir
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
jmp 0x402104
push str.WindowsVolume
push dword [ebp - 0xc]
call edi
test eax, eax
jne 0x40214e
push ebx
lea eax, [ebp - 0x11c]
push eax
push str.SYSTEMDRIVE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x402104
push ebx
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp eax, 3
jbe 0x40214e
and byte [ebp - 0x11a], 0
mov eax, dword [ebp - 0x14]
inc eax
push eax
mov dword [ebp - 0x14], eax
call esi
mov edi, eax
lea eax, [ebp - 0x11c]
push eax
call esi
add edi, eax
cmp edi, ebx
jae 0x402130
push dword [ebp - 0x14]
lea eax, [ebp - 0x11c]
push eax
call fcn.004018ba
pop ecx
pop ecx
lea eax, [ebp - 0x11c]
push eax
call esi
cmp eax, dword [ebp + 0x10]
jg 0x40214e
lea eax, [ebp - 0x11c]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [ebp - 0x18]
mov bl, 1
push edi
call fcn.00407528
pop ecx
mov al, bl
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
pop ebx
call fcn.00407111
leave
ret