Function at 0x405ee0
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
xor esi, esi
push edi
or ebx, 0xffffffff
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0x80000000
neg eax
sbb eax, eax
and eax, 0xfff20000
add eax, 0xfc000
mov dword [0x414fb8], eax
call fcn.0040a520
test eax, eax
jge 0x405f2b
push str._main:_memory_allocation_error_during_startup._r_n
call fcn.004064e0
add esp, 4
call dword [sym.imp.KERNEL32.dll_SetFileApisToOEM]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov cl, byte [eax]
test cl, cl
je 0x405f4f
cmp cl, 0x20
je 0x405f4f
cmp cl, 9
je 0x405f4f
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x405f3d
mov dl, byte [eax]
xor ecx, ecx
cmp dl, 9
mov dword [ebp - 0xc], esi
sete cl
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov edi, dword [ebp - 0x1c]
mov esi, eax
mov al, byte [esi]
test al, al
je 0x40602c
cmp al, 0x7e
jne 0x405f86
inc dword [ebp - 4]
jmp 0x406015
cmp al, 0x3d
jne 0x405f92
inc dword [ebp - 0xc]
jmp 0x406015
push 8
push esi
push str.MKSARGS
call fcn.00409d40
add esp, 0xc
test eax, eax
jne 0x405fe4
push 0x10
lea edx, [esi + 8]
push eax
push edx
call fcn.0040a3d0
add esp, 0xc
mov ebx, eax
push 0
push 0
push 0
push 0xf001f
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
je 0x405fdf
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp eax, dword [edi + 8]
jne 0x405fdf
inc dword [ebp - 8]
jmp 0x406015
or ebx, 0xffffffff
jmp 0x406015
push 5
push esi
push str.PATH
call fcn.00409d40
add esp, 0xc
test eax, eax
jne 0x405ffb
mov dword [ebp - 0x18], esi
push 5
push esi
push str.Path
call fcn.00409d40
add esp, 0xc
test eax, eax
jne 0x406012
mov dword [ebp - 0x1c], esi
inc dword [ebp - 0x10]
push esi
call fcn.00404e10
lea esi, [esi + eax + 1]
add esp, 4
mov al, byte [esi]
test al, al
jne 0x405f7a
mov eax, dword [ebp - 0x18]
xor esi, esi
cmp eax, esi
jne 0x40603c
mov eax, dword [ebp - 0x1c]
cmp eax, esi
je 0x40603f
mov dword [ebp - 0x14], eax
cmp dword [ebp - 8], esi
jne 0x40604c
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
jmp 0x40606c
cmp ebx, 0xffffffff
je 0x4063b3
mov esi, 2
mov dword [ebp - 8], esi
mov ebx, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0
call ebx
or al, 2
push eax
call ebx
cmp esi, 2
jne 0x406077
mov eax, dword [edi + 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x4060a8
mov ecx, eax
lea edx, [ecx*4 + 4]
push edx
call fcn.00404c40
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [ebp - 0x1c], ebx
jne 0x4060ab
push str._main:_memory_allocation_error_during_startup._r_n
call fcn.004064e0
add esp, 4
jmp 0x4060ab
mov ebx, dword [ebp - 0x1c]
cmp dword [ebp - 8], 2
jne 0x4060d9
mov esi, dword [ebp - 4]
add edi, 0x14
test esi, esi
jle 0x4060d9
push edi
call fcn.00408240
add esp, 4
mov dword [ebx], eax
add ebx, 4
push edi
call fcn.00404e10
add esp, 4
dec esi
lea edi, [edi + eax + 1]
jne 0x4060bb
mov eax, dword [ebp - 0xc]
lea ecx, [eax*4 + 4]
push ecx
call fcn.00404c40
add esp, 4
mov dword [ebp - 0xc], eax
test eax, eax
mov dword [0x414fd0], eax
jne 0x406105
push str._main:_memory_allocation_error_during_startup._r_n
call fcn.004064e0
add esp, 4
mov edx, dword [ebp - 0x10]
lea eax, [edx*4 + 4]
push eax
call fcn.00404c40
mov edi, eax
add esp, 4
test edi, edi
mov dword [0x414fec], edi
mov dword [0x414fd8], edi
jne 0x406137
push str._main:_memory_allocation_error_during_startup._r_n
call fcn.004064e0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
mov al, byte [esi]
test al, al
je 0x4061e6
cmp al, 0x7e
jne 0x40616a
cmp dword [ebp - 8], 1
jne 0x4061cf
lea ecx, [esi + 1]
push ecx
call fcn.00408240
mov dword [ebx], eax
add esp, 4
add ebx, 4
test eax, eax
jne 0x4061cf
jmp 0x4061c2
cmp al, 0x3d
jne 0x406188
push esi
call fcn.00408240
mov ecx, dword [ebp - 0xc]
add esp, 4
mov dword [ecx], eax
add ecx, 4
test eax, eax
mov dword [ebp - 0xc], ecx
jne 0x4061cf
jmp 0x4061c2
push 8
push esi
push str.MKSARGS
call fcn.00409d40
add esp, 0xc
test eax, eax
je 0x4061cf
push 5
push esi
push str.path
call fcn.0040a360
add esp, 0xc
test eax, eax
je 0x4061cf
push esi
call fcn.00408240
mov dword [edi], eax
add esp, 4
add edi, 4
test eax, eax
jne 0x4061cf
push str._main:_memory_allocation_error_during_startup._r_n
call fcn.004064e0
add esp, 4
push esi
call fcn.00404e10
lea esi, [esi + eax + 1]
add esp, 4
mov al, byte [esi]
test al, al
jne 0x406149
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x406220
push eax
call fcn.00408240
add esp, 4
mov dword [edi], eax
test eax, eax
jne 0x406209
push str._main:_memory_allocation_error_during_startup._r_n
call fcn.004064e0
add esp, 4
mov edx, dword [edi]
add edi, 4
mov byte [edx + 1], 0x41
mov eax, dword [edi - 4]
mov byte [eax + 2], 0x54
mov ecx, dword [edi - 4]
mov byte [ecx + 3], 0x48
mov esi, dword [ebp - 4]
test esi, esi
je 0x40622d
mov dword [ebx], 0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
test eax, eax
mov dword [edx], 0
mov dword [edi], 0
jne 0x406377
push 0x20
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x20], 8
call fcn.00404c40
add esp, 4
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x406276
push str._main:_memory_allocation_error_during_startup._r_n
call fcn.004064e0
mov eax, dword [ebp - 0x2c]
add esp, 4
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
mov edi, esi
xor edx, edx
mov dword [ebp - 0x14], edx
xor eax, eax
mov al, byte [edi]
cmp eax, 0x20
je 0x40629d
cmp eax, 9
jne 0x4062a0
inc edi
jmp 0x40628f
mov al, byte [edi]
test al, al
je 0x40634d
and eax, 0xff
mov dword [ebp - 0x1c], esi
je 0x406302
lea ecx, [eax - 9]
inc edi
cmp ecx, 0x53
ja case.0x4062c5.17
xor ebx, ebx
mov bl, byte [ecx + 0x4063f4]
jmp dword [ebx*4 + 0x4063d0]
test edx, edx
je 0x406302
jmp case.0x4062c5.17
test edx, edx
jne 0x4062da
mov edx, eax
jmp 0x4062fa
cmp eax, edx
jne case.0x4062c5.17
xor edx, edx
jmp 0x4062fa
cmp edx, 0x22
jne case.0x4062c5.17
cmp byte [edi], dl
jne case.0x4062c5.17
mov eax, edx
inc edi
jmp case.0x4062c5.17
test edx, edx
jne case.0x4062c5.17
inc dword [ebp - 0x14]
mov byte [esi], al
inc esi
xor eax, eax
mov al, byte [edi]
test eax, eax
jne 0x4062b4
mov eax, dword [ebp - 0x14]
mov byte [esi], 0
inc esi
test eax, eax
je 0x406323
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x30]
push eax
push 0
push 0x28
push ecx
call fcn.00409e00
add esp, 0x10
jmp 0x406333
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x30]
push edx
push eax
call fcn.00406450
add esp, 8
test eax, eax
je 0x40628a
push str._main:_memory_allocation_error_during_startup._r_n
call fcn.004064e0
add esp, 4
jmp 0x40628a
lea ecx, [ebp - 0x30]
push 0
push ecx
call fcn.00406450
add esp, 8
test eax, eax
je 0x40636c
push str._main:_memory_allocation_error_during_startup._r_n
call fcn.004064e0
add esp, 4
mov edx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x2c]
lea esi, [edx - 1]
jmp 0x40637a
mov edi, dword [ebp - 0x1c]
mov eax, dword [0x41048c]
test eax, eax
je 0x406389
call eax
test eax, eax
je 0x4063a2
mov eax, dword [0x414fd8]
push eax
push edi
push esi
call section..text
add esp, 0xc
push eax
call fcn.004059e0
add esp, 4
push 1
call fcn.004059e0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 4], esi
je 0x4063c5
mov esi, 1
mov dword [ebp - 8], esi
jmp 0x40605d
mov dword [ebp - 8], esi
jmp 0x40606c