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 - 0x1fa0]
mov eax, 0x2020
call fcn.00403370
mov eax, dword [0x406004]
xor eax, ebp
mov dword [ebp + 0x1f9c], eax
and dword [ebp - 0x68], 0
and dword [ebp - 0x6c], 0
push ebx
push esi
mov esi, dword [ebp + 0x1fa8]
push edi
push 0x1000
lea eax, [ebp - 0x64]
push eax
push esi
mov dword [ebp - 0x78], 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 - 0x78]
lea eax, [ebp + 0xf9c]
push eax
push dword [ebp - 0x6c]
lea eax, [ebp - 0x64]
push 0x40443c
push eax
call fcn.0040112c
add esp, 0x10
inc dword [ebp - 0x6c]
test byte [ebp - 0x6c], 1
mov dword [ebp - 0x7c], eax
jne 0x401541
cmp byte [ebp + 0xf9c], 0
lea eax, [ebp + 0xf9c]
jne 0x401353
push 0x404438
jmp 0x4013f6
push str.startmenu
push eax
call edi
test eax, eax
lea eax, [ebp + 0xf9c]
jne 0x40136d
push eax
push str.Programs
jmp 0x4013d3
push str.desktop
push eax
call edi
test eax, eax
lea eax, [ebp + 0xf9c]
jne 0x401387
push eax
push str.Desktop
jmp 0x4013d3
push str.sendto
push eax
call edi
test eax, eax
lea eax, [ebp + 0xf9c]
jne 0x4013a1
push eax
push str.SendTo
jmp 0x4013d3
push str.favorites
push eax
call edi
test eax, eax
lea eax, [ebp + 0xf9c]
jne 0x4013bb
push eax
push str.Favorites
jmp 0x4013d3
push str.startup
push eax
call edi
test eax, eax
lea eax, [ebp + 0xf9c]
jne 0x4013df
push eax
push str.Startup
call fcn.00401220
pop ecx
pop ecx
jmp 0x401541
push str.targetdir
push eax
call edi
test eax, eax
lea eax, [ebp + 0xf9c]
jne 0x401402
push 0x409c00
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x401541
push str.curdir
push eax
call edi
test eax, eax
lea eax, [ebp + 0xf9c]
jne 0x401425
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
jmp 0x401541
push str.quicklaunch
push eax
call edi
test eax, eax
lea eax, [ebp + 0xf9c]
jne 0x40148b
push eax
push str.AppData
call fcn.00401220
cmp byte [ebp + 0xf9c], 0
pop ecx
pop ecx
je 0x40145f
push str.MicrosoftInternet_ExplorerQuick_Launch
lea eax, [ebp + 0xf9c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp + 0xf9c]
push eax
call fcn.0040120a
pop ecx
test eax, eax
jne 0x401541
lea eax, [ebp + 0xf9c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp 0x401541
push str.programfiles
push eax
call edi
test eax, eax
lea eax, [ebp + 0xf9c]
jne 0x401500
push str.C:Program_Files
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x70]
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401541
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp + 0xf9c]
push eax
lea eax, [ebp - 0x80]
push eax
push 0
push str.ProgramFilesDir
push dword [ebp - 0x70]
mov dword [ebp - 0x74], 0x104
mov dword [ebp - 0x80], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x70]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401541
push str.sysdir
push eax
call edi
test eax, eax
lea eax, [ebp + 0xf9c]
jne 0x401520
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x401541
push str.cmdline
push eax
call edi
test eax, eax
jne 0x401541
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
lea eax, [ebp + 0xf9c]
push eax
call ebx
mov eax, dword [ebp - 0x68]
add esi, eax
mov eax, dword [ebp + 0x1fac]
sub eax, dword [ebp - 0x68]
push eax
lea eax, [ebp + 0xf9c]
push eax
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x7c]
cmp byte [eax], 0
jne 0x40130c
mov ecx, dword [ebp + 0x1f9c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403355
add ebp, 0x1fa0
leave
ret