Function at 0x414a16
Capabilities:
Check if file exists

Disassembly:
push ebp
sub esp, 0x60
mov eax, 0x4b4874
call fcn.004a2e80
sub esp, 0x38
mov eax, dword [ebp + 0x70]
push ebx
push esi
mov esi, ecx
lea ecx, [ebp]
push edi
mov dword [ebp + 0x60], esi
mov byte [eax], 1
call fcn.00406f52
lea ecx, [ebp + 0x28]
call fcn.004029b0
mov edi, dword [ebp + 0x6c]
lea ecx, [ebp]
xor ebx, ebx
push ebx
mov dword [ebp - 4], ebx
push dword [edi]
call fcn.0040719f
test al, al
je 0x414c95
mov eax, dword [esi + 0x48]
cmp eax, 2
je 0x414d17
test eax, eax
jne 0x414b74
mov ecx, edi
call fcn.00403773
push edi
inc eax
lea ecx, [ebp + 0x38]
push eax
call fcn.004027f9
lea eax, [ebp + 0x28]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp + 0x38]
lea ecx, [ebp + 0x44]
call fcn.00402c1f
push dword [ebp + 0x38]
mov byte [ebp - 4], 3
call fcn.004a2e6c
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 + 0x50]
add eax, 0x108
mov dword [ebp + 0x5c], ecx
xor ecx, ecx
cmp byte [edi + 0x3b], cl
mov esi, dword [edx]
cmovne ecx, eax
push ecx
xor ecx, ecx
mov eax, edi
add eax, 0xf0
cmp byte [edi + 0xfb], cl
cmovne ecx, eax
mov eax, edi
push ecx
push dword [eax + 0x80]
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 0x414b04
mov ebx, eax
jmp 0x414b48
mov eax, dword [ebp + 0x50]
sub eax, ebx
je 0x414b62
sub eax, 1
je 0x414b56
sub eax, 1
je 0x414b48
sub eax, 1
je 0x414b3e
sub eax, 1
je 0x414b32
sub eax, 1
je 0x414b2b
mov ebx, 0x80004005
jmp 0x414b48
mov ebx, 0x80004004
jmp 0x414b48
mov esi, dword [ebp + 0x60]
mov dword [esi + 0x48], 3
jmp 0x414b65
mov eax, dword [ebp + 0x60]
mov dword [eax + 0x48], 2
push dword [ebp + 0x44]
call fcn.004a2e6c
pop ecx
jmp 0x414d17
mov esi, dword [ebp + 0x60]
mov dword [esi + 0x48], 1
jmp 0x414b65
mov esi, dword [ebp + 0x60]
push dword [ebp + 0x44]
mov byte [ebp - 4], bl
call fcn.004a2e6c
mov eax, dword [esi + 0x48]
pop ecx
cmp eax, 3
jne 0x414bb1
mov ecx, edi
call fcn.0040bb27
test al, al
jne 0x414ba5
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.0041770f
mov ebx, eax
test ebx, ebx
jne 0x414d17
mov ebx, 0x80004005
jmp 0x414d17
mov byte [esi + 0x1f0], 1
jmp 0x414d12
cmp eax, 4
jne 0x414c2d
push edi
lea ecx, [ebp + 0x54]
call fcn.004028b8
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 4
call fcn.0040bb27
test al, al
jne 0x414be8
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.0041770f
test eax, eax
mov ebx, 0x80004005
cmovne ebx, eax
jmp 0x414c18
mov edx, dword [ebp + 0x54]
mov ecx, dword [edi]
call fcn.004069e6
test al, al
jne 0x414c20
call fcn.00408037
push edi
lea ecx, [ebp + 0x54]
push ecx
push str.Cannot_rename_existing_file
push eax
mov ecx, esi
call fcn.00417662
mov ebx, eax
test ebx, ebx
jne 0x414c18
mov ebx, 0x80004005
push dword [ebp + 0x54]
jmp 0x414b4b
push dword [ebp + 0x54]
call fcn.004a2e6c
jmp 0x414d11
mov eax, dword [ebp + 0x20]
mov ecx, dword [edi]
shr eax, 4
test al, 1
je 0x414c4e
call fcn.00406b1d
test al, al
jne 0x414d12
push edi
push str.Cannot_delete_output_folder
jmp 0x414c7f
call fcn.004070a2
test al, al
je 0x414d12
mov ecx, dword [edi]
call fcn.0040667f
test al, al
jne 0x414d12
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x414d12
push edi
push str.Cannot_delete_output_file
mov ecx, esi
call fcn.0041776e
test eax, eax
je 0x414d17
mov ebx, eax
jmp 0x414d17
mov ecx, dword [edi]
call fcn.00408d19
mov esi, eax
test esi, esi
js 0x414d12
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], bx
je 0x414d12
push edi
lea ecx, [ebp + 0x54]
call fcn.004028b8
mov byte [ebp - 4], 5
cmp esi, dword [ebp + 0x58]
jae 0x414cc9
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.00406f52
lea ecx, [ebp - 0x1c]
call fcn.004029b0
push ebx
push dword [ebp + 0x54]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 6
call fcn.0040719f
test al, al
je 0x414d00
mov edx, dword [ebp - 0x24]
test dl, 1
je 0x414d00
mov ecx, dword [ebp + 0x54]
and edx, 0xfffffffe
call fcn.00406e48
push dword [ebp - 0x1c]
call fcn.004a2e6c
push dword [ebp + 0x54]
call fcn.004a2e6c
pop ecx
pop ecx
mov eax, dword [ebp + 0x70]
mov byte [eax], bl
push dword [ebp + 0x28]
call fcn.004a2e6c
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