Function at 0x402739
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 [0x404034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x21c], eax
mov esi, ecx
xor eax, eax
mov dword [ebp - 0x214], edx
push 0x208
push eax
mov edi, eax
mov dword [ebp - 0x218], eax
mov ebx, eax
lea eax, [ebp - 0x20c]
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x214]
xor edx, edx
mov ecx, dword [ebp - 0x21c]
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 - 0x21c]
add esp, 0x18
xor ecx, ecx
mov dword [eax], ecx
lea eax, [ebp - 0x218]
push eax
push esi
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x210], eax
test eax, eax
je 0x4028c1
cmp dword [ebp - 0x218], ebx
jle 0x4028a7
cmp dword [ebp - 0x218], 1
jne 0x4027ef
mov ebx, dword [ebp - 0x214]
xor ecx, ecx
mov dword [ebx], 0x1000
jmp 0x4028ad
push 6
push 0x401428
push dword [eax + 4]
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
mov ecx, dword [ebp - 0x210]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x224], ecx
test eax, eax
jne 0x402857
add ecx, 0xc
xor ebx, ebx
mov edx, ecx
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, bx
jne 0x40281c
sub edx, esi
sar edx, 1
je 0x4028a1
push ecx
mov ecx, dword [ebp - 0x21c]
call fcn.00401c72
mov ebx, dword [ebp - 0x214]
mov edi, eax
test edi, edi
js 0x40284f
xor eax, eax
mov dword [ebx], 0x20
mov edi, eax
mov eax, dword [ebp - 0x210]
jmp 0x4028ad
cmp word [ecx], 0x2f
mov edi, 0x8000ffff
je 0x4028ea
push ecx
push ecx
push ecx
lea ecx, [ebp - 0x20c]
call fcn.00401b60
mov eax, dword [ebp - 0x210]
push dword [eax + 4]
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov ebx, eax
xor eax, eax
mov esi, eax
push dword [esi*8 + 0x401008]
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x4028d4
inc esi
cmp esi, 4
jb 0x402889
mov eax, dword [ebp - 0x210]
mov ebx, dword [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
jns 0x4028c1
xor edi, edi
mov dword [ebx], 0x2000
inc edi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403480
leave
ret 4
mov eax, dword [ebp - 0x210]
mov ecx, dword [esi*8 + 0x40100c]
mov dword [ebp - 0x224], ecx
mov ebx, dword [eax + 4]
xor edx, edx
mov dword [ebp - 0x220], edx
mov esi, edx
push dword [esi + 0x401028]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x40291e
inc dword [ebp - 0x220]
add esi, 0xc
mov ecx, dword [ebp - 0x224]
cmp esi, 0x9c
jb 0x4028f4
jmp 0x4028a1
imul esi, dword [ebp - 0x220], 0xc
mov ecx, dword [ebp - 0x214]
mov eax, dword [esi + 0x401030]
mov dword [ecx], eax
mov eax, dword [esi + 0x40102c]
test eax, eax
je 0x4029f7
test ebx, ebx
jne 0x402958
cmp eax, 1
jne 0x4029ae
cmp dword [ebp - 0x218], 2
jne 0x4029ae
mov ebx, 0x401418
push ecx
push ebx
push ecx
lea ecx, [ebp - 0x20c]
call fcn.00401b60
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4029ce
cmp dword [esi + 0x40102c], 1
jne 0x4029a4
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x4029a4
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4029ce
mov edi, 0x80070057
jmp 0x4028a1
cmp dword [ebp - 0x218], 3
mov eax, dword [ebp - 0x210]
jb 0x4029c2
mov ebx, dword [eax + 8]
jmp 0x402958
mov edi, 0x80070057
mov ebx, ecx
jmp 0x4028ad
test al, 0x10
je 0x4029db
cmp dword [esi + 0x40102c], 1
jne 0x4029a4
mov ecx, dword [ebp - 0x21c]
lea eax, [ebp - 0x20c]
push eax
call fcn.00401c72
mov edi, eax
test edi, edi
js 0x4028a1
xor eax, eax
mov edi, eax
jmp 0x4028a1