Function at 0x401390
Capabilities:
Accept command line arguments
Check if file exists
Create process on windows
Read .ini file
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3ac
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x3a8], eax
push ebx
push esi
push edi
xor ebx, ebx
push 0x103
lea eax, [esp + 0x2ad]
push ebx
push eax
mov byte [esp + 0x2b4], bl
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x104
lea ecx, [esp + 0x2ac]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x2a8]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov esi, dword [sym.imp.MSVCR80.dll_strncat]
push 0xf
lea eax, [esp + 0x2ac]
push str.QDeskPath.ini
push eax
call esi
add esp, 0xc
push 0x123
lea ecx, [esp + 0x185]
push ebx
push ecx
mov byte [esp + 0x18c], bl
call sub.MSVCR80.dll_memset
add esp, 0xc
lea edx, [esp + 0x2a8]
push edx
push 0x104
lea eax, [esp + 0x188]
push eax
push ebx
push str.path
push str.config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
lea ecx, [esp + 0x180]
push ecx
call edi
test eax, eax
jne 0x401483
lea edx, [esp + 0x180]
push edx
call section..text
add esp, 4
push 0xa
lea eax, [esp + 0x184]
push str.QDesk.exe
push eax
call esi
add esp, 0xc
lea ecx, [esp + 0x180]
push ecx
call edi
test eax, eax
jne 0x4014ba
call fcn.00401250
lea edx, [esp + 0x180]
push edx
call section..text
add esp, 4
push 0xa
push str.QDesk.exe
lea eax, [esp + 0x188]
push eax
jmp 0x401553
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push 0x104
lea ecx, [esp + 0x6d]
push ebx
push ecx
mov edi, eax
mov byte [esp + 0x74], bl
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x104
lea edx, [esp + 0x6c]
push edi
push edx
call dword [sym.imp.MSVCR80.dll_strncpy]
lea eax, [esp + 0x74]
add esp, 0xc
push eax
call dword [sym.imp.MSVCR80.dll__strlwr]
add esp, 4
lea ecx, [esp + 0x68]
push str.showimportwizard
push ecx
call dword [sym.imp.MSVCR80.dll_strstr]
add esp, 8
test eax, eax
je 0x401558
lea edx, [esp + 0x2a8]
push edx
push ebx
push 0x402130
push str.config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
jne 0x401558
call fcn.00401250
lea eax, [esp + 0x180]
push eax
call section..text
add esp, 4
push 0xa
push str.QDesk.exe
lea ecx, [esp + 0x188]
push ecx
call esi
add esp, 0xc
lea edx, [esp + 0x180]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401645
xor eax, eax
push 0x44
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x24]
push ebx
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [esp + 0xc]
mov edi, 1
push ecx
mov dword [esp + 0x24], 0x44
mov word [esp + 0x54], 5
mov dword [esp + 0x50], edi
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
cmp dword [esp + 0xc], edi
mov esi, eax
jle 0x4015e2
push str..exe_
push esi
call dword [sym.imp.MSVCR80.dll_strstr]
add esp, 8
cmp eax, ebx
je 0x4015e2
lea esi, [eax + 5]
push 0x113
lea edx, [esp + 0x6d]
push ebx
push edx
mov byte [esp + 0x74], bl
call sub.MSVCR80.dll_memset
add esp, 0xc
push esi
push 0x4020e0
lea eax, [esp + 0x188]
push eax
push 0x4020e0
push str._s_s_s_s
lea ecx, [esp + 0x7c]
push 0x113
push ecx
call dword [sym.imp.MSVCR80.dll__snprintf]
add esp, 0x1c
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x24]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x88]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
jmp 0x40164a
call fcn.00401120
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]