Function at 0x408130
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Move file
Set file attributes

Disassembly:
sub esp, 0xd48
mov eax, dword [0x413028]
xor eax, esp
mov dword [esp + 0xd44], eax
push ebx
push ebp
mov ebp, dword [esp + 0xd54]
push esi
push edi
xor eax, eax
push 0x206
mov edi, ecx
push eax
lea ecx, [esp + 0x22]
push ecx
mov dword [esp + 0x20], ebp
mov esi, edx
mov word [esp + 0x24], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x742]
push eax
mov word [esp + 0x744], dx
call sub.MSVCR90.dll_memset
add esp, 0xc
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x53a]
push edx
mov word [esp + 0x53c], cx
call sub.MSVCR90.dll_memset
add esp, 0xc
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x22a]
push ecx
mov word [esp + 0x22c], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x103
lea edx, [esp + 0x42d]
push 0
push edx
mov byte [esp + 0x434], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0xb52]
push ecx
mov word [esp + 0xb54], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x94a]
push eax
mov word [esp + 0x94c], dx
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0
push 0x23
lea ecx, [esp + 0x948]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edx, [esp + 0x940]
push edx
push str._sNet_ProtectorUPDmalupd.bin
lea edx, [esp + 0xb50]
call fcn.0040aa70
add esp, 8
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea eax, [ebp + 0x608]
push eax
push str._sUPD_s
lea edx, [esp + 0x24]
call fcn.0040aa70
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
call ebx
push 1
lea edx, [esp + 0x1c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40852d
lea eax, [esp + 0x18]
push eax
push 0x40f384
lea edx, [esp + 0x430]
call fcn.0040aab0
add esp, 8
push 0x80
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp + 0x3ac]
lea edx, [esp + 0x428]
push edx
call eax
add esp, 4
cmp eax, 0xffffffff
jne 0x408338
lea ecx, [esp + 0x428]
push ecx
push str._Fail_to_decompress_:___s
mov edx, 0x413a40
call fcn.0040aab0
push 0x40f620
push str.c:zvUpgradeNp.log
call dword [sym.imp.MSVCR90.dll_fopen]
mov edi, eax
add esp, 0x10
test edi, edi
je 0x408338
mov ebp, dword [sym.imp.MSVCR90.dll_fputs]
push edi
push 0x413a40
call ebp
push edi
push 0x40ec00
call ebp
push edi
call dword [sym.imp.MSVCR90.dll_fclose]
mov ebp, dword [esp + 0x28]
add esp, 0x14
lea edx, [esp + 0x18]
push edx
call ebx
lea eax, [esp + 0x18]
push 0x2e
push eax
call dword [sym.imp.MSVCR90.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x408358
xor ecx, ecx
mov word [eax], cx
push esi
push 0x40f3a4
lea edx, [esp + 0x538]
call fcn.0040aa70
mov eax, dword [ebp + 0x3c0]
lea edx, [esp + 0x538]
push edx
call eax
add esp, 0xc
push esi
call ebx
lea edx, [esp + 0x738]
mov eax, esi
sub edx, esi
jmp 0x408390
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x408390
lea edx, [esp + 0x220]
mov eax, esi
sub edx, esi
lea ebx, [ebx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4083b0
lea eax, [esp + 0x220]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4083d0
mov ecx, dword [str..TMP]
mov edx, dword [0x40f3b0]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [eax], ecx
mov cx, word [0x40f3b4]
mov dword [eax + 4], edx
lea edx, [esp + 0x220]
push edx
mov word [eax + 8], cx
call edi
test eax, eax
je 0x408437
mov ecx, dword [ebp + 0x3c0]
lea eax, [esp + 0x220]
push eax
call ecx
add esp, 4
lea edx, [esp + 0x220]
push edx
call ebx
test eax, eax
jne 0x408437
lea eax, [esp + 0x220]
push eax
call ebx
push esi
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40844f
lea ecx, [esp + 0x220]
push ecx
push esi
call ebp
push esi
lea edx, [esp + 0x1c]
push edx
call ebp
test eax, eax
jne 0x40854a
mov ebx, dword [sym.imp.MSVCR90.dll_sprintf]
push esi
push str._Fail_to_move_added_Replace_on_Reboot_:___S
push 0x413a40
call ebx
add esp, 0xc
push 0x40f620
push str.c:zvUpgradeNp.log
call dword [sym.imp.MSVCR90.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x4084b0
push edi
push 0x413a40
call dword [sym.imp.MSVCR90.dll_fputs]
push edi
push 0x40ec00
call dword [sym.imp.MSVCR90.dll_fputs]
push edi
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 0x14
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4084c6
lea eax, [esp + 0x220]
push eax
push esi
call ebp
push esi
lea ecx, [esp + 0x1c]
push ecx
call ebp
push 5
push esi
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x408591
push esi
push str.__Replace_on_Reboot_:___S
push 0x413a40
call ebx
add esp, 0xc
push 0x40f620
push str.c:zvUpgradeNp.log
call dword [sym.imp.MSVCR90.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x40852d
mov edi, dword [sym.imp.MSVCR90.dll_fputs]
push esi
push 0x413a40
call edi
push esi
push 0x40ec00
call edi
push esi
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 0x14
xor eax, eax
mov ecx, dword [esp + 0xd54]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040b240
add esp, 0xd48
ret 4
lea eax, [esp + 0x18]
push str.RESTORE.INI
push eax
call dword [sym.imp.MSVCR90.dll_wcsstr]
add esp, 8
test eax, eax
je 0x408591
mov ecx, dword [esp + 0x14]
add ecx, 0x400
push ecx
push str._sZVSCANBKPUTIL.EXE
lea edx, [esp + 0x740]
call fcn.0040aa70
add esp, 8
push str.__Restore
lea ebx, [esp + 0x73c]
call fcn.004098d0
push esi
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrIW]
mov edi, eax
push str..EXE
push edi
call ebx
test eax, eax
jne 0x4085b8
push str..DLL
push edi
call ebx
test eax, eax
je 0x4085e2
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4085e2
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0xb48]
push edx
mov edx, dword [ecx + 0x3bc]
lea eax, [esp + 0x534]
push eax
call edx
add esp, 8
mov eax, 1
jmp 0x40852f