Function at 0x42112d
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x99c593
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 0x4213ab
mov eax, dword [esi + 0x48]
cmp eax, 2
jne 0x420fd6
mov ecx, dword [ebp - 0x3c]
push ecx
jmp 0x421441
cmp eax, ebx
jne 0x42113f
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.00936471
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 0x421031
lea eax, [esi + 0xd8]
mov dword [ebp + 8], eax
jmp 0x421034
mov dword [ebp + 8], ebx
cmp byte [esi + 0xcb], 0
je 0x421048
lea ecx, [esi + 0xc0]
mov dword [ebp - 0x28], ecx
jmp 0x42104b
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 0x4210a2
mov eax, dword [ebp - 0x18]
push eax
call fcn.00936471
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00936471
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.0x4210ae
jmp dword [eax*4 + 0x421460]
mov edx, dword [ebp - 0x18]
push edx
call fcn.00936471
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00936471
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.00936471
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00936471
add esp, 8
jmp 0x421449
mov eax, dword [ebp - 0x18]
push eax
mov dword [esi + 0x48], 2
call fcn.00936471
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00936471
add esp, 8
jmp 0x421449
mov dword [esi + 0x48], 1
jmp case.0x4210ae.0
mov dword [esi + 0x48], 3
mov edx, dword [ebp - 0x18]
push edx
mov byte [ebp - 4], 0
call fcn.00936471
add esp, 4
xor ebx, ebx
mov eax, dword [esi + 0x48]
cmp eax, 3
jne 0x4211ea
push edi
call fcn.0041ae90
test al, al
jne 0x4211de
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.00420ba0
mov esi, eax
cmp esi, ebx
je 0x4211ba
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00936471
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.00936471
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00936471
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.00936471
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 0x421437
cmp eax, 4
jne 0x42130c
push edi
lea ecx, [ebp - 0x24]
call fcn.00409dc0
lea ecx, [ebp - 0x24]
push ecx
mov byte [ebp - 4], 4
call fcn.0041ae90
test al, al
jne 0x421277
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.00420ba0
mov esi, eax
cmp esi, ebx
je 0x42124a
mov edx, dword [ebp - 0x24]
push edx
call fcn.00936471
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00936471
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.00936471
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00936471
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 0x4212fb
call fcn.0040da40
push edi
lea edx, [ebp - 0x24]
push edx
push str.Cannot_rename_existing_file
push eax
mov ecx, esi
call fcn.00420cf0
mov esi, eax
cmp esi, ebx
je 0x4212ce
mov eax, dword [ebp - 0x24]
push eax
call fcn.00936471
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00936471
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.00936471
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00936471
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.00936471
add esp, 4
jmp 0x421437
mov edx, dword [ebp - 0x44]
mov eax, dword [edi]
shr edx, 4
push eax
test dl, 1
je 0x42135f
call fcn.0040c5d0
test al, al
jne 0x421437
push edi
push str.Cannot_delete_output_folder
mov ecx, esi
call fcn.00420c20
mov esi, eax
cmp esi, ebx
je 0x420fcd
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00936471
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 0x421437
mov eax, dword [edi]
push eax
call fcn.0040c640
test al, al
jne 0x421437
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x421437
push edi
push str.Cannot_delete_output_file
mov ecx, esi
call fcn.00420c20
mov esi, eax
cmp esi, ebx
jne 0x42116c
mov eax, dword [ebp - 0x3c]
push eax
jmp 0x421441
mov eax, dword [edi]
push eax
call fcn.0040e3c0
mov esi, eax
cmp esi, ebx
jl 0x421437
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], bx
je 0x421437
push edi
lea ecx, [ebp - 0x18]
call fcn.00409dc0
mov byte [ebp - 4], 5
cmp esi, dword [ebp - 0x14]
jae 0x4213e0
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 0x421422
mov eax, dword [ebp - 0x88]
test al, 1
je 0x421422
mov ecx, dword [ebp - 0x18]
and eax, 0xfffffffe
push eax
push ecx
call fcn.0040c580
mov edx, dword [ebp - 0x80]
push edx
call fcn.00936471
mov eax, dword [ebp - 0x18]
push eax
call fcn.00936471
add esp, 8
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x3c]
mov byte [ecx], 0
push edx
call fcn.00936471
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