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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb4
mov eax, dword [0x4e3a20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push esi
push edi
lea ecx, [ebp - 0xac]
mov dword [ebp - 0xb4], ebx
xor esi, esi
mov dword [ebp - 0x98], 0xf
mov dword [ebp - 0x9c], ebx
mov byte [ebp - 0xac], bl
mov dword [ebp - 0x80], 0xf
mov dword [ebp - 0x84], ebx
mov byte [ebp - 0x94], bl
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x64], bl
call fcn.004012c0
lea edi, [ebx + 7]
test al, al
je 0x40734e
xor ecx, ecx
cmp byte [str.caps], cl
mov eax, 4
cmove eax, ecx
push eax
push str.caps
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x20], 0xf
mov dword [ebp - 0x24], ebx
mov byte [ebp - 0x34], bl
call fcn.004026f0
lea eax, [ebp - 0x94]
push eax
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0xac]
lea ebx, [esi + 1]
call fcn.00401740
add esp, 4
test al, al
je 0x40734e
xor ecx, ecx
cmp byte [str.caps.db], cl
mov eax, edi
cmove eax, ecx
push eax
push str.caps.db
lea ecx, [ebp - 0x1c]
mov dword [ebp - 8], 0xf
mov dword [ebp - 0xc], esi
mov byte [ebp - 0x1c], 0
call fcn.004026f0
lea eax, [ebp - 0x64]
push eax
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x94]
lea ebx, [esi + 3]
call fcn.00401740
add esp, 4
test al, al
je 0x40734e
lea ecx, [ebp - 0x64]
call fcn.004014c0
mov byte [ebp - 0xad], 1
test al, al
jne 0x407355
mov byte [ebp - 0xad], 0
test bl, 2
je 0x40737c
and ebx, 0xfffffffd
cmp dword [ebp - 8], 0x10
jb 0x40736e
push dword [ebp - 0x1c]
call fcn.004a37d1
add esp, 4
mov dword [ebp - 8], 0xf
mov dword [ebp - 0xc], esi
mov byte [ebp - 0x1c], 0
test bl, 1
je 0x407395
and ebx, 0xfffffffe
cmp dword [ebp - 0x20], 0x10
jb 0x407395
push dword [ebp - 0x34]
call fcn.004a37d1
add esp, 4
cmp byte [ebp - 0xad], 0
je 0x407536
xor ecx, ecx
cmp byte [str.backup], cl
mov eax, 6
cmove eax, ecx
push eax
push str.backup
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x20], 0xf
mov dword [ebp - 0x24], esi
mov byte [ebp - 0x34], 0
mov dword [ebp - 0x68], 0xf
mov dword [ebp - 0x6c], esi
mov byte [ebp - 0x7c], 0
mov dword [ebp - 0x38], 0xf
mov dword [ebp - 0x3c], esi
mov byte [ebp - 0x4c], 0
call fcn.004026f0
lea eax, [ebp - 0x34]
push eax
lea edx, [ebp - 0x4c]
lea ecx, [ebp - 0xac]
or ebx, 4
call fcn.00401740
add esp, 4
test al, al
je 0x40744d
xor eax, eax
cmp byte [str.caps.db], al
lea ecx, [ebp - 0x1c]
cmove edi, eax
push edi
push str.caps.db
mov dword [ebp - 8], 0xf
mov dword [ebp - 0xc], esi
mov byte [ebp - 0x1c], 0
call fcn.004026f0
lea eax, [ebp - 0x7c]
push eax
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x34]
or ebx, 8
call fcn.00401740
add esp, 4
mov byte [ebp - 0xad], 1
test al, al
jne 0x407454
mov byte [ebp - 0xad], 0
test bl, 8
je 0x40747b
and ebx, 0xfffffff7
cmp dword [ebp - 8], 0x10
jb 0x40746d
push dword [ebp - 0x1c]
call fcn.004a37d1
add esp, 4
mov dword [ebp - 8], 0xf
mov dword [ebp - 0xc], esi
mov byte [ebp - 0x1c], 0
test bl, 4
je 0x407491
cmp dword [ebp - 0x38], 0x10
jb 0x407491
push dword [ebp - 0x4c]
call fcn.004a37d1
add esp, 4
cmp byte [ebp - 0xad], 0
je 0x4074fb
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0x4c]
call fcn.004032e0
cmp dword [ebp - 0x38], 8
lea eax, [ebp - 0x4c]
cmovae eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4074c4
test al, 0x10
jbe 0x4074c4
mov bl, 1
jmp 0x4074c6
xor bl, bl
cmp dword [ebp - 0x38], 8
jb 0x4074d7
push dword [ebp - 0x4c]
call fcn.004a37d1
add esp, 4
test bl, bl
jne 0x4074e5
lea ecx, [ebp - 0x34]
call fcn.004018e0
mov esi, eax
lea edx, [ebp - 0x7c]
lea ecx, [ebp - 0x64]
call fcn.00401c90
test al, al
jne 0x407500
mov esi, 4
jmp 0x407500
mov esi, 8
cmp dword [ebp - 0x68], 0x10
jb 0x407511
push dword [ebp - 0x7c]
call fcn.004a37d1
add esp, 4
cmp dword [ebp - 0x20], 0x10
mov dword [ebp - 0x68], 0xf
mov dword [ebp - 0x6c], 0
mov byte [ebp - 0x7c], 0
jb 0x40753b
push dword [ebp - 0x34]
call fcn.004a37d1
add esp, 4
jmp 0x40753b
mov esi, 8
cmp dword [ebp - 0x50], 0x10
jb 0x40754c
push dword [ebp - 0x64]
call fcn.004a37d1
add esp, 4
cmp dword [ebp - 0x80], 0x10
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], 0
mov byte [ebp - 0x64], 0
jb 0x407572
push dword [ebp - 0x94]
call fcn.004a37d1
add esp, 4
cmp dword [ebp - 0x98], 0x10
mov dword [ebp - 0x80], 0xf
mov dword [ebp - 0x84], 0
mov byte [ebp - 0x94], 0
jb 0x4075a1
push dword [ebp - 0xac]
call fcn.004a37d1
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a2eda
mov esp, ebp
pop ebp
ret