Function at 0x417640
Capabilities:
Check if file exists

Disassembly:
push ebp
sub esp, 0x60
mov eax, 0x56b5f4
call fcn.00566e38
sub esp, 0x38
mov eax, dword [ebp + 0x70]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
lea ecx, [ebp]
mov dword [ebp + 0x60], esi
mov byte [eax], 1
call fcn.00407f6f
lea ecx, [ebp + 0x28]
call fcn.004025e6
mov edi, dword [ebp + 0x6c]
lea ecx, [ebp]
push ebx
mov dword [ebp - 4], ebx
push dword [edi]
call fcn.004081e0
test al, al
je 0x4178bd
cmp dword [esi + 0x58], 2
je 0x41793f
cmp dword [esi + 0x58], ebx
jne 0x41779a
mov ecx, edi
call fcn.004039d0
push edi
inc eax
lea ecx, [ebp + 0x38]
push eax
call fcn.0040242f
lea eax, [ebp + 0x28]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp + 0x38]
lea ecx, [ebp + 0x44]
call fcn.00402947
push dword [ebp + 0x38]
mov byte [ebp - 4], 3
call fcn.00566e0e
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp + 0x60]
mov dword [ebp + 0x58], eax
lea eax, [ebp + 0x50]
pop ecx
mov ecx, dword [ebp + 0x1c]
push eax
mov eax, dword [ebp + 0x60]
mov edx, dword [esi + 0x60]
add eax, 0x118
mov dword [ebp + 0x5c], ecx
xor ecx, ecx
cmp byte [edi + 0x4d], cl
mov esi, dword [edx]
cmovne ecx, eax
push ecx
xor ecx, ecx
mov eax, edi
add eax, 0x100
cmp byte [edi + 0x10b], cl
cmovne ecx, eax
mov eax, edi
push ecx
push dword [eax + 0x94]
lea eax, [ebp]
push eax
lea eax, [ebp + 0x58]
push eax
push dword [ebp + 0x44]
push edx
call dword [esi + 0x14]
mov edi, dword [ebp + 0x6c]
test eax, eax
je 0x41772d
mov ebx, eax
jmp 0x417771
mov eax, dword [ebp + 0x50]
sub eax, ebx
je 0x41778b
sub eax, 1
je 0x41777f
sub eax, 1
je 0x417771
sub eax, 1
je 0x417767
sub eax, 1
je 0x41775b
sub eax, 1
je 0x417754
mov ebx, 0x80004005
jmp 0x417771
mov ebx, 0x80004004
jmp 0x417771
mov esi, dword [ebp + 0x60]
mov dword [esi + 0x58], 3
jmp 0x41778e
mov eax, dword [ebp + 0x60]
mov dword [eax + 0x58], 2
push dword [ebp + 0x44]
call fcn.00566e0e
pop ecx
jmp 0x41793f
mov esi, dword [ebp + 0x60]
mov dword [esi + 0x58], 1
jmp 0x41778e
mov esi, dword [ebp + 0x60]
push dword [ebp + 0x44]
mov byte [ebp - 4], bl
call fcn.00566e0e
pop ecx
cmp dword [esi + 0x58], 3
jne 0x4177d8
mov ecx, edi
call fcn.00414cb3
test al, al
jne 0x4177cc
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.0041a47c
mov ebx, eax
test ebx, ebx
jne 0x41793f
mov ebx, 0x80004005
jmp 0x41793f
mov byte [esi + 0x200], 1
jmp 0x41793a
cmp dword [esi + 0x58], 4
jne 0x417855
push edi
lea ecx, [ebp + 0x54]
call fcn.004024ee
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 4
call fcn.00414cb3
test al, al
jne 0x417810
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.0041a47c
test eax, eax
mov ebx, 0x80004005
cmovne ebx, eax
jmp 0x417840
mov edx, dword [ebp + 0x54]
mov ecx, dword [edi]
call fcn.00407a14
test al, al
jne 0x417848
call fcn.00409191
push edi
lea ecx, [ebp + 0x54]
push ecx
push str.Cannot_rename_existing_file
push eax
mov ecx, esi
call fcn.0041a3cf
mov ebx, eax
test ebx, ebx
jne 0x417840
mov ebx, 0x80004005
push dword [ebp + 0x54]
jmp 0x417774
push dword [ebp + 0x54]
call fcn.00566e0e
jmp 0x417939
mov eax, dword [ebp + 0x20]
mov ecx, dword [edi]
shr eax, 4
test al, 1
je 0x417876
call fcn.00407b41
test al, al
jne 0x41793a
push edi
push str.Cannot_delete_output_folder
jmp 0x4178a7
call fcn.004080e3
test al, al
je 0x41793a
mov ecx, dword [edi]
call fcn.0040764a
test al, al
jne 0x41793a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x41793a
push edi
push str.Cannot_delete_output_file
mov ecx, esi
call fcn.0041a574
test eax, eax
je 0x41793f
mov ebx, eax
jmp 0x41793f
mov ecx, dword [edi]
call fcn.0040974a
mov esi, eax
test esi, esi
js 0x41793a
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], bx
je 0x41793a
push edi
lea ecx, [ebp + 0x54]
call fcn.004024ee
mov byte [ebp - 4], 5
cmp esi, dword [ebp + 0x58]
jae 0x4178f1
mov eax, dword [ebp + 0x54]
xor ecx, ecx
mov dword [ebp + 0x58], esi
mov word [eax + esi*2], cx
lea ecx, [ebp - 0x44]
call fcn.00407f6f
lea ecx, [ebp - 0x1c]
call fcn.004025e6
push ebx
push dword [ebp + 0x54]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 6
call fcn.004081e0
test al, al
je 0x417928
mov edx, dword [ebp - 0x24]
test dl, 1
je 0x417928
mov ecx, dword [ebp + 0x54]
and edx, 0xfffffffe
call fcn.00407e68
push dword [ebp - 0x1c]
call fcn.00566e0e
push dword [ebp + 0x54]
call fcn.00566e0e
pop ecx
pop ecx
mov eax, dword [ebp + 0x70]
mov byte [eax], bl
push dword [ebp + 0x28]
call fcn.00566e0e
pop ecx
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add ebp, 0x64
leave
ret 8