Function at 0x401f18
Capabilities:
Accept command line arguments
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x40400c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - reloc.KERNEL32.dll_HeapAlloc], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - reloc.KERNEL32.dll_HeapAlloc], eax
xor eax, eax
mov esi, ecx
xor ecx, ecx
push 0x206
mov word [ebp - 0x20c], ax
push ecx
lea eax, reloc.KERNEL32.dll_HeapAlloc
push eax
mov dword [ebp - reloc.KERNEL32.dll_HeapAlloc], ecx
mov edi, ecx
mov dword [ebp - reloc.KERNEL32.dll_HeapAlloc], ecx
mov ebx, ecx
call sub.msvcrt.dll_memset
mov eax, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
xor edx, edx
mov dword [eax], edx
mov eax, dword [ecx]
add eax, eax
push eax
push edx
push dword [ecx + 4]
call sub.msvcrt.dll_memset
mov eax, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
xor ecx, ecx
add esp, 0x18
mov dword [eax], ecx
lea eax, reloc.KERNEL32.dll_HeapAlloc
push eax
push esi
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
mov dword [ebp - reloc.KERNEL32.dll_HeapAlloc], esi
test esi, esi
je 0x4021a1
cmp dword [ebp - reloc.KERNEL32.dll_HeapAlloc], ebx
jle 0x402187
cmp dword [ebp - reloc.KERNEL32.dll_HeapAlloc], 1
jne 0x401fe2
mov ebx, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
xor eax, eax
mov dword [ebx], reloc.KERNEL32.dll_HeapAlloc
jmp 0x40218d
push 6
push 0x401258
push dword [esi + 4]
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x402044
mov edx, dword [esi + 4]
add edx, 0xc
mov ecx, edx
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x21c]
jne 0x402001
sub ecx, ebx
sar ecx, 1
je 0x402187
push dword [ebp - 0x220]
call fcn.00401674
mov ebx, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
js 0x40218d
xor eax, eax
mov dword [ebx], 0x20
mov edi, eax
jmp 0x40218d
mov eax, esi
mov ecx, dword [eax + 4]
cmp word [ecx], 0x2f
mov dword [ebp - reloc.KERNEL32.dll_HeapAlloc], ecx
mov edi, 0x8000ffff
je 0x4020ab
mov eax, ecx
lea ecx, reloc.KERNEL32.dll_HeapAlloc
call fcn.004015c5
mov eax, esi
push dword [eax + 4]
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov ebx, eax
xor eax, eax
mov esi, eax
push dword [esi*8 + 0x401300]
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x402095
inc esi
cmp esi, 4
jb 0x402078
jmp 0x402181
mov ecx, dword [esi*8 + reloc.KERNEL32.dll_HeapAlloc]
mov eax, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
mov ebx, dword [eax + 4]
mov dword [ebp - reloc.KERNEL32.dll_HeapAlloc], ecx
xor eax, eax
mov esi, eax
mov dword [ebp - reloc.KERNEL32.dll_HeapAlloc], eax
push dword [eax + 0x401320]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x4020e8
mov eax, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
add eax, 0xc
inc esi
mov dword [ebp - reloc.KERNEL32.dll_HeapAlloc], eax
cmp eax, 0x9c
jb 0x4020b5
jmp 0x402181
mov ecx, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
imul esi, esi, 0xc
mov eax, dword [esi + reloc.KERNEL32.dll_HeapAlloc]
mov dword [ecx], eax
mov eax, dword [esi + reloc.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x4021f1
test ebx, ebx
jne 0x402126
cmp eax, 1
jne 0x4021b4
cmp dword [ebp - reloc.KERNEL32.dll_HeapAlloc], 2
jne 0x4021b4
mov ebx, 0x401530
mov eax, ebx
lea ecx, reloc.KERNEL32.dll_HeapAlloc
call fcn.004015c5
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, reloc.KERNEL32.dll_HeapAlloc
push eax
call edi
cmp eax, reloc.KERNEL32.dll_HeapAlloc
jne 0x40216f
cmp dword [esi + reloc.KERNEL32.dll_HeapAlloc], 1
jne 0x40217c
lea eax, reloc.KERNEL32.dll_HeapAlloc
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x40217c
lea eax, reloc.KERNEL32.dll_HeapAlloc
push eax
call edi
cmp eax, reloc.KERNEL32.dll_HeapAlloc
je 0x40217c
test al, 0x10
je 0x4021da
cmp dword [esi + reloc.KERNEL32.dll_HeapAlloc], 1
je 0x4021da
mov edi, 0x80070057
mov esi, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
mov ebx, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
jns 0x4021a1
xor edi, edi
mov dword [ebx], reloc.KERNEL32.dll_HeapAlloc
inc edi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402bf4
leave
ret 8
cmp dword [ebp - reloc.KERNEL32.dll_HeapAlloc], 3
jb 0x4021cb
mov eax, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
mov ebx, dword [eax + 8]
jmp 0x402126
mov esi, dword [ebp - reloc.KERNEL32.dll_HeapAlloc]
mov edi, 0x80070057
mov ebx, ecx
jmp 0x40218d
push dword [ebp - 0x220]
lea edx, reloc.KERNEL32.dll_HeapAlloc
call fcn.00401674
mov edi, eax
test edi, edi
js 0x402181
xor eax, eax
mov edi, eax
jmp 0x402181