Function at 0x404ca0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd78
cmp dword [ebp + 8], 0
jne 0x405273
cmp dword [0x417174], 0
jne 0x405271
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x417174], eax
cmp dword [0x417174], 0
je 0x405271
push 0
call fcn.00404c10
add esp, 4
mov dword [ebp - 0xd2c], eax
mov eax, dword [0x417174]
mov dword [ebp - 0xd30], eax
mov ecx, dword [ebp - 0xd30]
mov dword [ebp - 0xd34], ecx
mov edx, dword [ebp - 0xd2c]
mov al, byte [edx]
mov byte [ebp - 0xd35], al
mov ecx, dword [ebp - 0xd30]
mov dl, byte [ebp - 0xd35]
mov byte [ecx], dl
mov eax, dword [ebp - 0xd2c]
add eax, 1
mov dword [ebp - 0xd2c], eax
mov ecx, dword [ebp - 0xd30]
add ecx, 1
mov dword [ebp - 0xd30], ecx
cmp byte [ebp - 0xd35], 0
jne 0x404d06
mov edx, dword [0x417174]
mov dword [ebp - 0xd0c], edx
push 0x5c
mov eax, dword [ebp - 0xd0c]
push eax
call fcn.00407eb6
add esp, 8
mov dword [ebp - 0x404], eax
cmp dword [ebp - 0x404], 0
jne 0x404d91
mov ecx, dword [0x417174]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x417174], 0
jmp 0x405271
mov edx, dword [ebp - 0x404]
add edx, 1
mov dword [ebp - 0xd3c], edx
lea eax, [ebp - 0x400]
mov dword [ebp - 0xd40], eax
mov ecx, dword [ebp - 0xd40]
mov dword [ebp - 0xd44], ecx
mov edx, dword [ebp - 0xd3c]
mov al, byte [edx]
mov byte [ebp - 0xd45], al
mov ecx, dword [ebp - 0xd40]
mov dl, byte [ebp - 0xd45]
mov byte [ecx], dl
mov eax, dword [ebp - 0xd3c]
add eax, 1
mov dword [ebp - 0xd3c], eax
mov ecx, dword [ebp - 0xd40]
add ecx, 1
mov dword [ebp - 0xd40], ecx
cmp byte [ebp - 0xd45], 0
jne 0x404db8
mov edx, dword [ebp - 0x404]
mov byte [edx], 0
mov eax, dword [0x417174]
mov dword [ebp - 0xd4c], eax
lea ecx, [ebp - 0x808]
mov dword [ebp - 0xd50], ecx
mov edx, dword [ebp - 0xd50]
mov dword [ebp - 0xd54], edx
mov eax, dword [ebp - 0xd4c]
mov cl, byte [eax]
mov byte [ebp - 0xd55], cl
mov edx, dword [ebp - 0xd50]
mov al, byte [ebp - 0xd55]
mov byte [edx], al
mov ecx, dword [ebp - 0xd4c]
add ecx, 1
mov dword [ebp - 0xd4c], ecx
mov edx, dword [ebp - 0xd50]
add edx, 1
mov dword [ebp - 0xd50], edx
cmp byte [ebp - 0xd55], 0
jne 0x404e27
push 0x2e
lea eax, [ebp - 0x400]
push eax
call fcn.00407eb6
add esp, 8
mov dword [ebp - 0x404], eax
cmp dword [ebp - 0x404], 0
jne 0x404ea6
mov ecx, dword [0x417174]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x417174], 0
jmp 0x405271
mov edx, dword [ebp - 0x404]
mov byte [edx], 0
cmp dword [0x417158], 0
je 0x404f36
mov eax, dword [0x417158]
movsx ecx, byte [eax]
test ecx, ecx
je 0x404f36
mov edx, dword [0x417158]
push edx
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [ebp - 0x400]
mov dword [ebp - 0xd5c], ecx
mov edx, dword [ebp - 0xd5c]
add edx, 1
mov dword [ebp - 0xd60], edx
mov eax, dword [ebp - 0xd5c]
mov cl, byte [eax]
mov byte [ebp - 0xd61], cl
add dword [ebp - 0xd5c], 1
cmp byte [ebp - 0xd61], 0
jne 0x404ef3
mov edx, dword [ebp - 0xd5c]
sub edx, dword [ebp - 0xd60]
mov dword [ebp - 0xd68], edx
mov eax, dword [ebp - 0xd68]
lea ecx, [ebp + eax - 0x400]
mov dword [ebp - 0x404], ecx
mov edx, dword [ebp - 0x404]
sub edx, 1
mov dword [ebp - 0x404], edx
mov eax, dword [ebp - 0x404]
movsx ecx, byte [eax]
cmp ecx, 0x20
jne 0x404f5e
mov edx, dword [ebp - 0x404]
mov byte [edx], 0
jmp 0x404f36
cmp dword [0x417174], 0
je 0x405271
mov eax, dword [0x417174]
push eax
call fcn.004052f0
add esp, 4
test eax, eax
jne 0x404f99
mov ecx, dword [0x417174]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x417174], 0
jmp 0x40526c
push 0
call fcn.00404ca0
add esp, 4
push eax
push 0
call fcn.00404c10
add esp, 4
push eax
call fcn.004076b0
add esp, 8
test eax, eax
jne 0x404fd7
mov edx, dword [0x417174]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x417174], 0
jmp 0x405271
cmp dword [0x417154], 0
jne 0x40526a
mov dword [ebp - 0xd14], 0
mov eax, 0x11111111
and eax, 1
je 0x405009
push 0
push 0xb
call fcn.00404200
mov dword [ebp - 0xd18], eax
jmp 0x405013
mov dword [ebp - 0xd18], 0xb
mov ecx, 0x11111111
and ecx, 0x10
je 0x40502e
push 0
push 2
call fcn.00404200
mov dword [ebp - 0xd10], eax
jmp 0x405038
mov dword [ebp - 0xd10], 2
push 4
mov edx, dword [ebp - 0xd10]
push edx
mov eax, dword [ebp - 0xd18]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp - 0xd14], eax
mov ecx, 0x11111111
and ecx, 1
je 0x405076
cmp dword [ebp - 0xd18], 0
je 0x405076
mov edx, dword [ebp - 0xd18]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 0x11111111
and eax, 0x10
je 0x405096
cmp dword [ebp - 0xd10], 0
je 0x405096
mov ecx, dword [ebp - 0xd10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0xd14], 6
jne 0x40526a
mov edx, dword [0x417174]
mov dword [ebp - 0xd1c], edx
push 0x5c
mov eax, dword [ebp - 0xd1c]
push eax
call fcn.00407eb6
add esp, 8
mov dword [ebp - 0x404], eax
cmp dword [ebp - 0x404], 0
je 0x4050ea
mov ecx, dword [ebp - 0x404]
movsx edx, byte [ecx + 1]
cmp edx, 0x783030
jne 0x4050ea
mov eax, dword [ebp - 0x404]
mov byte [eax], 0
lea ecx, [ebp - 0x400]
push ecx
mov edx, dword [0x417174]
push edx
push str._s_s
mov eax, dword [0x417174]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ecx, dword [0x417174]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405200
mov edx, dword [0x417174]
push edx
push 0xc
lea eax, [ebp - 0xd08]
push eax
call fcn.004052a0
add esp, 0xc
mov dword [ebp - 0xd24], 0
mov ecx, 0x10
and ecx, 1
je 0x405164
push 0
lea edx, [ebp - 0xd08]
push edx
call fcn.00404200
mov dword [ebp - 0xd28], eax
jmp 0x405170
lea eax, [ebp - 0xd08]
mov dword [ebp - 0xd28], eax
mov ecx, 0x10
and ecx, 0x10
je 0x40518b
push 0
push 2
call fcn.00404200
mov dword [ebp - 0xd20], eax
jmp 0x405195
mov dword [ebp - 0xd20], 2
push 4
mov edx, dword [ebp - 0xd20]
push edx
mov eax, dword [ebp - 0xd28]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp - 0xd24], eax
mov ecx, 0x10
and ecx, 1
je 0x4051d3
cmp dword [ebp - 0xd28], 0
je 0x4051d3
mov edx, dword [ebp - 0xd28]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 0x10
and eax, 0x10
je 0x4051f3
cmp dword [ebp - 0xd20], 0
je 0x4051f3
mov ecx, dword [ebp - 0xd20]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0xd24], 6
jne 0x4051fe
jmp 0x405271
jmp 0x405202
jmp 0x405271
lea edx, [ebp - 0x808]
mov dword [ebp - 0xd6c], edx
mov eax, dword [0x417174]
mov dword [ebp - 0xd70], eax
mov ecx, dword [ebp - 0xd70]
mov dword [ebp - 0xd74], ecx
mov edx, dword [ebp - 0xd6c]
mov al, byte [edx]
mov byte [ebp - 0xd75], al
mov ecx, dword [ebp - 0xd70]
mov dl, byte [ebp - 0xd75]
mov byte [ecx], dl
mov eax, dword [ebp - 0xd6c]
add eax, 1
mov dword [ebp - 0xd6c], eax
mov ecx, dword [ebp - 0xd70]
add ecx, 1
mov dword [ebp - 0xd70], ecx
cmp byte [ebp - 0xd75], 0
jne 0x405225
jmp 0x40526c
jmp 0x405271
jmp 0x404f5e
jmp 0x405293
cmp dword [0x417174], 0
je 0x405293
mov edx, dword [0x417174]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x417174], 0
mov eax, dword [0x417174]
mov esp, ebp
pop ebp
ret