Function at 0x4840c0
Capabilities:
Check if file exists

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x70
push 0xffffffffffffffff
push 0x499823
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x4b600c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp + 0x6c], ecx
mov eax, dword [ebp + 0x7c]
mov byte [eax], 1
lea ecx, [ebp - 0x80]
call fcn.00402f00
mov dword [ebp - 4], 0
push 0
mov ecx, dword [ebp + 0x78]
call fcn.00401380
push eax
lea ecx, [ebp - 0x80]
call fcn.0046dda0
movzx ecx, al
test ecx, ecx
je 0x48463d
mov edx, dword [ebp + 0x6c]
cmp dword [edx + 0x48], 2
jne 0x48414a
mov dword [ebp - 0x38], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp - 0x38]
jmp 0x48471c
mov eax, dword [ebp + 0x6c]
cmp dword [eax + 0x48], 0
jne 0x484364
mov ecx, dword [ebp + 0x78]
call fcn.00468d20
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
add ecx, 1
push ecx
lea edx, [ebp - 0x94]
push edx
mov ecx, dword [ebp + 0x78]
call fcn.00407c30
mov dword [ebp + 0x24], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp + 0x20], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x58]
push ecx
mov edx, dword [ebp + 0x20]
push edx
lea eax, [ebp + 0x28]
push eax
call fcn.004693c0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x94]
call fcn.004012a0
lea ecx, [ebp - 0x88]
push ecx
lea edx, [ebp - 0x68]
push edx
call fcn.0040b700
mov eax, dword [ebp + 0x6c]
movzx ecx, byte [eax + 0x3b]
test ecx, ecx
je 0x4841ce
mov edx, dword [ebp + 0x6c]
add edx, 0xd8
mov dword [ebp + 0x64], edx
jmp 0x4841d5
mov dword [ebp + 0x64], 0
mov eax, dword [ebp + 0x6c]
movzx ecx, byte [eax + 0xcb]
test ecx, ecx
je 0x4841f1
mov edx, dword [ebp + 0x6c]
add edx, 0xc0
mov dword [ebp + 0x60], edx
jmp 0x4841f8
mov dword [ebp + 0x60], 0
mov ecx, dword [ebp + 0x6c]
add ecx, 0x50
call fcn.00401380
mov dword [ebp + 0x5c], eax
lea eax, [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x64]
push ecx
mov edx, dword [ebp + 0x60]
push edx
mov ecx, dword [ebp + 0x6c]
add ecx, 0x74
call fcn.00401380
push eax
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x88]
push ecx
lea ecx, [ebp + 0x28]
call fcn.00401380
push eax
mov edx, dword [ebp + 0x5c]
push edx
mov eax, dword [ebp + 0x5c]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x14]
call edx
mov dword [ebp + 0x58], eax
cmp dword [ebp + 0x58], 0
je 0x484272
mov eax, dword [ebp + 0x58]
mov dword [ebp + 0x1c], eax
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x28]
call fcn.004012a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp + 0x1c]
jmp 0x48471c
mov ecx, dword [ebp + 0x18]
mov dword [ebp + 0x54], ecx
cmp dword [ebp + 0x54], 5
ja case.default.0x484285
mov edx, dword [ebp + 0x54]
jmp dword [edx*4 + 0x484730]
mov dword [ebp + 0x14], 0x80004004
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x28]
call fcn.004012a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp + 0x14]
jmp 0x48471c
mov dword [ebp + 0x10], 0
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x28]
call fcn.004012a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp + 0x10]
jmp 0x48471c
mov eax, dword [ebp + 0x6c]
mov dword [eax + 0x48], 2
mov dword [ebp + 0xc], 0
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x28]
call fcn.004012a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp + 0xc]
jmp 0x48471c
jmp 0x484358
mov ecx, dword [ebp + 0x6c]
mov dword [ecx + 0x48], 1
jmp 0x484358
mov edx, dword [ebp + 0x6c]
mov dword [edx + 0x48], 3
jmp 0x484358
mov dword [ebp + 8], 0x80004005
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x28]
call fcn.004012a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp + 8]
jmp 0x48471c
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x28]
call fcn.004012a0
mov eax, dword [ebp + 0x6c]
cmp dword [eax + 0x48], 3
jne 0x4843e3
mov ecx, dword [ebp + 0x78]
push ecx
call fcn.0047bb60
movzx edx, al
test edx, edx
jne 0x4843d4
mov eax, dword [ebp + 0x78]
push eax
mov ecx, dword [str.Cannot_create_file_with_auto_name]
push ecx
mov ecx, dword [ebp + 0x6c]
call fcn.00484f90
mov dword [ebp + 0x50], eax
cmp dword [ebp + 0x50], 0
je 0x4843b6
mov edx, dword [ebp + 0x50]
mov dword [ebp + 4], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp + 4]
jmp 0x48471c
mov dword [ebp], 0x80004005
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp]
jmp 0x48471c
mov eax, dword [ebp + 0x6c]
mov byte [eax + 0x174], 1
jmp 0x484638
mov ecx, dword [ebp + 0x6c]
cmp dword [ecx + 0x48], 4
jne 0x48452c
mov edx, dword [ebp + 0x78]
push edx
lea ecx, [ebp + 0x34]
call fcn.0046a120
mov byte [ebp - 4], 4
lea eax, [ebp + 0x34]
push eax
call fcn.0047bb60
movzx ecx, al
test ecx, ecx
jne 0x48447e
mov edx, dword [ebp + 0x78]
push edx
mov eax, dword [str.Cannot_create_file_with_auto_name]
push eax
mov ecx, dword [ebp + 0x6c]
call fcn.00484f90
mov dword [ebp + 0x4c], eax
cmp dword [ebp + 0x4c], 0
je 0x484454
mov ecx, dword [ebp + 0x4c]
mov dword [ebp - 0x10], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x34]
call fcn.004012a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp - 0x10]
jmp 0x48471c
mov dword [ebp - 0x14], 0x80004005
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x34]
call fcn.004012a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp - 0x14]
jmp 0x48471c
lea ecx, [ebp + 0x34]
call fcn.00401380
push eax
mov ecx, dword [ebp + 0x78]
call fcn.00401380
push eax
call fcn.0046cf30
movzx edx, al
test edx, edx
jne 0x48451b
call fcn.0046eca0
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x78]
push eax
lea ecx, [ebp + 0x34]
push ecx
mov edx, dword [str.Cannot_rename_existing_file]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 0x6c]
call fcn.00484db0
mov dword [ebp + 0x48], eax
cmp dword [ebp + 0x48], 0
je 0x4844f1
mov ecx, dword [ebp + 0x48]
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x34]
call fcn.004012a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp - 0x1c]
jmp 0x48471c
mov dword [ebp - 0x20], 0x80004005
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x34]
call fcn.004012a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp - 0x20]
jmp 0x48471c
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x34]
call fcn.004012a0
jmp 0x484638
lea ecx, [ebp - 0x80]
call fcn.00402e80
movzx edx, al
test edx, edx
je 0x4845ac
mov ecx, dword [ebp + 0x78]
call fcn.00401380
push eax
call fcn.0046d010
movzx eax, al
test eax, eax
jne 0x4845a7
mov ecx, dword [ebp + 0x78]
push ecx
mov edx, dword [str.Cannot_delete_output_folder]
push edx
mov ecx, dword [ebp + 0x6c]
call fcn.00484ea0
mov dword [ebp + 0x44], eax
cmp dword [ebp + 0x44], 0
je 0x484589
mov eax, dword [ebp + 0x44]
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp - 0x24]
jmp 0x48471c
mov dword [ebp - 0x28], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp - 0x28]
jmp 0x48471c
jmp 0x484638
mov ecx, dword [ebp + 0x78]
call fcn.00401380
push eax
call fcn.0046e610
movzx ecx, al
test ecx, ecx
je 0x484638
mov ecx, dword [ebp + 0x78]
call fcn.00401380
push eax
call fcn.0046c9a0
movzx edx, al
test edx, edx
jne 0x484638
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x484638
mov eax, dword [ebp + 0x78]
push eax
mov ecx, dword [str.Cannot_delete_output_file]
push ecx
mov ecx, dword [ebp + 0x6c]
call fcn.00484ea0
mov dword [ebp + 0x40], eax
cmp dword [ebp + 0x40], 0
je 0x48461a
mov edx, dword [ebp + 0x40]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp - 0x2c]
jmp 0x48471c
mov dword [ebp - 0x30], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp - 0x30]
jmp 0x48471c
jmp 0x4846fd
mov ecx, dword [ebp + 0x78]
call fcn.00401380
push eax
call fcn.0046f9b0
mov dword [ebp + 0x68], eax
cmp dword [ebp + 0x68], 0
jl 0x4846fd
mov ecx, dword [ebp + 0x78]
call fcn.00401380
mov ecx, dword [ebp + 0x68]
movzx edx, word [eax + ecx*2 + 2]
test edx, edx
je 0x4846fd
mov eax, dword [ebp + 0x78]
push eax
lea ecx, [ebp - 0x48]
call fcn.0046a120
mov byte [ebp - 4], 5
mov ecx, dword [ebp + 0x68]
push ecx
lea ecx, [ebp - 0x48]
call fcn.00402da0
lea ecx, [ebp - 0xcc]
call fcn.00402f00
mov byte [ebp - 4], 6
push 0
lea ecx, [ebp - 0x48]
call fcn.00401380
push eax
lea ecx, [ebp - 0xcc]
call fcn.0046dda0
movzx edx, al
test edx, edx
je 0x4846e2
lea ecx, [ebp - 0xcc]
call fcn.0040b740
movzx eax, al
test eax, eax
je 0x4846e2
mov ecx, dword [ebp - 0xac]
and ecx, 0xfffffffe
push ecx
lea ecx, [ebp - 0x48]
call fcn.00401380
push eax
call fcn.0046d0e0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xcc]
call fcn.00402f30
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.004012a0
mov edx, dword [ebp + 0x7c]
mov byte [edx], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x80]
call fcn.00402f30
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
add ebp, 0x70
mov esp, ebp
pop ebp
ret 8