Function at 0x420f50
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x99aa53
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9c
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x64]
mov byte [eax], 1
call fcn.0040cc80
lea ecx, [ebp - 0x3c]
call fcn.00409c70
mov edi, dword [ebp + 8]
mov eax, dword [edi]
xor ebx, ebx
push ebx
push eax
lea ecx, [ebp - 0x64]
mov dword [ebp - 4], ebx
call fcn.0040d1c0
test al, al
je 0x42138b
mov eax, dword [esi + 0x48]
cmp eax, 2
jne 0x420fb6
mov ecx, dword [ebp - 0x3c]
push ecx
jmp 0x421421
cmp eax, ebx
jne 0x42111f
mov ecx, edi
call fcn.0040a360
inc eax
push eax
lea edx, [ebp - 0x70]
push edx
mov ecx, edi
call fcn.00419240
lea ecx, [ebp - 0x3c]
push ecx
push eax
lea edx, [ebp - 0x18]
push edx
mov byte [ebp - 4], 1
call fcn.00409be0
mov eax, dword [ebp - 0x70]
push eax
mov byte [ebp - 4], 3
call fcn.009349e1
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x48]
add esp, 4
cmp byte [esi + 0x3b], 0
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], edx
je 0x421011
lea eax, [esi + 0xd8]
mov dword [ebp + 8], eax
jmp 0x421014
mov dword [ebp + 8], ebx
cmp byte [esi + 0xcb], 0
je 0x421028
lea ecx, [esi + 0xc0]
mov dword [ebp - 0x28], ecx
jmp 0x42102b
mov dword [ebp - 0x28], ebx
mov ecx, dword [esi + 0x74]
mov eax, dword [esi + 0x50]
mov edx, dword [eax]
mov edx, dword [edx + 0x14]
lea ebx, [ebp - 0x2c]
push ebx
mov ebx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp - 0x28]
push ebx
push ecx
lea ecx, [ebp - 0x64]
push ecx
lea ecx, [ebp - 0x20]
push ecx
mov ecx, dword [ebp - 0x18]
push ecx
push eax
call edx
mov ebx, eax
test ebx, ebx
je 0x421082
mov eax, dword [ebp - 0x18]
push eax
call fcn.009349e1
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.009349e1
add esp, 8
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x2c]
cmp eax, 5
ja case.default.0x42108e
jmp dword [eax*4 + 0x421440]
mov edx, dword [ebp - 0x18]
push edx
call fcn.009349e1
mov eax, dword [ebp - 0x3c]
push eax
call fcn.009349e1
add esp, 8
pop edi
pop esi
mov eax, 0x80004004
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.009349e1
mov edx, dword [ebp - 0x3c]
push edx
call fcn.009349e1
add esp, 8
jmp 0x421429
mov eax, dword [ebp - 0x18]
push eax
mov dword [esi + 0x48], 2
call fcn.009349e1
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.009349e1
add esp, 8
jmp 0x421429
mov dword [esi + 0x48], 1
jmp case.0x42108e.0
mov dword [esi + 0x48], 3
mov edx, dword [ebp - 0x18]
push edx
mov byte [ebp - 4], 0
call fcn.009349e1
add esp, 4
xor ebx, ebx
mov eax, dword [esi + 0x48]
cmp eax, 3
jne 0x4211ca
push edi
call fcn.0041ae70
test al, al
jne 0x4211be
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.00420b80
mov esi, eax
cmp esi, ebx
je 0x42119a
mov edx, dword [ebp - 0x3c]
push edx
call fcn.009349e1
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x18]
push eax
call fcn.009349e1
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.009349e1
add esp, 8
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x3c]
push eax
call fcn.009349e1
add esp, 4
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov byte [esi + 0x174], 1
jmp 0x421417
cmp eax, 4
jne 0x4212ec
push edi
lea ecx, [ebp - 0x24]
call fcn.00409dc0
lea ecx, [ebp - 0x24]
push ecx
mov byte [ebp - 4], 4
call fcn.0041ae70
test al, al
jne 0x421257
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.00420b80
mov esi, eax
cmp esi, ebx
je 0x42122a
mov edx, dword [ebp - 0x24]
push edx
call fcn.009349e1
mov eax, dword [ebp - 0x3c]
push eax
call fcn.009349e1
add esp, 8
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.009349e1
mov edx, dword [ebp - 0x3c]
push edx
call fcn.009349e1
add esp, 8
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0x24]
mov eax, dword [edi]
push ecx
push eax
call fcn.0040c5f0
test al, al
jne 0x4212db
call fcn.0040da40
push edi
lea edx, [ebp - 0x24]
push edx
push str.Cannot_rename_existing_file
push eax
mov ecx, esi
call fcn.00420cd0
mov esi, eax
cmp esi, ebx
je 0x4212ae
mov eax, dword [ebp - 0x24]
push eax
call fcn.009349e1
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.009349e1
add esp, 8
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp - 0x24]
push edx
call fcn.009349e1
mov eax, dword [ebp - 0x3c]
push eax
call fcn.009349e1
add esp, 8
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.009349e1
add esp, 4
jmp 0x421417
mov edx, dword [ebp - 0x44]
mov eax, dword [edi]
shr edx, 4
push eax
test dl, 1
je 0x42133f
call fcn.0040c5d0
test al, al
jne 0x421417
push edi
push str.Cannot_delete_output_folder
mov ecx, esi
call fcn.00420c00
mov esi, eax
cmp esi, ebx
je 0x420fad
mov eax, dword [ebp - 0x3c]
push eax
call fcn.009349e1
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
call fcn.0040d770
test al, al
je 0x421417
mov eax, dword [edi]
push eax
call fcn.0040c640
test al, al
jne 0x421417
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x421417
push edi
push str.Cannot_delete_output_file
mov ecx, esi
call fcn.00420c00
mov esi, eax
cmp esi, ebx
jne 0x42114c
mov eax, dword [ebp - 0x3c]
push eax
jmp 0x421421
mov eax, dword [edi]
push eax
call fcn.0040e3c0
mov esi, eax
cmp esi, ebx
jl 0x421417
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], bx
je 0x421417
push edi
lea ecx, [ebp - 0x18]
call fcn.00409dc0
mov byte [ebp - 4], 5
cmp esi, dword [ebp - 0x14]
jae 0x4213c0
mov edx, dword [ebp - 0x18]
xor ecx, ecx
mov dword [ebp - 0x14], esi
mov word [edx + esi*2], cx
lea ecx, [ebp - 0xa8]
call fcn.0040cc80
lea ecx, [ebp - 0x80]
call fcn.00409c70
mov eax, dword [ebp - 0x18]
push ebx
push eax
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 6
call fcn.0040d1c0
test al, al
je 0x421402
mov eax, dword [ebp - 0x88]
test al, 1
je 0x421402
mov ecx, dword [ebp - 0x18]
and eax, 0xfffffffe
push eax
push ecx
call fcn.0040c580
mov edx, dword [ebp - 0x80]
push edx
call fcn.009349e1
mov eax, dword [ebp - 0x18]
push eax
call fcn.009349e1
add esp, 8
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x3c]
mov byte [ecx], 0
push edx
call fcn.009349e1
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8