Function at 0x4012bb
Capabilities:
Accept command line arguments
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x1fc0]
mov eax, 0x2040
call fcn.004033e0
mov eax, dword [0x406004]
xor eax, ebp
mov dword [ebp + 0x1fbc], eax
and dword [ebp - 0x48], 0
and dword [ebp - 0x4c], 0
push ebx
push esi
mov esi, dword [ebp + 0x1fc8]
push edi
push 0x1000
lea eax, [ebp - 0x44]
push eax
push esi
mov dword [ebp - 0x5c], esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpynA]
jmp 0x40130f
mov esi, dword [ebp - 0x5c]
lea eax, [ebp + 0xfbc]
push eax
push dword [ebp - 0x4c]
lea eax, [ebp - 0x44]
push 0x40449c
push eax
call fcn.0040112c
add esp, 0x10
inc dword [ebp - 0x4c]
test byte [ebp - 0x4c], 1
mov dword [ebp - 0x58], eax
jne 0x4015b8
cmp byte [ebp + 0xfbc], 0
lea eax, [ebp + 0xfbc]
jne 0x401353
push 0x404498
jmp 0x4013f6
push str.startmenu
push eax
call edi
test eax, eax
lea eax, [ebp + 0xfbc]
jne 0x40136d
push eax
push str.Programs
jmp 0x4013d3
push str.desktop
push eax
call edi
test eax, eax
lea eax, [ebp + 0xfbc]
jne 0x401387
push eax
push str.Desktop
jmp 0x4013d3
push str.sendto
push eax
call edi
test eax, eax
lea eax, [ebp + 0xfbc]
jne 0x4013a1
push eax
push str.SendTo
jmp 0x4013d3
push str.favorites
push eax
call edi
test eax, eax
lea eax, [ebp + 0xfbc]
jne 0x4013bb
push eax
push str.Favorites
jmp 0x4013d3
push str.startup
push eax
call edi
test eax, eax
lea eax, [ebp + 0xfbc]
jne 0x4013df
push eax
push str.Startup
call fcn.00401220
pop ecx
pop ecx
jmp 0x4015b8
push str.targetdir
push eax
call edi
test eax, eax
lea eax, [ebp + 0xfbc]
jne 0x401402
push 0x409c00
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x4015b8
push str.curdir
push eax
call edi
test eax, eax
lea eax, [ebp + 0xfbc]
jne 0x401425
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
jmp 0x4015b8
push str.quicklaunch
push eax
call edi
test eax, eax
lea eax, [ebp + 0xfbc]
jne 0x40148b
push eax
push str.AppData
call fcn.00401220
cmp byte [ebp + 0xfbc], 0
pop ecx
pop ecx
je 0x40145f
push str.MicrosoftInternet_ExplorerQuick_Launch
lea eax, [ebp + 0xfbc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp + 0xfbc]
push eax
call fcn.0040120a
pop ecx
test eax, eax
jne 0x4015b8
lea eax, [ebp + 0xfbc]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp 0x4015b8
push str.programfiles
push eax
call edi
test eax, eax
lea eax, [ebp + 0xfbc]
jne 0x401507
push str.C:Program_Files
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x50]
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4015b8
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp + 0xfbc]
push eax
lea eax, [ebp - 0x54]
push eax
push 0
push str.ProgramFilesDir
push dword [ebp - 0x50]
mov dword [ebp - 0x60], 0x104
mov dword [ebp - 0x54], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x50]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4015b8
push str.sysdir
push eax
call edi
test eax, eax
lea eax, [ebp + 0xfbc]
jne 0x40152a
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x4015b8
push str.cmdline
push eax
call edi
test eax, eax
jne 0x40154d
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
lea eax, [ebp + 0xfbc]
push eax
call ebx
jmp 0x4015b8
push str.dialogplacement
lea eax, [ebp + 0xfbc]
push eax
call edi
test eax, eax
jne 0x4015b8
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x70]
push eax
push dword [0x406020]
call dword [sym.imp.USER32.dll_GetWindowRect]
lea eax, [ebp - 0x80]
push eax
push dword [0x406020]
call dword [sym.imp.USER32.dll_GetClientRect]
push dword [ebp - 0x74]
lea eax, [ebp + 0xfbc]
push dword [ebp - 0x78]
push dword [ebp - 0x6c]
push dword [ebp - 0x70]
push str.dialogLeft:_dpx_dialogTop:_dpx_dialogWidth:_dpx_dialogHeight:_dpx
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
mov eax, dword [ebp - 0x48]
add esi, eax
mov eax, dword [ebp + 0x1fcc]
sub eax, dword [ebp - 0x48]
push eax
lea eax, [ebp + 0xfbc]
push eax
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x58]
cmp byte [eax], 0
jne 0x40130c
mov ecx, dword [ebp + 0x1fbc]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004033d1
add ebp, 0x1fc0
leave
ret