Function at 0x404950
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4435b6
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x454100]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x64]
mov edi, dword [ebp + 8]
mov dword [ebp - 0xa0], eax
mov byte [eax], 1
call fcn.00421df0
lea ecx, [ebp - 0x3c]
call fcn.0041f130
push 0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x64]
push dword [edi]
call fcn.00422220
test al, al
je 0x404cc0
mov eax, dword [ebx + 0x48]
cmp eax, 2
je 0x404d64
test eax, eax
jne 0x404ad4
mov ecx, edi
call fcn.0041fd90
xor ecx, ecx
inc eax
push edi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0xac]
push eax
call fcn.0041eee0
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0041f330
mov byte [ebp - 4], 0
push dword [ebp - 0xac]
call fcn.0044037e
mov edx, dword [ebx + 0x50]
add esp, 0x10
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x14], ecx
movzx ecx, byte [ebx + 0x3d]
mov dword [ebp - 0x18], eax
neg ecx
mov eax, dword [edx]
sbb ecx, ecx
mov esi, dword [eax + 0x14]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebx + 0xd8]
and ecx, eax
lea eax, [ebx + 0xc0]
push ecx
movzx ecx, byte [ebx + 0xcb]
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [ebp - 0x64]
push ecx
push dword [ebx + 0x74]
mov ecx, esi
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x28]
push edx
call dword [0x447370]
call esi
mov esi, eax
test esi, esi
jne 0x404c23
mov eax, dword [ebp - 0x2c]
cmp eax, 5
ja case.default.0x404a84
jmp dword [eax*4 + 0x404d94]
push dword [ebp - 0x28]
mov esi, 0x80004004
call fcn.0044037e
add esp, 4
jmp 0x404d66
mov dword [ebx + 0x48], 2
push dword [ebp - 0x28]
xor esi, esi
call fcn.0044037e
add esp, 4
jmp 0x404d66
mov dword [ebx + 0x48], 1
jmp case.0x404a84.0
mov dword [ebx + 0x48], 3
push dword [ebp - 0x28]
call fcn.0044037e
add esp, 4
mov eax, dword [ebx + 0x48]
cmp eax, 3
jne 0x404b10
mov ecx, edi
call fcn.004028c0
test al, al
jne 0x404b04
push edi
push ecx
mov ecx, ebx
call fcn.00404360
mov esi, eax
test esi, esi
jne 0x404d66
mov esi, 0x80004005
jmp 0x404d66
mov byte [ebx + 0x174], 1
jmp 0x404d5b
cmp eax, 4
jne 0x404c43
xor eax, eax
lea ecx, [ebp - 0x28]
push edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
call fcn.0041efc0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.004028c0
test al, al
jne 0x404b4d
push edi
push ecx
mov ecx, ebx
call fcn.00404360
mov esi, eax
jmp 0x404c1a
push dword [ebp - 0x28]
push dword [edi]
call fcn.00421120
add esp, 8
test al, al
jne 0x404c33
call fcn.00422e10
mov esi, eax
lea ecx, [ebp - 0x1c]
xor eax, eax
push str.Cannot_rename_existing_file
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
call fcn.0041f060
mov byte [ebp - 4], 3
test esi, esi
je 0x404bc8
push 0x44a500
lea ecx, [ebp - 0x1c]
call fcn.0041f3a0
mov edx, esi
lea ecx, [ebp - 0xac]
call fcn.00417900
lea eax, [ebp - 0xac]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x1c]
call fcn.0041f360
mov byte [ebp - 4], 3
push dword [ebp - 0xac]
call fcn.0044037e
add esp, 4
push 0x44a500
lea ecx, [ebp - 0x1c]
call fcn.0041f3a0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0041f360
push 0x44a500
lea ecx, [ebp - 0x1c]
call fcn.0041f3a0
push edi
lea ecx, [ebp - 0x1c]
call fcn.0041f360
mov ecx, dword [ebx + 0x50]
push dword [ebp - 0x1c]
push ecx
mov eax, dword [ecx]
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [0x447370]
call esi
push dword [ebp - 0x1c]
mov esi, eax
call fcn.0044037e
add esp, 4
test esi, esi
jne 0x404c23
mov esi, 0x80004005
push dword [ebp - 0x28]
call fcn.0044037e
add esp, 4
jmp 0x404d66
push dword [ebp - 0x28]
call fcn.0044037e
add esp, 4
jmp 0x404d5b
mov eax, dword [ebp - 0x44]
mov ecx, dword [edi]
shr eax, 4
push ecx
test al, 1
je 0x404c82
call fcn.00421140
add esp, 4
test al, al
jne 0x404d5b
call fcn.00422e10
push edi
push str.Cannot_delete_output_folder
push eax
mov ecx, ebx
call fcn.00404410
mov esi, eax
test esi, esi
jne 0x404d66
jmp 0x404d64
call fcn.00421fa0
add esp, 4
test al, al
je 0x404d5b
push dword [edi]
call fcn.00420e60
add esp, 4
test al, al
jne 0x404d5b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x404d5b
call fcn.00422e10
push edi
push str.Cannot_delete_output_file
jmp 0x404c6b
push dword [edi]
call fcn.004201b0
mov esi, eax
add esp, 4
test esi, esi
js 0x404d5b
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], 0
je 0x404d5b
xor eax, eax
lea ecx, [ebp - 0x1c]
push edi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
call fcn.0041efc0
mov byte [ebp - 4], 5
cmp esi, dword [ebp - 0x18]
jae 0x404d07
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov dword [ebp - 0x18], esi
mov word [eax + esi*2], cx
lea ecx, [ebp - 0x9c]
call fcn.00421df0
lea ecx, [ebp - 0x74]
call fcn.0041f130
push 0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x9c]
push dword [ebp - 0x1c]
call fcn.00422220
test al, al
je 0x404d48
mov eax, dword [ebp - 0x7c]
test al, 1
je 0x404d48
and eax, 0xfffffffe
push eax
push dword [ebp - 0x1c]
call fcn.004211b0
add esp, 8
push dword [ebp - 0x74]
call fcn.0044037e
push dword [ebp - 0x1c]
call fcn.0044037e
add esp, 8
mov eax, dword [ebp - 0xa0]
mov byte [eax], 0
xor esi, esi
push dword [ebp - 0x3c]
call fcn.0044037e
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00440370
mov esp, ebp
pop ebp
ret 8