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 - 0x20c8]
mov eax, 0x2148
call fcn.004059f0
mov eax, dword [0x40806c]
xor eax, ebp
mov dword [ebp + 0x20c4], eax
mov eax, dword [ebp + 0x20d0]
and dword [ebp - 0x48], 0
and dword [ebp - 0x4c], 0
push ebx
push esi
push edi
push 0x1000
lea ecx, [ebp - 0x40]
push ecx
push eax
mov dword [ebp - 0x5c], eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ebx, 0x104
lea eax, [ebp + 0xfc0]
push eax
push dword [ebp - 0x4c]
lea eax, [ebp - 0x40]
push 0x4064cc
push eax
call fcn.0040112c
add esp, 0x10
inc dword [ebp - 0x4c]
test byte [ebp - 0x4c], 1
mov dword [ebp - 0x60], eax
jne 0x401712
cmp byte [ebp + 0xfc0], 0
lea eax, [ebp + 0xfc0]
jne 0x40134d
push 0x4064c8
jmp 0x4013f6
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push str.startmenu
push eax
call esi
test eax, eax
lea eax, [ebp + 0xfc0]
jne 0x40136d
push eax
push str.Programs
jmp 0x4013d3
push str.desktop
push eax
call esi
test eax, eax
lea eax, [ebp + 0xfc0]
jne 0x401387
push eax
push str.Desktop
jmp 0x4013d3
push str.sendto
push eax
call esi
test eax, eax
lea eax, [ebp + 0xfc0]
jne 0x4013a1
push eax
push str.SendTo
jmp 0x4013d3
push str.favorites
push eax
call esi
test eax, eax
lea eax, [ebp + 0xfc0]
jne 0x4013bb
push eax
push str.Favorites
jmp 0x4013d3
push str.startup
push eax
call esi
test eax, eax
lea eax, [ebp + 0xfc0]
jne 0x4013df
push eax
push str.Startup
call fcn.00401220
pop ecx
pop ecx
jmp 0x401712
push str.targetdir
push eax
call esi
test eax, eax
lea eax, [ebp + 0xfc0]
jne 0x401402
push 0x40bc60
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x401712
push str.curdir
push eax
call esi
test eax, eax
lea eax, [ebp + 0xfc0]
jne 0x401421
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
jmp 0x401712
push str.quicklaunch
push eax
call esi
test eax, eax
lea eax, [ebp + 0xfc0]
jne 0x401483
push eax
push str.AppData
call fcn.00401220
cmp byte [ebp + 0xfc0], 0
pop ecx
pop ecx
je 0x40145b
push str.MicrosoftInternet_ExplorerQuick_Launch
lea eax, [ebp + 0xfc0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp + 0xfc0]
push eax
call fcn.0040120a
pop ecx
test eax, eax
jne 0x401712
lea eax, [ebp + 0xfc0]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp 0x401712
push str.programfiles
push eax
call esi
test eax, eax
lea eax, [ebp + 0xfc0]
jne 0x4014f5
push str.C:Program_Files
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x58]
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401712
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp + 0xfc0]
push eax
lea eax, [ebp - 0x54]
push eax
push 0
push str.ProgramFilesDir
push dword [ebp - 0x58]
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x54], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x58]
jmp 0x40170c
push str.sysdir
push eax
call esi
test eax, eax
lea eax, [ebp + 0xfc0]
jne 0x401514
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x401712
push str.cmdline
push eax
call esi
test eax, eax
jne 0x40153a
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
lea eax, [ebp + 0xfc0]
push eax
call edi
jmp 0x401712
push str.dialogplacement
lea eax, [ebp + 0xfc0]
push eax
call esi
test eax, eax
jne 0x4015aa
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
lea eax, [ebp - 0x80]
push eax
push dword [0x408080]
call dword [sym.imp.USER32.dll_GetWindowRect]
lea eax, [ebp - 0x70]
push eax
push dword [0x408080]
call dword [sym.imp.USER32.dll_GetClientRect]
push dword [ebp - 0x64]
lea eax, [ebp + 0xfc0]
push dword [ebp - 0x68]
push dword [ebp - 0x7c]
push dword [ebp - 0x80]
push str.dialogLeft:_dpx_dialogTop:_dpx_dialogWidth:_dpx_dialogHeight:_dpx
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
jmp 0x401712
lea eax, [ebp + 0xfc0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, ebx
jae 0x401712
push 0xa
lea eax, [ebp + 0xfc0]
push eax
lea eax, [ebp + 0x1fc0]
push eax
call edi
test eax, eax
je 0x401712
push str.registry:
lea eax, [ebp + 0x1fc0]
push eax
call esi
test eax, eax
jne 0x401712
push 6
lea eax, [ebp + 0xfc9]
push eax
lea eax, [ebp + 0x1fc0]
push eax
call edi
test eax, eax
je 0x401620
push str.HKCR_
lea eax, [ebp + 0x1fc0]
push eax
call esi
test eax, eax
jne 0x401620
mov dword [ebp - 0x44], 0x80000000
jmp 0x401686
push 6
lea eax, [ebp + 0xfc9]
push eax
lea eax, [ebp + 0x1fc0]
push eax
call edi
test eax, eax
je 0x401651
push str.HKCU_
lea eax, [ebp + 0x1fc0]
push eax
call esi
test eax, eax
jne 0x401651
mov dword [ebp - 0x44], 0x80000001
jmp 0x401686
push 6
lea eax, [ebp + 0xfc9]
push eax
lea eax, [ebp + 0x1fc0]
push eax
call edi
test eax, eax
je 0x401682
push str.HKLM_
lea eax, [ebp + 0x1fc0]
push eax
call esi
test eax, eax
jne 0x401682
mov dword [ebp - 0x44], 0x80000002
jmp 0x401686
and dword [ebp - 0x44], 0
lea eax, [ebp + 0x1fc0]
push eax
push 0
mov esi, 0x406324
lea eax, [ebp + 0xfc0]
push esi
push eax
call fcn.0040112c
add esp, 0x10
cmp dword [ebp - 0x44], 0
je 0x401712
lea eax, [ebp - 0x44]
push eax
push 0x20019
push 0
lea eax, [ebp + 0x1fce]
push eax
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401712
inc eax
lea ecx, [ebp + 0x1fc0]
push ecx
push eax
mov dword [ebp - 0x50], eax
lea eax, [ebp + 0xfc0]
push esi
push eax
mov dword [ebp - 0x54], ebx
call fcn.0040112c
add esp, 0x10
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp + 0xfc0]
push eax
lea eax, [ebp - 0x50]
push eax
push 0
lea eax, [ebp + 0x1fc0]
push eax
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x5c]
lea esi, [eax + ecx]
mov eax, dword [ebp + 0x20d4]
sub eax, ecx
push eax
lea eax, [ebp + 0xfc0]
push eax
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x60]
cmp byte [eax], 0
jne 0x401309
mov ecx, dword [ebp + 0x20c4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004059de
add ebp, 0x20c8
leave
ret