Function at 0x405d00
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44ce06
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x45c00c]
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 dword [ebp - 0xb4], ebx
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push 8
mov dword [ebp - 0xa4], edi
mov dword [ebp - 0xb8], eax
mov byte [eax], 1
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov word [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
call fcn.00449b46
xor ecx, ecx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], 0
add esp, 4
mov dword [ebp - 0x34], 3
mov word [eax], cx
push ecx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x64]
push dword [edi]
call fcn.00423940
test al, al
je 0x40639d
mov eax, dword [ebx + 0x48]
cmp eax, 2
je 0x4064d8
mov edx, 2
test eax, eax
jne 0x405f99
mov edx, dword [edi]
mov esi, dword [edi + 4]
lea eax, [edx + esi*2]
cmp eax, edx
je 0x405e0f
movzx ecx, word [eax - 2]
sub eax, 2
cmp ecx, 0x5c
je 0x405f42
cmp ecx, 0x2f
je 0x405f42
cmp eax, edx
jne 0x405df2
or eax, 0xffffffff
lea ebx, [eax + 1]
mov dword [ebp - 0xa0], ebx
cmp ebx, esi
jbe 0x405e27
mov ebx, esi
mov dword [ebp - 0xa0], esi
xor ecx, ecx
lea eax, [ebx + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
mov dword [ebp - 0xac], ebx
mov esi, eax
mov dword [ebp - 0xa8], ebx
add ebx, ebx
push ebx
push dword [edi]
mov dword [ebp - 0xb0], esi
push esi
call sub.msvcrt.dll_memcpy
xor eax, eax
mov word [ebx + esi], ax
mov eax, dword [ebp - 0xa0]
xor ecx, ecx
mov byte [ebp - 4], 1
inc eax
mov esi, dword [ebp - 0x38]
mov edx, 2
mov edi, dword [ebp - 0x3c]
add eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
push ebx
push dword [ebp - 0xb0]
mov dword [ebp - 0xa0], eax
push eax
call sub.msvcrt.dll_memcpy
lea ecx, [esi*2 + 2]
push ecx
push edi
mov edi, dword [ebp - 0xa0]
lea ecx, [ebx + edi]
push ecx
call sub.msvcrt.dll_memcpy
mov byte [ebp - 4], 0
push dword [ebp - 0xb0]
call fcn.00449b03
mov ebx, dword [ebp - 0xb4]
add esp, 0x30
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebx + 0x50]
movzx ecx, byte [ebx + 0x3b]
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 edi
push edx
call dword [0x4502ac]
call esi
mov esi, eax
test esi, esi
jne 0x40606d
mov eax, dword [ebp - 0x2c]
cmp eax, 5
ja case.default.0x405f3b
jmp dword [eax*4 + 0x406508]
sub eax, edx
sar eax, 1
jmp 0x405e12
push edi
mov esi, 0x80004004
call fcn.00449b03
add esp, 4
jmp 0x4064da
mov dword [ebx + 0x48], 2
push edi
xor esi, esi
call fcn.00449b03
add esp, 4
jmp 0x4064da
mov dword [ebx + 0x48], 1
jmp case.0x405f3b.0
mov dword [ebx + 0x48], 3
push edi
call fcn.00449b03
mov edi, dword [ebp - 0xa4]
add esp, 4
mov edx, 2
mov eax, dword [ebx + 0x48]
cmp eax, 3
jne 0x406087
mov ecx, edi
call fcn.00403400
test al, al
jne 0x40607b
xor eax, eax
xor esi, esi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
cmp byte [str.Cannot_create_file_with_auto_name], al
je 0x405fd9
lea esp, [esp]
inc esi
cmp byte [esi + str.Cannot_create_file_with_auto_name], al
jne 0x405fd0
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
add esp, 4
mov dword [ebp - 0x24], esi
mov edx, eax
mov dword [ebp - 0x20], esi
xor ecx, ecx
mov dword [ebp - 0x28], edx
test esi, esi
je 0x406020
jmp 0x406010
movzx eax, byte [ecx + str.Cannot_create_file_with_auto_name]
mov word [edx + ecx*2], ax
inc ecx
cmp ecx, esi
jb 0x406010
xor eax, eax
mov word [edx + esi*2], ax
mov edx, edi
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x28]
call fcn.004054a0
mov ecx, dword [ebx + 0x50]
mov edi, dword [ebp - 0x28]
push edi
push ecx
mov eax, dword [ecx]
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [0x4502ac]
call esi
push edi
mov esi, eax
call fcn.00449b03
add esp, 4
test esi, esi
jne 0x4064da
mov esi, 0x80004005
jmp 0x4064da
mov esi, 0x80004005
push edi
call fcn.00449b03
add esp, 4
jmp 0x4064da
mov byte [ebx + 0x174], 1
jmp 0x4064cf
cmp eax, 4
jne 0x40630c
mov esi, dword [edi + 4]
xor ecx, ecx
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
mov ecx, dword [edi + 4]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
lea ecx, [ecx*2 + 2]
push ecx
push dword [edi]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x10
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.00403400
mov esi, dword [ebp - 0x28]
test al, al
jne 0x40614f
xor eax, eax
xor esi, esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
cmp byte [str.Cannot_create_file_with_auto_name], al
je 0x4060f9
mov edi, edi
inc esi
cmp byte [esi + str.Cannot_create_file_with_auto_name], al
jne 0x4060f0
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
add esp, 4
mov dword [ebp - 0x18], esi
mov edx, eax
mov dword [ebp - 0x14], esi
xor ecx, ecx
mov dword [ebp - 0x1c], edx
test esi, esi
je 0x406140
jmp 0x406130
movzx eax, byte [ecx + str.Cannot_create_file_with_auto_name]
mov word [edx + ecx*2], ax
inc ecx
cmp ecx, esi
jb 0x406130
xor eax, eax
mov word [edx + esi*2], ax
mov byte [ebp - 4], 4
jmp 0x4062c7
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40616a
push esi
call fcn.00449b03
add esp, 4
jmp 0x4064cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xa0], eax
test eax, eax
jne 0x406186
mov dword [ebp - 0xa0], 0x80004005
jmp 0x406196
jle 0x406196
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xa0], eax
xor eax, eax
xor esi, esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
cmp byte [str.Cannot_rename_existing_file], al
je 0x4061b9
jmp 0x4061b0
inc esi
cmp byte [esi + str.Cannot_rename_existing_file], al
jne 0x4061b0
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
add esp, 4
mov dword [ebp - 0x18], esi
mov edx, eax
mov dword [ebp - 0x14], esi
xor ecx, ecx
mov dword [ebp - 0x1c], edx
test esi, esi
je 0x406200
jmp 0x4061f0
movzx eax, byte [ecx + str.Cannot_rename_existing_file]
mov word [edx + ecx*2], ax
inc ecx
cmp ecx, esi
jb 0x4061f0
xor eax, eax
mov word [edx + esi*2], ax
mov byte [ebp - 4], 5
cmp dword [ebp - 0xa0], eax
je 0x4062bc
xor esi, esi
jmp 0x406220
inc esi
cmp byte [esi + 0x452ca0], 0
jne 0x406220
push esi
lea ecx, [ebp - 0x1c]
call fcn.00421690
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
lea edx, [eax + ecx*2]
xor ecx, ecx
test esi, esi
je 0x406252
movzx eax, byte [ecx + 0x452ca0]
mov word [edx + ecx*2], ax
inc ecx
cmp ecx, esi
jb 0x406242
add dword [ebp - 0x18], esi
lea ecx, [ebp - 0xb0]
xor eax, eax
mov word [edx + esi*2], ax
mov edx, dword [ebp - 0xa0]
call fcn.0041e390
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x1c]
push dword [ebp - 0xac]
call fcn.00421690
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0xac]
mov esi, dword [ebp - 0x18]
lea ecx, [eax + esi*2]
lea eax, [edx*2 + 2]
push eax
push dword [ebp - 0xb0]
push ecx
call sub.msvcrt.dll_memcpy
add esi, dword [ebp - 0xac]
mov byte [ebp - 4], 5
push dword [ebp - 0xb0]
mov dword [ebp - 0x18], esi
call fcn.00449b03
add esp, 0x10
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x1c]
call fcn.004054a0
mov edx, edi
lea ecx, [ebp - 0x1c]
call fcn.004054a0
mov ecx, dword [ebx + 0x50]
mov edi, dword [ebp - 0x1c]
push edi
push ecx
mov eax, dword [ecx]
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [0x4502ac]
call esi
push edi
mov esi, eax
call fcn.00449b03
add esp, 4
test esi, esi
jne 0x4062fc
mov esi, 0x80004005
push dword [ebp - 0x28]
call fcn.00449b03
add esp, 4
jmp 0x4064da
mov eax, dword [ebp - 0x44]
mov ecx, dword [edi]
shr eax, 4
test al, 1
je 0x406343
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4064cf
push edi
push str.Cannot_delete_output_folder
mov ecx, ebx
call fcn.00405520
mov esi, eax
test esi, esi
jne 0x4064da
jmp 0x4064d8
call fcn.00424270
test al, al
je 0x4064cf
mov esi, dword [edi]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x406377
mov ecx, eax
and cl, 0x11
cmp cl, 1
jne 0x406377
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x406386
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4064cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4064cf
push edi
push str.Cannot_delete_output_file
jmp 0x40632d
mov esi, dword [edi]
mov ecx, esi
call fcn.00421e00
mov dword [ebp - 0xa4], eax
test eax, eax
js 0x4064cf
cmp word [esi + eax*2 + 2], 0
je 0x4064cf
mov esi, dword [edi + 4]
xor ecx, ecx
mov edx, 2
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
mov ecx, dword [edi + 4]
mov ebx, eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
lea ecx, [ecx*2 + 2]
push ecx
push dword [edi]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0x10
mov eax, dword [ebp - 0xa4]
mov byte [ebp - 4], 7
cmp eax, esi
jae 0x406414
xor ecx, ecx
mov dword [ebp - 0x24], eax
mov word [ebx + eax*2], cx
push 8
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x94], 0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x7c], 0
mov word [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
call fcn.00449b46
xor ecx, ecx
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], 0
add esp, 4
mov dword [ebp - 0x6c], 3
mov word [eax], cx
push ecx
push ebx
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 8
call fcn.00423940
test al, al
je 0x4064be
test byte [ebp - 0x7c], 1
je 0x4064be
mov eax, dword [ebp - 0x7c]
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp - 0x74]
call fcn.00449b03
push ebx
call fcn.00449b03
add esp, 8
mov eax, dword [ebp - 0xb8]
mov byte [eax], 0
xor esi, esi
push dword [ebp - 0x3c]
call fcn.00449b03
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.00449a40
mov esp, ebp
pop ebp
ret 8