Function at 0x4176c0
Capabilities:
Check if file exists

Disassembly:
push ebp
sub esp, 0x60
mov eax, 0x56abaa
call fcn.00566548
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.00407fd5
lea ecx, [ebp + 0x28]
call fcn.0040260e
mov edi, dword [ebp + 0x6c]
lea ecx, [ebp]
push ebx
mov dword [ebp - 4], ebx
push dword [edi]
call fcn.00408246
test al, al
je 0x41793d
cmp dword [esi + 0x58], 2
je 0x4179bf
cmp dword [esi + 0x58], ebx
jne 0x41781a
mov ecx, edi
call fcn.00403a1a
push edi
inc eax
lea ecx, [ebp + 0x38]
push eax
call fcn.00402457
lea eax, [ebp + 0x28]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp + 0x38]
lea ecx, [ebp + 0x44]
call fcn.00402987
push dword [ebp + 0x38]
mov byte [ebp - 4], 3
call fcn.0056651e
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 0x4177ad
mov ebx, eax
jmp 0x4177f1
mov eax, dword [ebp + 0x50]
sub eax, ebx
je 0x41780b
sub eax, 1
je 0x4177ff
sub eax, 1
je 0x4177f1
sub eax, 1
je 0x4177e7
sub eax, 1
je 0x4177db
sub eax, 1
je 0x4177d4
mov ebx, 0x80004005
jmp 0x4177f1
mov ebx, 0x80004004
jmp 0x4177f1
mov esi, dword [ebp + 0x60]
mov dword [esi + 0x58], 3
jmp 0x41780e
mov eax, dword [ebp + 0x60]
mov dword [eax + 0x58], 2
push dword [ebp + 0x44]
call fcn.0056651e
pop ecx
jmp 0x4179bf
mov esi, dword [ebp + 0x60]
mov dword [esi + 0x58], 1
jmp 0x41780e
mov esi, dword [ebp + 0x60]
push dword [ebp + 0x44]
mov byte [ebp - 4], bl
call fcn.0056651e
pop ecx
cmp dword [esi + 0x58], 3
jne 0x417858
mov ecx, edi
call fcn.00414d2a
test al, al
jne 0x41784c
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.0041a501
mov ebx, eax
test ebx, ebx
jne 0x4179bf
mov ebx, 0x80004005
jmp 0x4179bf
mov byte [esi + 0x200], 1
jmp 0x4179ba
cmp dword [esi + 0x58], 4
jne 0x4178d5
push edi
lea ecx, [ebp + 0x54]
call fcn.00402516
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 4
call fcn.00414d2a
test al, al
jne 0x417890
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.0041a501
test eax, eax
mov ebx, 0x80004005
cmovne ebx, eax
jmp 0x4178c0
mov edx, dword [ebp + 0x54]
mov ecx, dword [edi]
call fcn.00407a77
test al, al
jne 0x4178c8
call fcn.004091fc
push edi
lea ecx, [ebp + 0x54]
push ecx
push str.Cannot_rename_existing_file
push eax
mov ecx, esi
call fcn.0041a454
mov ebx, eax
test ebx, ebx
jne 0x4178c0
mov ebx, 0x80004005
push dword [ebp + 0x54]
jmp 0x4177f4
push dword [ebp + 0x54]
call fcn.0056651e
jmp 0x4179b9
mov eax, dword [ebp + 0x20]
mov ecx, dword [edi]
shr eax, 4
test al, 1
je 0x4178f6
call fcn.00407ba4
test al, al
jne 0x4179ba
push edi
push str.Cannot_delete_output_folder
jmp 0x417927
call fcn.00408149
test al, al
je 0x4179ba
mov ecx, dword [edi]
call fcn.004076ad
test al, al
jne 0x4179ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4179ba
push edi
push str.Cannot_delete_output_file
mov ecx, esi
call fcn.0041a5f9
test eax, eax
je 0x4179bf
mov ebx, eax
jmp 0x4179bf
mov ecx, dword [edi]
call fcn.004097b5
mov esi, eax
test esi, esi
js 0x4179ba
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], bx
je 0x4179ba
push edi
lea ecx, [ebp + 0x54]
call fcn.00402516
mov byte [ebp - 4], 5
cmp esi, dword [ebp + 0x58]
jae 0x417971
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.00407fd5
lea ecx, [ebp - 0x1c]
call fcn.0040260e
push ebx
push dword [ebp + 0x54]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 6
call fcn.00408246
test al, al
je 0x4179a8
mov edx, dword [ebp - 0x24]
test dl, 1
je 0x4179a8
mov ecx, dword [ebp + 0x54]
and edx, 0xfffffffe
call fcn.00407ecb
push dword [ebp - 0x1c]
call fcn.0056651e
push dword [ebp + 0x54]
call fcn.0056651e
pop ecx
pop ecx
mov eax, dword [ebp + 0x70]
mov byte [eax], bl
push dword [ebp + 0x28]
call fcn.0056651e
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