Function at 0x416044
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
lea eax, [ebp - 0xbc]
sub esp, 0xe0
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0xa4], 0x454964
mov dword [ebp - 0xa0], 0x455e9e
mov dword [ebp - 0x9c], ebp
mov dword [ebp - 0x98], 0x416502
mov dword [ebp - 0x94], esp
mov dword [esp], eax
call fcn.00442d0b
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x78]
mov byte [eax], 1
call fcn.0040a806
lea ecx, [ebp - 0x50]
or dword [ebp - 0xb8], 0xffffffff
call fcn.00404ec0
and dword [esp + 4], 0
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x78]
mov eax, dword [eax]
mov dword [esp], eax
mov dword [ebp - 0xb8], 1
call fcn.0040b0da
push ebx
push ebx
test al, al
je 0x41640e
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 0x48]
cmp eax, 2
je 0x4164f9
test eax, eax
jne 0x416239
mov ecx, dword [ebp + 8]
call fcn.004055ea
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x40]
inc eax
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00404d20
push ecx
lea eax, [ebp - 0x84]
lea esi, [ebp - 0x50]
push ecx
lea edx, [ebp - 0x40]
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [ebp - 0xb8], 2
call fcn.00404e0a
mov eax, dword [ebp - 0x40]
call fcn.004155ec
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x5c]
xor ecx, ecx
mov esi, dword [ebp - 0xc0]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0x3c], edx
cmp byte [esi + 0x3b], 0
mov eax, dword [eax + 0x50]
mov edx, dword [eax]
mov ebx, dword [edx + 0x14]
je 0x416166
lea ecx, [esi + 0xd8]
mov esi, dword [ebp - 0xc0]
xor edx, edx
cmp byte [esi + 0xcb], 0
je 0x41617d
lea edx, [esi + 0xc0]
lea esi, [ebp - 0x88]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], edx
mov esi, dword [ebp - 0xc0]
mov edx, dword [esi + 0x74]
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x78]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x40]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x84]
mov dword [esp], eax
mov dword [esp + 4], edx
call ebx
sub esp, 0x20
test eax, eax
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp - 0x84]
jne case.0x4161df.2
cmp dword [ebp - 0x88], 5
ja case.default.0x4161df
mov edx, dword [ebp - 0x88]
jmp dword [edx*4 + 0x458a70]
mov dword [ebp - 0xc4], 0x80004004
jmp case.0x4161df.2
mov ebx, dword [ebp - 0xc0]
mov dword [ebx + 0x48], 2
jmp case.0x4161df.2
mov ebx, dword [ebp - 0xc0]
mov dword [ebx + 0x48], 1
jmp case.0x4161df.0
mov ebx, dword [ebp - 0xc0]
mov dword [ebx + 0x48], 3
call fcn.004155ec
jmp 0x416239
mov dword [ebp - 0xc4], 0x80004005
jmp case.0x4161df.2
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 0x48]
cmp eax, 3
jne 0x4162aa
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov dword [ebp - 0xb8], 1
call fcn.00412041
test al, al
jne 0x416298
mov eax, dword [ebp + 8]
mov dword [esp], str.Cannot_create_file_with_auto_name
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0xc0]
call fcn.00415996
push edx
push edx
mov dword [ebp - 0xc4], eax
test eax, eax
jne 0x41655d
mov dword [ebp - 0xc4], 0x80004005
jmp 0x41655d
mov eax, dword [ebp - 0xc0]
mov byte [eax + 0x174], 1
jmp 0x4164f3
cmp eax, 4
mov eax, dword [ebp + 8]
jne 0x41637b
mov dword [esp], eax
lea ecx, [ebp - 0x40]
mov dword [ebp - 0xb8], 1
call fcn.00405020
push eax
lea eax, [ebp - 0x40]
mov dword [esp], eax
mov dword [ebp - 0xb8], 3
call fcn.00412041
test al, al
jne 0x416302
mov eax, dword [ebp + 8]
mov dword [esp], str.Cannot_create_file_with_auto_name
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0xc0]
call fcn.00415996
push esi
push esi
jmp 0x416350
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp], eax
mov dword [ebp - 0xb8], 3
call fcn.004090f5
test al, al
jne 0x416366
call fcn.0040bf18
mov ebx, dword [ebp + 8]
mov dword [esp + 4], str.Cannot_rename_existing_file
mov dword [esp], eax
mov dword [esp + 0xc], ebx
lea ebx, [ebp - 0x40]
mov dword [esp + 8], ebx
mov ecx, dword [ebp - 0xc0]
call fcn.00415c94
sub esp, 0x10
mov dword [ebp - 0xc4], eax
test eax, eax
jne 0x41636e
mov dword [ebp - 0xc4], 0x80004005
jmp 0x41636e
mov eax, dword [ebp - 0x40]
jmp 0x4164ee
mov eax, dword [ebp - 0x40]
call fcn.004155ec
jmp 0x41655d
mov eax, dword [eax]
test byte [ebp - 0x58], 0x10
mov dword [esp], eax
mov dword [ebp - 0xb8], 1
je 0x4163b7
call fcn.00409041
test al, al
jne 0x4164f3
mov eax, dword [ebp + 8]
mov dword [esp], str.Cannot_delete_output_folder
mov dword [esp + 4], eax
mov dword [ebp - 0xb8], 1
jmp 0x4163f6
call fcn.0040b792
test al, al
je 0x4164f3
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.004096a5
test al, al
jne 0x4164f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4164f3
mov eax, dword [ebp + 8]
mov dword [esp], str.Cannot_delete_output_file
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0xc0]
call fcn.00415b7a
push ebx
push ebx
mov dword [ebp - 0xc4], eax
jmp 0x41655d
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0040cf83
mov dword [ebp - 0xc0], eax
test eax, eax
js 0x4164f3
inc eax
add eax, eax
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp + 8]
mov ebx, dword [ebp - 0xc4]
mov eax, dword [eax]
cmp word [eax + ebx], 0
je 0x4164f3
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x84]
mov dword [esp], eax
mov dword [ebp - 0xb8], 1
call fcn.00405020
push ecx
mov eax, dword [ebp - 0xc0]
cmp eax, dword [ebp - 0x80]
jae 0x416484
mov dword [ebp - 0x80], eax
mov esi, dword [ebp - 0xc4]
mov eax, dword [ebp - 0x84]
and word [eax + esi - 2], 0
lea ecx, [ebp - 0x40]
call fcn.0040a806
lea ecx, [ebp - 0x18]
mov dword [ebp - 0xb8], 4
call fcn.00404ec0
and dword [esp + 4], 0
mov eax, dword [ebp - 0x84]
lea ecx, [ebp - 0x40]
mov dword [esp], eax
mov dword [ebp - 0xb8], 5
call fcn.0040b0da
push edx
push edx
test al, al
je 0x4164e0
mov eax, dword [ebp - 0x20]
test al, 1
je 0x4164e0
and eax, 0xfffffffe
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x84]
mov dword [esp], eax
call fcn.00408f5c
mov eax, dword [ebp - 0x18]
call fcn.004155ec
mov eax, dword [ebp - 0x84]
call fcn.004155ec
mov eax, dword [ebp + 0xc]
mov byte [eax], 0
and dword [ebp - 0xc4], 0
jmp 0x41655d
mov eax, dword [ebp - 0x50]
call fcn.004155ec
lea eax, [ebp - 0xbc]
mov dword [esp], eax
call fcn.00442d61
mov eax, dword [ebp - 0xc4]
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret 8