Function at 0x510900
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64e06c
mov eax, dword fs:[0]
push eax
sub esp, 0x130
mov eax, dword [0x6a56e8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp + 0xc]
mov byte [eax], 1
lea ecx, [ebp - 0xf0]
call fcn.0049d750
mov dword [ebp - 4], 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040b0c0
push eax
lea ecx, [ebp - 0xf0]
call fcn.0050e5b0
movzx ecx, al
test ecx, ecx
je 0x510f05
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x48], 2
jne 0x510994
mov dword [ebp - 0xa8], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0xa8]
jmp 0x510ffc
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x48], 0
jne 0x510bcf
mov ecx, dword [ebp + 8]
call fcn.0049b480
mov dword [ebp - 0xac], eax
lea ecx, [ebp - 0xc8]
push ecx
mov edx, dword [ebp - 0xac]
add edx, 1
push edx
lea eax, [ebp - 0x104]
push eax
mov ecx, dword [ebp + 8]
call fcn.004a1890
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x5c], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x5c]
push edx
lea eax, [ebp - 0x54]
push eax
call fcn.00499ee0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x104]
call fcn.00485d80
lea ecx, [ebp - 0xf8]
push ecx
lea edx, [ebp - 0xd8]
push edx
call fcn.00511e30
mov eax, dword [ebp - 0x10]
movzx ecx, byte [eax + 0x3b]
test ecx, ecx
je 0x510a24
mov edx, dword [ebp - 0x10]
add edx, 0x108
mov dword [ebp - 0x18], edx
jmp 0x510a2b
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x10]
movzx ecx, byte [eax + 0xfb]
test ecx, ecx
je 0x510a47
mov edx, dword [ebp - 0x10]
add edx, 0xf0
mov dword [ebp - 0x1c], edx
jmp 0x510a4e
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0x10]
add ecx, 0x50
call fcn.0040b0c0
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x64]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov ecx, dword [ebp - 0x10]
add ecx, 0x80
call fcn.0040b0c0
push eax
lea eax, [ebp - 0xf0]
push eax
lea ecx, [ebp - 0xf8]
push ecx
lea ecx, [ebp - 0x54]
call fcn.0040b0c0
push eax
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x14]
call edx
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x510ad1
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x54]
call fcn.00485d80
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x60]
jmp 0x510ffc
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x28], 5
ja case.default.0x510ae4
mov edx, dword [ebp - 0x28]
jmp dword [edx*4 + 0x511010]
mov dword [ebp - 0x68], 0x80004004
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x54]
call fcn.00485d80
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x68]
jmp 0x510ffc
mov dword [ebp - 0x6c], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x54]
call fcn.00485d80
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x6c]
jmp 0x510ffc
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x48], 2
mov dword [ebp - 0x70], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x54]
call fcn.00485d80
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x70]
jmp 0x510ffc
jmp 0x510bc3
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x48], 1
jmp 0x510bc3
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x48], 3
jmp 0x510bc3
mov dword [ebp - 0x74], 0x80004005
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x54]
call fcn.00485d80
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x74]
jmp 0x510ffc
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x54]
call fcn.00485d80
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x48], 3
jne 0x510c54
mov ecx, dword [ebp + 8]
push ecx
call fcn.00559570
movzx edx, al
test edx, edx
jne 0x510c45
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [str.Cannot_create_file_with_auto_name]
push ecx
mov ecx, dword [ebp - 0x10]
call fcn.00515ec0
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x510c24
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x78], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x78]
jmp 0x510ffc
mov dword [ebp - 0x7c], 0x80004005
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x7c]
jmp 0x510ffc
mov eax, dword [ebp - 0x10]
mov byte [eax + 0x1f0], 1
jmp 0x510f00
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x48], 4
jne 0x510dc5
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x48]
call fcn.00499830
mov byte [ebp - 4], 4
lea eax, [ebp - 0x48]
push eax
call fcn.00559570
movzx ecx, al
test ecx, ecx
jne 0x510cfb
mov edx, dword [ebp + 8]
push edx
mov eax, dword [str.Cannot_create_file_with_auto_name]
push eax
mov ecx, dword [ebp - 0x10]
call fcn.00515ec0
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x510cc8
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x80], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00485d80
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x80]
jmp 0x510ffc
mov dword [ebp - 0x84], 0x80004005
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00485d80
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x84]
jmp 0x510ffc
lea ecx, [ebp - 0x48]
call fcn.0040b0c0
push eax
mov ecx, dword [ebp + 8]
call fcn.0040b0c0
push eax
call fcn.0050bf10
movzx edx, al
test edx, edx
jne 0x510db4
call fcn.00517a60
mov dword [ebp - 0x88], eax
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [str.Cannot_rename_existing_file]
push edx
mov eax, dword [ebp - 0x88]
push eax
mov ecx, dword [ebp - 0x10]
call fcn.00515dd0
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x510d81
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x8c], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00485d80
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x8c]
jmp 0x510ffc
mov dword [ebp - 0x90], 0x80004005
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00485d80
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x90]
jmp 0x510ffc
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.00485d80
jmp 0x510f00
lea ecx, [ebp - 0xf0]
call fcn.004a15f0
movzx edx, al
test edx, edx
je 0x510e5e
mov ecx, dword [ebp + 8]
call fcn.0040b0c0
push eax
call fcn.0050c170
movzx eax, al
test eax, eax
jne 0x510e59
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [str.Cannot_delete_output_folder]
push edx
mov ecx, dword [ebp - 0x10]
call fcn.00515f60
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x510e32
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x94], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x94]
jmp 0x510ffc
mov dword [ebp - 0x98], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x98]
jmp 0x510ffc
jmp 0x510f00
mov ecx, dword [ebp + 8]
call fcn.0040b0c0
push eax
call fcn.0050e410
movzx ecx, al
test ecx, ecx
je 0x510f00
mov ecx, dword [ebp + 8]
call fcn.0040b0c0
push eax
call fcn.0050b8d0
movzx edx, al
test edx, edx
jne 0x510f00
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x510f00
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [str.Cannot_delete_output_file]
push ecx
mov ecx, dword [ebp - 0x10]
call fcn.00515f60
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x510ed9
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x9c], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0x9c]
jmp 0x510ffc
mov dword [ebp - 0xa0], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0xa0]
jmp 0x510ffc
jmp 0x510fd4
mov ecx, dword [ebp + 8]
call fcn.0040b0c0
push eax
call fcn.0050c7e0
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jl 0x510fd4
mov ecx, dword [ebp + 8]
call fcn.0040b0c0
mov ecx, dword [ebp - 0x14]
movzx edx, word [eax + ecx*2 + 2]
test edx, edx
je 0x510fd4
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0xb8]
call fcn.00499830
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x14]
push ecx
lea ecx, [ebp - 0xb8]
call fcn.00492230
lea ecx, [ebp - 0x13c]
call fcn.0049d750
mov byte [ebp - 4], 6
push 0
lea ecx, [ebp - 0xb8]
call fcn.0040b0c0
push eax
lea ecx, [ebp - 0x13c]
call fcn.0050e5b0
movzx edx, al
test edx, edx
je 0x510fb6
lea ecx, [ebp - 0x13c]
call fcn.004be1c0
movzx eax, al
test eax, eax
je 0x510fb6
mov ecx, dword [ebp - 0x11c]
and ecx, 0xfffffffe
push ecx
lea ecx, [ebp - 0xb8]
call fcn.0040b0c0
push eax
call fcn.0050c5f0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x13c]
call fcn.0049dc90
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb8]
call fcn.00485d80
mov edx, dword [ebp + 0xc]
mov byte [edx], 0
mov dword [ebp - 0xa4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf0]
call fcn.0049dc90
mov eax, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 8