Function at 0x421eb0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xab1bd0
mov eax, dword fs:[0]
push eax
sub esp, 0x94
push ebx
push esi
push edi
mov eax, dword [0xaf408c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x68]
mov byte [eax], 1
call fcn.0040dc50
lea ecx, [ebp - 0x40]
call fcn.0040a7f0
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x68]
push 0
mov dword [ebp - 4], 0
push dword [edi]
call fcn.0040e040
test al, al
je 0x422092
mov eax, dword [ebx + 0x48]
cmp eax, 2
je 0x42211e
test eax, eax
jne 0x421ecb
mov ecx, edi
call fcn.0040b580
push edi
inc eax
lea ecx, [ebp - 0x30]
push eax
call fcn.0040a5b0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.0040aa60
push dword [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.00a3c1ec
mov edx, dword [ebx + 0x50]
add esp, 4
mov eax, dword [ebp - 0x50]
xor esi, esi
mov ecx, dword [ebp - 0x4c]
cmp byte [ebx + 0x3b], 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
mov eax, dword [edx]
mov ecx, dword [eax + 0x14]
lea eax, [ebp + 8]
push eax
lea eax, [ebx + 0xd8]
cmove eax, esi
cmp byte [ebx + 0xcb], 0
push eax
lea eax, [ebx + 0xc0]
cmove eax, esi
push eax
push dword [ebx + 0x74]
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x24]
push edx
call ecx
mov esi, eax
test esi, esi
jne 0x422009
mov eax, dword [ebp + 8]
cmp eax, 5
ja case.default.0x421e7b
jmp dword [eax*4 + 0x422144]
push dword [ebp - 0x24]
mov esi, 0x80004004
call fcn.00a3c1ec
add esp, 4
jmp 0x422120
mov dword [ebx + 0x48], 2
push dword [ebp - 0x24]
xor esi, esi
call fcn.00a3c1ec
add esp, 4
jmp 0x422120
mov dword [ebx + 0x48], 1
jmp case.0x421e7b.0
mov dword [ebx + 0x48], 3
push dword [ebp - 0x24]
call fcn.00a3c1ec
add esp, 4
mov eax, dword [ebx + 0x48]
cmp eax, 3
jne 0x421f0a
push edi
call fcn.0041bb10
test al, al
jne 0x421efe
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, ebx
call fcn.004240b0
mov esi, eax
test esi, esi
jne 0x422120
mov esi, 0x80004005
jmp 0x422120
mov byte [ebx + 0x174], 1
jmp 0x422118
cmp eax, 4
jne 0x422029
push edi
lea ecx, [ebp - 0x24]
call fcn.0040a610
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 2
push eax
call fcn.0041bb10
test al, al
jne 0x421f54
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, ebx
call fcn.004240b0
push dword [ebp - 0x24]
test eax, eax
mov esi, 0x80004005
cmovne esi, eax
call fcn.00a3c1ec
add esp, 4
jmp 0x422120
push dword [ebp - 0x24]
push dword [edi]
call fcn.0040dad0
test al, al
jne 0x422019
call fcn.0040ec10
push str.Cannot_rename_existing_file
lea ecx, [ebp - 0x18]
mov esi, eax
call fcn.0040a6b0
mov byte [ebp - 4], 3
test esi, esi
je 0x421fb8
push 0xab64f0
lea ecx, [ebp - 0x18]
call fcn.0040ab30
push esi
lea eax, [ebp - 0x30]
push eax
call fcn.0040d3f0
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x18]
call fcn.0040aaf0
push dword [ebp - 0x30]
mov byte [ebp - 4], 3
call fcn.00a3c1ec
add esp, 4
push 0xab64f0
lea ecx, [ebp - 0x18]
call fcn.0040ab30
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040aaf0
push 0xab64f0
lea ecx, [ebp - 0x18]
call fcn.0040ab30
push edi
lea ecx, [ebp - 0x18]
call fcn.0040aaf0
mov ecx, dword [ebx + 0x50]
push dword [ebp - 0x18]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x1c]
push dword [ebp - 0x18]
mov esi, eax
call fcn.00a3c1ec
add esp, 4
test esi, esi
jne 0x422009
mov esi, 0x80004005
push dword [ebp - 0x24]
call fcn.00a3c1ec
add esp, 4
jmp 0x422120
push dword [ebp - 0x24]
call fcn.00a3c1ec
add esp, 4
jmp 0x422118
mov eax, dword [ebp - 0x48]
mov ecx, dword [edi]
shr eax, 4
push ecx
test al, 1
je 0x42205f
call fcn.0040daf0
test al, al
jne 0x422118
push edi
push str.Cannot_delete_output_folder
mov ecx, ebx
call fcn.00424130
mov esi, eax
test esi, esi
jne 0x422120
jmp 0x42211e
call fcn.0040ddf0
test al, al
je 0x422118
push dword [edi]
call fcn.0040d830
test al, al
jne 0x422118
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x422118
push edi
push str.Cannot_delete_output_file
jmp 0x422049
push dword [edi]
call fcn.0040f200
mov esi, eax
test esi, esi
js 0x422118
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], 0
je 0x422118
push edi
lea ecx, [ebp - 0x18]
call fcn.0040a610
mov byte [ebp - 4], 5
cmp esi, dword [ebp - 0x14]
jae 0x4220c7
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov dword [ebp - 0x14], esi
mov word [eax + esi*2], cx
lea ecx, [ebp - 0xa0]
call fcn.0040dc50
lea ecx, [ebp - 0x78]
call fcn.0040a7f0
push 0
push dword [ebp - 0x18]
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 6
call fcn.0040e040
test al, al
je 0x422105
mov eax, dword [ebp - 0x80]
test al, 1
je 0x422105
and eax, 0xfffffffe
push eax
push dword [ebp - 0x18]
call fcn.0040db60
push dword [ebp - 0x78]
call fcn.00a3c1ec
push dword [ebp - 0x18]
call fcn.00a3c1ec
add esp, 8
mov eax, dword [ebp + 0xc]
mov byte [eax], 0
xor esi, esi
push dword [ebp - 0x40]
call fcn.00a3c1ec
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8