Function at 0x40b7c7
Capabilities:
Check if file exists

Disassembly:
push ebp
sub esp, 0x4c
mov eax, 0x4325b6
call fcn.00427c2c
sub esp, 0x38
mov eax, dword [ebp + 0x5c]
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp]
mov byte [eax], 1
call fcn.00404101
lea ecx, [ebp + 0x28]
call fcn.0040237b
mov edi, dword [ebp + 0x58]
mov eax, dword [edi]
and dword [ebp - 4], 0
push 0
push eax
lea ecx, [ebp]
call fcn.004046bf
test al, al
je 0x40ba37
mov eax, dword [esi + 0x64]
cmp eax, 2
jne 0x40b823
xor esi, esi
push dword [ebp + 0x28]
call fcn.00401dfb
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
add ebp, 0x50
leave
ret 8
test eax, eax
jne 0x40b923
mov ecx, edi
call fcn.004027d0
inc eax
push eax
lea eax, [ebp + 0x38]
push eax
mov ecx, edi
call fcn.00408b75
lea ecx, [ebp + 0x28]
push ecx
mov edx, eax
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 1
call fcn.00402357
push dword [ebp + 0x38]
mov byte [ebp - 4], 3
call fcn.00401dfb
movzx ebx, byte [esi + 0xd8]
pop ecx
mov eax, dword [esi + 0x34]
neg ebx
sbb ebx, ebx
mov ecx, dword [eax]
lea edx, [ebp + 0x58]
push edx
lea edx, [esi + 0xd0]
and ebx, edx
push ebx
movzx ebx, byte [esi + 0xc6]
neg ebx
lea edx, [esi + 0xb8]
sbb ebx, ebx
and ebx, edx
push ebx
push dword [esi + 0x6c]
lea edx, [ebp]
push edx
lea edx, [ebp + 0x18]
push edx
push dword [ebp + 0x44]
push eax
call dword [ecx + 0x14]
mov ebx, eax
test ebx, ebx
je 0x40b8b7
push dword [ebp + 0x44]
call fcn.00401dfb
pop ecx
mov esi, ebx
jmp 0x40b804
mov eax, dword [ebp + 0x58]
sub eax, 0
je 0x40b916
dec eax
je 0x40b90f
dec eax
je 0x40b901
dec eax
je 0x40b8fa
dec eax
je 0x40b8f1
dec eax
push dword [ebp + 0x44]
je 0x40b8e1
call fcn.00401dfb
pop ecx
mov esi, 0x80004005
jmp 0x40b804
call fcn.00401dfb
pop ecx
mov esi, 0x80004004
jmp 0x40b804
mov dword [esi + 0x64], 3
jmp 0x40b916
mov dword [esi + 0x64], 2
push dword [ebp + 0x44]
call fcn.00401dfb
pop ecx
jmp 0x40b802
mov dword [esi + 0x64], 1
push dword [ebp + 0x44]
mov byte [ebp - 4], 0
call fcn.00401dfb
pop ecx
mov eax, dword [esi + 0x64]
cmp eax, 3
jne 0x40b95a
mov ecx, edi
call fcn.0040728e
test al, al
jne 0x40b94e
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.0040b505
test eax, eax
je 0x40b8d7
mov esi, eax
jmp 0x40b804
mov byte [esi + 0x174], 1
jmp 0x40bab9
cmp eax, 4
jne 0x40b9d1
push edi
lea ecx, [ebp + 0x38]
call fcn.00402432
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 4
call fcn.0040728e
test al, al
jne 0x40b99d
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.0040b505
push dword [ebp + 0x38]
mov esi, eax
test esi, esi
je 0x40b8d1
call fcn.00401dfb
pop ecx
jmp 0x40b804
mov ecx, dword [edi]
mov edx, dword [ebp + 0x38]
call fcn.00403c10
test al, al
jne 0x40b9c4
call fcn.00404d74
push edi
lea ecx, [ebp + 0x38]
push ecx
push str.Cannot_rename_existing_file
push eax
mov ecx, esi
call fcn.0040b5ea
jmp 0x40b985
push dword [ebp + 0x38]
call fcn.00401dfb
jmp 0x40bab8
mov eax, dword [ebp + 0x20]
mov ecx, dword [edi]
shr eax, 4
test al, 1
je 0x40ba04
call fcn.00403bcb
test al, al
jne 0x40bab9
push edi
push str.Cannot_delete_output_folder
mov ecx, esi
call fcn.0040b558
test eax, eax
je 0x40b802
jmp 0x40b947
call fcn.00404ada
test al, al
je 0x40bab9
mov ecx, dword [edi]
call fcn.00403cda
test al, al
jne 0x40bab9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40bab9
push edi
push str.Cannot_delete_output_file
jmp 0x40b9f0
mov ecx, dword [edi]
call fcn.00405465
mov esi, eax
test esi, esi
js 0x40bab9
mov eax, dword [edi]
lea ebx, [esi + esi]
cmp word [ebx + eax + 2], 0
je 0x40bab9
push edi
lea ecx, [ebp + 0x44]
call fcn.00402432
mov byte [ebp - 4], 5
cmp esi, dword [ebp + 0x48]
jae 0x40ba6f
mov ecx, dword [ebp + 0x44]
xor eax, eax
mov dword [ebp + 0x48], esi
mov word [ebx + ecx], ax
lea ecx, [ebp - 0x44]
call fcn.00404101
lea ecx, [ebp - 0x1c]
call fcn.0040237b
push 0
push dword [ebp + 0x44]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 6
call fcn.004046bf
test al, al
je 0x40baa7
mov edx, dword [ebp - 0x24]
test dl, 1
je 0x40baa7
mov ecx, dword [ebp + 0x44]
and edx, 0xfffffffe
call fcn.00403b6e
push dword [ebp - 0x1c]
call fcn.00401dfb
push dword [ebp + 0x44]
call fcn.00401dfb
pop ecx
pop ecx
mov eax, dword [ebp + 0x5c]
mov byte [eax], 0
jmp 0x40b802