Function at 0x422234
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xa95b93
mov eax, dword fs:[0]
push eax
sub esp, 0x98
push ebx
push esi
push edi
mov eax, dword [0xad82f0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x6c]
mov byte [eax], 1
call fcn.0040dd80
lea ecx, [ebp - 0x44]
call fcn.00409dd0
mov ebx, dword [ebp + 8]
push 0
push dword [ebx]
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], 0
call fcn.0040e220
test al, al
je 0x422399
mov eax, dword [edi + 0x48]
cmp eax, 2
je 0x422428
test eax, eax
jne 0x422243
mov ecx, ebx
call fcn.0040abd0
inc eax
push eax
lea eax, [ebp - 0x34]
push eax
mov ecx, ebx
call fcn.0041b530
lea ecx, [ebp - 0x44]
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 1
call fcn.0040a090
push dword [ebp - 0x34]
mov byte [ebp - 4], 3
call fcn.00a105e9
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x50]
add esp, 4
cmp byte [edi + 0x3b], 0
mov dword [ebp - 0x10], eax
je 0x4221a4
lea esi, [edi + 0xd8]
jmp 0x4221a6
xor esi, esi
cmp byte [edi + 0xcb], 0
je 0x4221b7
lea edx, [edi + 0xc0]
jmp 0x4221b9
xor edx, edx
mov ecx, dword [edi + 0x50]
lea ebx, [ebp - 0x1c]
mov eax, dword [ecx]
push ebx
push esi
push edx
push dword [edi + 0x74]
lea edx, [ebp - 0x6c]
push edx
lea edx, [ebp - 0x14]
push edx
push dword [ebp - 0x28]
push ecx
call dword [eax + 0x14]
mov ebx, dword [ebp + 8]
mov esi, eax
test esi, esi
jne 0x42227b
mov eax, dword [ebp - 0x1c]
cmp eax, 5
ja case.default.0x4221ef
jmp dword [eax*4 + 0x42244c]
push dword [ebp - 0x28]
mov esi, 0x80004004
call fcn.00a105e9
add esp, 4
jmp 0x42242a
mov dword [edi + 0x48], 2
push dword [ebp - 0x28]
xor esi, esi
call fcn.00a105e9
add esp, 4
jmp 0x42242a
mov dword [edi + 0x48], 1
jmp case.0x4221ef.0
mov dword [edi + 0x48], 3
push dword [ebp - 0x28]
mov byte [ebp - 4], 0
call fcn.00a105e9
add esp, 4
mov eax, dword [edi + 0x48]
cmp eax, 3
jne 0x422297
push ebx
call fcn.0041c3e0
test al, al
jne 0x42228b
push ebx
push str.Cannot_create_file_with_auto_name
mov ecx, edi
call fcn.00424120
mov esi, eax
test esi, esi
jne 0x42242a
mov esi, 0x80004005
jmp 0x42242a
mov esi, 0x80004005
push dword [ebp - 0x28]
call fcn.00a105e9
add esp, 4
jmp 0x42242a
mov byte [edi + 0x174], 1
jmp 0x422422
cmp eax, 4
jne 0x422331
push ebx
lea ecx, [ebp - 0x18]
call fcn.00409c50
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 4
call fcn.0041c3e0
test al, al
jne 0x4222e1
push ebx
push str.Cannot_create_file_with_auto_name
mov ecx, edi
call fcn.00424120
push dword [ebp - 0x18]
test eax, eax
mov esi, 0x80004005
cmovne esi, eax
call fcn.00a105e9
add esp, 4
jmp 0x42242a
push dword [ebp - 0x18]
push dword [ebx]
call fcn.0040da70
test al, al
jne 0x422321
call fcn.0040ee80
push ebx
lea ecx, [ebp - 0x18]
push ecx
push str.Cannot_rename_existing_file
push eax
mov ecx, edi
call fcn.00424040
mov esi, eax
test esi, esi
jne 0x422311
mov esi, 0x80004005
push dword [ebp - 0x18]
call fcn.00a105e9
add esp, 4
jmp 0x42242a
push dword [ebp - 0x18]
call fcn.00a105e9
add esp, 4
jmp 0x422422
mov eax, dword [ebp - 0x4c]
push dword [ebx]
shr eax, 4
test al, 1
je 0x422366
call fcn.0040db30
test al, al
jne 0x422422
push ebx
push str.Cannot_delete_output_folder
mov ecx, edi
call fcn.004241a0
mov esi, eax
test esi, esi
jne 0x42242a
jmp 0x422428
call fcn.0040dfd0
test al, al
je 0x422422
push dword [ebx]
call fcn.0040d740
test al, al
jne 0x422422
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x422422
push ebx
push str.Cannot_delete_output_file
jmp 0x422350
push dword [ebx]
call fcn.0040f420
mov esi, eax
test esi, esi
js 0x422422
mov ecx, dword [ebx]
cmp word [ecx + esi*2 + 2], 0
je 0x422422
push ebx
lea ecx, [ebp - 0x18]
call fcn.00409c50
mov byte [ebp - 4], 5
cmp esi, dword [ebp - 0x14]
jae 0x4223ce
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov dword [ebp - 0x14], esi
mov word [eax + esi*2], cx
lea ecx, [ebp - 0xa4]
call fcn.0040dd80
lea ecx, [ebp - 0x7c]
call fcn.00409dd0
push 0
push dword [ebp - 0x18]
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 6
call fcn.0040e220
test al, al
je 0x42240f
mov eax, dword [ebp - 0x84]
test al, 1
je 0x42240f
and eax, 0xfffffffe
push eax
push dword [ebp - 0x18]
call fcn.0040dc00
push dword [ebp - 0x7c]
call fcn.00a105e9
push dword [ebp - 0x18]
call fcn.00a105e9
add esp, 8
mov eax, dword [ebp + 0xc]
mov byte [eax], 0
xor esi, esi
push dword [ebp - 0x44]
call fcn.00a105e9
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