Function at 0x4211a6
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x9e7a93
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.0040cce0
lea ecx, [ebp - 0x3c]
call fcn.00409cd0
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.0040d230
test al, al
je 0x42142b
mov eax, dword [esi + 0x48]
cmp eax, 2
jne 0x421056
mov ecx, dword [ebp - 0x3c]
push ecx
jmp 0x4214c1
cmp eax, ebx
jne 0x4211bf
mov ecx, edi
call fcn.0040a3c0
inc eax
push eax
lea edx, [ebp - 0x70]
push edx
mov ecx, edi
call fcn.004192c0
lea ecx, [ebp - 0x3c]
push ecx
push eax
lea edx, [ebp - 0x18]
push edx
mov byte [ebp - 4], 1
call fcn.00409c40
mov eax, dword [ebp - 0x70]
push eax
mov byte [ebp - 4], 3
call fcn.00981a41
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 0x4210b1
lea eax, [esi + 0xd8]
mov dword [ebp + 8], eax
jmp 0x4210b4
mov dword [ebp + 8], ebx
cmp byte [esi + 0xcb], 0
je 0x4210c8
lea ecx, [esi + 0xc0]
mov dword [ebp - 0x28], ecx
jmp 0x4210cb
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 0x421122
mov eax, dword [ebp - 0x18]
push eax
call fcn.00981a41
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00981a41
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.0x42112e
jmp dword [eax*4 + 0x4214e0]
mov edx, dword [ebp - 0x18]
push edx
call fcn.00981a41
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00981a41
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.00981a41
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00981a41
add esp, 8
jmp 0x4214c9
mov eax, dword [ebp - 0x18]
push eax
mov dword [esi + 0x48], 2
call fcn.00981a41
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00981a41
add esp, 8
jmp 0x4214c9
mov dword [esi + 0x48], 1
jmp case.0x42112e.0
mov dword [esi + 0x48], 3
mov edx, dword [ebp - 0x18]
push edx
mov byte [ebp - 4], 0
call fcn.00981a41
add esp, 4
xor ebx, ebx
mov eax, dword [esi + 0x48]
cmp eax, 3
jne 0x42126a
push edi
call fcn.0041af20
test al, al
jne 0x42125e
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.00420c20
mov esi, eax
cmp esi, ebx
je 0x42123a
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00981a41
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.00981a41
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00981a41
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.00981a41
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 0x4214b7
cmp eax, 4
jne 0x42138c
push edi
lea ecx, [ebp - 0x24]
call fcn.00409e20
lea ecx, [ebp - 0x24]
push ecx
mov byte [ebp - 4], 4
call fcn.0041af20
test al, al
jne 0x4212f7
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.00420c20
mov esi, eax
cmp esi, ebx
je 0x4212ca
mov edx, dword [ebp - 0x24]
push edx
call fcn.00981a41
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00981a41
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.00981a41
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00981a41
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.0040c650
test al, al
jne 0x42137b
call fcn.0040dab0
push edi
lea edx, [ebp - 0x24]
push edx
push str.Cannot_rename_existing_file
push eax
mov ecx, esi
call fcn.00420d70
mov esi, eax
cmp esi, ebx
je 0x42134e
mov eax, dword [ebp - 0x24]
push eax
call fcn.00981a41
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00981a41
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.00981a41
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00981a41
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.00981a41
add esp, 4
jmp 0x4214b7
mov edx, dword [ebp - 0x44]
mov eax, dword [edi]
shr edx, 4
push eax
test dl, 1
je 0x4213df
call fcn.0040c630
test al, al
jne 0x4214b7
push edi
push str.Cannot_delete_output_folder
mov ecx, esi
call fcn.00420ca0
mov esi, eax
cmp esi, ebx
je 0x42104d
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00981a41
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.0040d7e0
test al, al
je 0x4214b7
mov eax, dword [edi]
push eax
call fcn.0040c6a0
test al, al
jne 0x4214b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4214b7
push edi
push str.Cannot_delete_output_file
mov ecx, esi
call fcn.00420ca0
mov esi, eax
cmp esi, ebx
jne 0x4211ec
mov eax, dword [ebp - 0x3c]
push eax
jmp 0x4214c1
mov eax, dword [edi]
push eax
call fcn.0040e430
mov esi, eax
cmp esi, ebx
jl 0x4214b7
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], bx
je 0x4214b7
push edi
lea ecx, [ebp - 0x18]
call fcn.00409e20
mov byte [ebp - 4], 5
cmp esi, dword [ebp - 0x14]
jae 0x421460
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.0040cce0
lea ecx, [ebp - 0x80]
call fcn.00409cd0
mov eax, dword [ebp - 0x18]
push ebx
push eax
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 6
call fcn.0040d230
test al, al
je 0x4214a2
mov eax, dword [ebp - 0x88]
test al, 1
je 0x4214a2
mov ecx, dword [ebp - 0x18]
and eax, 0xfffffffe
push eax
push ecx
call fcn.0040c5e0
mov edx, dword [ebp - 0x80]
push edx
call fcn.00981a41
mov eax, dword [ebp - 0x18]
push eax
call fcn.00981a41
add esp, 8
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x3c]
mov byte [ecx], 0
push edx
call fcn.00981a41
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