Function at 0x40a460
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4edc70
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x51d584]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
mov ebx, 0x10
cmp dword [ebp + 0x1c], ebx
jae 0x40a4a4
lea eax, [ebp + 8]
push 0x50c408
push eax
call fcn.00482a18
add esp, 8
test eax, eax
jne 0x40a4e7
mov eax, dword [esi]
cmp dword [eax + 0x14], ebx
jb 0x40a4bf
mov eax, dword [eax]
mov edx, eax
call fcn.004076d0
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x1c], ebx
jae 0x40a4d1
lea eax, [ebp + 8]
push 0x50c408
push eax
call fcn.00482a18
add esp, 8
test eax, eax
je 0x40a688
push eax
call fcn.00482f09
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x50]
mov edi, dword [0x525248]
add esp, 4
test eax, eax
jne 0x40a503
mov eax, dword [edi + 0x50]
mov eax, dword [eax + 0x1c]
push str.RenameOverwrite
push eax
call fcn.0040d310
add esp, 8
test al, al
je 0x40a640
push str..bak
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x2c]
push ecx
call fcn.004064a0
add esp, 0xc
mov bl, 1
mov byte [ebp - 4], bl
mov edx, dword [ebp - 0x2c]
mov edi, 0x10
cmp dword [ebp - 0x18], edi
jae 0x40a546
lea edx, [ebp - 0x2c]
mov eax, edx
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x48], 0
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a560
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x48]
call fcn.00402a70
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x48]
cmp dword [ebp - 0x34], edi
jae 0x40a582
lea ecx, [ebp - 0x48]
call fcn.00407570
test al, al
jne 0x40a591
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 4], bl
cmp dword [ebp - 0x34], edi
jb 0x40a5a5
mov edx, dword [ebp - 0x48]
push edx
call fcn.00480d64
add esp, 4
mov ecx, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], edi
jae 0x40a5b0
lea ecx, [ebp - 0x2c]
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x1c], edi
jae 0x40a5bb
lea eax, [ebp + 8]
push ecx
push eax
call fcn.00481d5e
add esp, 8
test eax, eax
jns 0x40a622
mov edx, dword [ebp + 8]
cmp dword [ebp + 0x1c], edi
jae 0x40a5d4
lea edx, [ebp + 8]
call fcn.004076d0
mov ecx, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], edi
jae 0x40a5e4
lea ecx, [ebp - 0x2c]
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x1c], edi
jae 0x40a5ef
lea eax, [ebp + 8]
push ecx
push eax
call fcn.00481d5e
add esp, 8
test eax, eax
jns 0x40a622
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.00402fd0
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call fcn.00402fd0
mov eax, 5
jmp 0x40a87f
mov byte [ebp - 4], 0
cmp dword [ebp - 0x18], edi
jb 0x40a864
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00480d64
add esp, 4
jmp 0x40a864
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x50]
test eax, eax
jne 0x40a64d
mov eax, dword [edi + 0x50]
mov eax, dword [eax + 0x1c]
push str.Skip
push eax
call fcn.0040d310
add esp, 8
test al, al
je 0x40a864
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x1c], ebx
jb 0x40a67e
mov ecx, dword [ebp + 8]
push ecx
call fcn.00480d64
add esp, 4
mov eax, 0x88
jmp 0x40a87f
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x1c], ebx
jae 0x40a693
lea eax, [ebp + 8]
push 0x50c51c
push eax
call fcn.00482a18
add esp, 8
test eax, eax
jne 0x40a7dd
mov eax, dword [esi]
cmp dword [eax + 0x14], ebx
jb 0x40a6b2
mov eax, dword [eax]
mov ecx, eax
lea edi, [ebp - 0x2c]
call fcn.004072d0
mov bl, 3
mov byte [ebp - 4], bl
cmp dword [ebp - 0x1c], 0
mov esi, 0x10
je 0x40a794
mov ecx, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], esi
jae 0x40a6da
mov ecx, edi
call fcn.00407060
test eax, eax
jne 0x40a794
mov edx, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], esi
jae 0x40a6f2
lea edx, [ebp - 0x2c]
call fcn.004076d0
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x1c], esi
jae 0x40a702
lea eax, [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
mov eax, dword [ebp + 8]
je 0x40a71f
cmp dword [ebp + 0x1c], esi
jae 0x40a718
lea eax, [ebp + 8]
push 0x50c408
jmp 0x40a72c
cmp dword [ebp + 0x1c], esi
jae 0x40a727
lea eax, [ebp + 8]
push 0x50c51c
push eax
call fcn.00482a18
add esp, 8
test eax, eax
je 0x40a5fd
push eax
call fcn.00482f09
mov eax, dword [ebp + 8]
add esp, 4
cmp dword [ebp + 0x1c], esi
jae 0x40a751
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402830
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x48]
cmp dword [ebp - 0x34], esi
jae 0x40a769
lea ecx, [ebp - 0x48]
call fcn.00407570
test al, al
jne 0x40a778
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], bl
call fcn.00402fd0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.00402fd0
jmp 0x40a864
mov byte [ebp - 4], 0
cmp dword [ebp - 0x18], esi
jb 0x40a7a9
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00480d64
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
cmp dword [ebp + 0x1c], esi
jb 0x40a7d3
mov eax, dword [ebp + 8]
push eax
call fcn.00480d64
add esp, 4
mov eax, 5
jmp 0x40a87f
push eax
call fcn.00482f09
mov edx, dword [ebp + 8]
add esp, 4
cmp dword [ebp + 0x1c], ebx
jae 0x40a7f1
lea edx, [ebp + 8]
mov edi, 0xf
mov eax, edx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x48], 0
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a810
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x48]
call fcn.00402a70
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x48]
cmp dword [ebp - 0x34], ebx
jae 0x40a832
lea ecx, [ebp - 0x48]
call fcn.00407570
test al, al
jne 0x40a841
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 4], 0
cmp dword [ebp - 0x34], ebx
jb 0x40a856
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00480d64
add esp, 4
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x48], 0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x1c], 0x10
jb 0x40a87d
mov edx, dword [ebp + 8]
push edx
call fcn.00480d64
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004809b9
mov esp, ebp
pop ebp
ret 0x1c