Function at 0x4021ac
Capabilities:
Accept command line arguments
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov dword [ebp - 0x28], 0x4080c0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], 0x10000
mov dword [esp + 8], 0x4080c0
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.USER32.dll_LoadStringW]
call eax
sub esp, 0x10
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
test eax, eax
jne 0x402242
cmp dword [ebp - 0x10], 0
jne 0x40221e
mov eax, 0
jmp 0x402857
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], str.Need_a_valid_command_line__Edit_the_string_resources_accordingly_n
mov dword [esp], eax
call sub.msvcrt.dll_fwprintf
mov dword [esp], 1
call sub.msvcrt.dll_exit
mov eax, dword [ebp - 0x3c]
cmp eax, 0xffff
jle 0x402270
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], str.Could_not_read_resource__too_large__n
mov dword [esp], eax
call sub.msvcrt.dll_fwprintf
mov dword [esp], 1
call sub.msvcrt.dll_exit
mov dword [esp + 8], str.MINIMAL_PATH1
lea eax, [ebp - 0x3c]
mov dword [esp + 4], eax
mov dword [esp], 0x4080c0
call fcn.00401d7d
test eax, eax
je 0x402298
mov dword [ebp - 0x14], 1
jmp 0x402270
mov dword [esp + 8], str.ALLOC_CONSOLE1
lea eax, [ebp - 0x3c]
mov dword [esp + 4], eax
mov dword [esp], 0x4080c0
call fcn.00401d7d
test eax, eax
je 0x4022c0
mov dword [ebp - 0x18], 1
jmp 0x402270
mov dword [esp + 8], str.SHOW_CONSOLE1
lea eax, [ebp - 0x3c]
mov dword [esp + 4], eax
mov dword [esp], 0x4080c0
call fcn.00401d7d
test eax, eax
je 0x4022e8
mov dword [ebp - 0x1c], 1
jmp 0x402270
mov dword [esp + 8], str.APP_ID
lea eax, [ebp - 0x3c]
mov dword [esp + 4], eax
mov dword [esp], 0x4080c0
call fcn.00401d7d
test eax, eax
je 0x4023b7
mov dword [esp + 4], 0x20
mov dword [esp], 0x4080c0
call sub.msvcrt.dll_wcschr
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov edx, 0x4080c0
sub eax, edx
sar eax, 1
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x2c], 0
jne 0x402360
mov eax, dword [ebp - 0x3c]
sub eax, 7
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
add eax, eax
mov edx, 0x4080ce
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 0x4080c0
call sub.msvcrt.dll_memmove
jmp 0x4023b8
mov dword [esp], 0x4080c0
call sub.msvcrt.dll__wcsdup
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x30]
lea edx, [eax + eax]
mov eax, dword [ebp - 0x20]
add eax, edx
mov word [eax], 0
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x30]
sub eax, 1
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
lea edx, [eax + eax]
mov eax, dword [ebp - 0x30]
add eax, 1
add eax, eax
add eax, 0x4080c0
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 0x4080c0
call sub.msvcrt.dll_memmove
jmp 0x402270
nop
mov eax, dword [ebp - 0x3c]
mov word [eax + eax + 0x4080c0], 0
cmp dword [ebp - 0x10], 0
jne 0x4023e3
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.EXEPATH
mov eax, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
call eax
sub esp, 8
mov dword [esp + 4], 0x10000
mov dword [esp], 0x4080c0
call fcn.00401eff
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call fcn.00401e21
mov dword [esp + 4], 0
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__waccess]
call eax
cmp eax, 0xffffffff
jne 0x40246d
mov eax, dword [sym.imp.msvcrt.dll__iob]
lea edx, [eax + 0x40]
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Skipping_command_line__s_n__s_not_found__n
mov dword [esp], edx
call sub.msvcrt.dll_fwprintf
cmp dword [ebp - 0x20], 0
je 0x402464
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_free
add dword [ebp - 0x10], 1
jmp 0x4021c0
nop
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x28]
mov dword [eax], edx
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
mov edx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
call eax
mov edx, eax
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
call eax
sub esp, 8
mov dword [ebp - 0x34], eax
mov dword [ebp - 0xc], 1
jmp 0x4027f5
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.__no_cd
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x4024f0
mov eax, dword [ebp + 0x20]
mov dword [eax], 0
jmp 0x4027e9
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.__cd_to_home
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x402523
mov eax, dword [ebp + 0x20]
mov dword [eax], 1
jmp 0x4027e9
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 8], 5
mov dword [esp + 4], eax
mov dword [esp], str.__cd
call sub.msvcrt.dll_wcsncmp
test eax, eax
jne 0x402578
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
add eax, 0xa
mov dword [esp], eax
call sub.msvcrt.dll__wcsdup
mov edx, eax
mov eax, dword [ebp + 0x20]
mov dword [eax], edx
jmp 0x4027e9
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.__minimal_search_path
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x4025a9
mov dword [ebp - 0x14], 1
jmp 0x4027e9
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.__no_minimal_search_path
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x4025da
mov dword [ebp - 0x14], 0
jmp 0x4027e9
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.__needs_console
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x40260b
mov dword [ebp - 0x18], 1
jmp 0x4027e9
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.__no_needs_console
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x40263c
mov dword [ebp - 0x18], 0
jmp 0x4027e9
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.__hide
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x40266d
mov dword [ebp - 0x1c], 0
jmp 0x4027e9
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.__no_hide
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x40269e
mov dword [ebp - 0x1c], 1
jmp 0x4027e9
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 8], 0xa
mov dword [esp + 4], eax
mov dword [esp], str.__command
call sub.msvcrt.dll_wcsncmp
test eax, eax
jne 0x402792
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov edx, dword [ebp - 0xc]
lea ecx, [edx*4]
mov edx, dword [ebp - 0x34]
add edx, ecx
mov edx, dword [edx]
add edx, 0x14
mov dword [eax], edx
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
mov edx, eax
mov eax, dword [ebp - 0xc]
lea ecx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, ecx
mov eax, dword [eax]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00401eff
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
cmp eax, dword [ebp - 0x24]
jne 0x402753
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.msvcrt.dll__wcsdup
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00401e21
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x24]
mov dword [eax], edx
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
mov edx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
mov eax, dword [ebp + 0x28]
mov edx, dword [ebp - 0xc]
mov dword [eax], edx
jmp 0x402804
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 8], 9
mov dword [esp + 4], eax
mov dword [esp], str.__app_id
call sub.msvcrt.dll_wcsncmp
test eax, eax
jne 0x402803
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp - 0x34]
add eax, edx
mov eax, dword [eax]
add eax, 0x12
mov dword [esp], eax
call sub.msvcrt.dll__wcsdup
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x28]
mov edx, dword [ebp - 0xc]
mov dword [eax], edx
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x38]
cmp dword [ebp - 0xc], eax
jl 0x4024bd
jmp 0x402804
nop
cmp dword [ebp - 0x14], 0
je 0x402813
mov eax, dword [ebp + 0x24]
mov dword [eax], 0
cmp dword [ebp - 0x18], 0
je 0x402822
mov eax, dword [ebp + 0x2c]
mov dword [eax], 1
cmp dword [ebp - 0x1c], 0
je 0x402831
mov eax, dword [ebp + 0x30]
mov dword [eax], 1
cmp dword [ebp - 0x20], 0
je 0x402842
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.0040213d
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_LocalFree]
call eax
sub esp, 4
mov eax, 1
leave
ret