Function at 0x401980
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47ddc9
mov eax, dword fs:[0]
push eax
sub esp, 0x578
mov eax, dword [0x51384c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push esi
push str.Creating_Video_Viewer_at__s_n
mov dword [ebp - 0x518], esi
call fcn.00462edb
push 0x20a
xor edi, edi
lea eax, [ebp - 0x224]
push edi
push eax
call fcn.00464150
add esp, 0x14
push 0x104
lea ecx, [ebp - 0x224]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x401a08
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c30cc
call fcn.00462edb
add esp, 8
jmp 0x401fbf
push edi
push esi
lea edx, [ebp - 0x224]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x401a3f
push str.Failed_to_create_target_file._Application_will_exit._n
call fcn.00462edb
add esp, 4
push edi
push str.Video_Archive_Error
push str.Failed_to_create_target_file
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x401fbf
lea ecx, [ebp - 0x540]
call fcn.004051e0
lea ecx, [ebp - 0x4f4]
mov dword [ebp - 4], edi
call fcn.004051e0
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 1
call fcn.004051e0
lea eax, [ebp - 0x224]
push eax
mov byte [ebp - 4], 2
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea edx, [ebp - 0x434]
push edx
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x434]
push eax
lea ecx, [ebp - 0x4f4]
call fcn.00405310
push str.VideoViewer.zip
lea ecx, [ebp - 0x4f4]
call fcn.00405310
lea ecx, [ebp - 0x434]
push ecx
lea ecx, [ebp - 0x504]
call fcn.00405310
lea ecx, [ebp - 0x4e4]
call fcn.004054d0
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 3
call fcn.004051e0
push 0x4c2df8
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 4
call fcn.00405300
lea ecx, [ebp - 0x514]
call fcn.004053f0
push eax
lea ecx, [ebp - 0x4e4]
call fcn.00405970
test al, al
je 0x401f71
lea ecx, [ebp - 0x4f4]
call fcn.004053f0
push eax
lea ecx, [ebp - 0x4e4]
call fcn.004057f0
test al, al
je 0x401f71
lea ecx, [ebp - 0x504]
call fcn.004053f0
push eax
lea ecx, [ebp - 0x4e4]
call fcn.004055f0
lea ecx, [ebp - 0x570]
call fcn.004051e0
lea ecx, [ebp - 0x4f4]
mov byte [ebp - 4], 5
call fcn.00405330
push eax
push str.Temporary_zip_file_being_created:__s_n
call fcn.00462edb
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 8
cmp dword [ebp + 8], edi
je 0x401bc2
mov edi, 0x4c2ee8
mov esi, dword [edi]
push esi
call ebx
test eax, eax
jne 0x401ba6
push esi
lea edx, [ebp - 0x224]
push edx
push str.ERROR:_Could_not_find_the_following_file:__s_s_n
call fcn.00462edb
add esp, 0xc
jmp 0x401bb5
lea eax, [ebp - 0x4e4]
push eax
call fcn.004018c0
add esp, 4
add edi, 4
cmp edi, 0x4c2f5c
jl 0x401b86
jmp 0x401c00
mov esi, dword [edi + 0x4c2e38]
push esi
call ebx
test eax, eax
jne 0x401be6
push esi
lea ecx, [ebp - 0x224]
push ecx
push str.ERROR:_Could_not_find_the_following_file:__s_s_n
call fcn.00462edb
add esp, 0xc
jmp 0x401bf5
lea edx, [ebp - 0x4e4]
push edx
call fcn.004018c0
add esp, 4
add edi, 4
cmp edi, 0xb0
jb 0x401bc2
push 0
lea ecx, [ebp - 0x4e4]
call fcn.00405750
test al, al
je 0x401edc
lea ecx, [ebp - 0x4f4]
call fcn.00405330
push eax
push 0x4c3288
call fcn.00462edb
add esp, 8
lea ecx, [ebp - 0x560]
call fcn.004051e0
mov bl, 7
lea ecx, [ebp - 0x550]
mov byte [ebp - 4], bl
call fcn.004051e0
push str.VideoViewer.zip
lea ecx, [ebp - 0x550]
mov byte [ebp - 4], 8
call fcn.00405300
mov esi, dword [ebp - 0x518]
push esi
lea ecx, [ebp - 0x560]
call fcn.00405300
lea ecx, [ebp - 0x4f4]
call fcn.004053f0
push eax
lea ecx, [ebp - 0x550]
call fcn.004053f0
push eax
lea ecx, [ebp - 0x560]
call fcn.004053f0
push eax
lea ecx, [ebp - 0x4e4]
call fcn.00405ad0
test al, al
jne 0x401d19
lea ecx, [ebp - 0x528]
call fcn.004051e0
lea eax, [ebp - 0x528]
push eax
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 9
call fcn.00405440
push str.ERROR:_Failed_to_embed_the_archive_file_n
call fcn.00462edb
add esp, 4
lea ecx, [ebp - 0x528]
call fcn.00405330
push eax
call fcn.00462edb
add esp, 4
push 0x4c3284
call fcn.00462edb
add esp, 4
lea ecx, [ebp - 0x528]
mov byte [ebp - 4], 8
call fcn.00405280
lea ecx, [ebp - 0x550]
mov byte [ebp - 4], bl
call fcn.00405280
lea ecx, [ebp - 0x560]
jmp 0x401f59
lea ecx, [ebp - 0x580]
call fcn.004051e0
lea ecx, [ebp - 0x580]
push ecx
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 0xa
call fcn.00405440
push str.Successfully_appended_zip_file_to_wrap_executable_n
call fcn.00462edb
add esp, 4
lea ecx, [ebp - 0x580]
call fcn.00405330
push eax
call fcn.00462edb
add esp, 4
push 0x4c3284
call fcn.00462edb
add esp, 4
lea ecx, [ebp - 0x580]
mov byte [ebp - 4], 8
call fcn.00405280
lea ecx, [ebp - 0x4e4]
call fcn.00405960
lea ecx, [ebp - 0x4f4]
call fcn.00405330
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
or edi, 0xffffffff
cmp esi, edi
jne 0x401e26
lea ecx, [ebp - 0x550]
mov byte [ebp - 4], bl
call fcn.00405280
lea ecx, [ebp - 0x560]
mov byte [ebp - 4], 5
call fcn.00405280
lea ecx, [ebp - 0x570]
mov byte [ebp - 4], 4
call fcn.00405280
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 3
call fcn.00405280
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 2
call fcn.00405570
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 1
call fcn.00405280
lea ecx, [ebp - 0x4f4]
mov byte [ebp - 4], 0
call fcn.00405280
mov dword [ebp - 4], edi
jmp 0x401fb4
xor eax, eax
push 2
push eax
push eax
push esi
mov dword [ebp - 0x530], eax
mov dword [ebp - 0x52c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x52c]
push edx
push 4
lea eax, [ebp - 0x530]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x550]
mov byte [ebp - 4], bl
call fcn.00405280
lea ecx, [ebp - 0x560]
mov byte [ebp - 4], 5
call fcn.00405280
lea ecx, [ebp - 0x570]
mov byte [ebp - 4], 4
call fcn.00405280
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 3
call fcn.00405280
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 2
call fcn.00405570
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 1
call fcn.00405280
lea ecx, [ebp - 0x4f4]
mov byte [ebp - 4], 0
call fcn.00405280
lea ecx, [ebp - 0x540]
mov dword [ebp - 4], edi
call fcn.00405280
mov al, 1
jmp 0x401fc1
lea ecx, [ebp - 0x528]
call fcn.004051e0
lea ecx, [ebp - 0x528]
push ecx
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 6
call fcn.00405440
mov edx, dword [ebp - 0x4f4]
mov ecx, dword [ebp - 0x4f0]
sub esp, 0x10
mov eax, esp
mov dword [eax], edx
mov edx, dword [ebp - 0x4ec]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x4e8]
mov dword [eax + 8], edx
push str.Failed_to_write_the_zip_file_to_disk:__s_n
mov dword [eax + 0xc], ecx
call fcn.00462edb
add esp, 0x14
lea ecx, [ebp - 0x528]
call fcn.00405330
push eax
call fcn.00462edb
add esp, 4
push 0x4c3284
call fcn.00462edb
add esp, 4
lea ecx, [ebp - 0x528]
mov byte [ebp - 4], 5
call fcn.00405280
lea ecx, [ebp - 0x570]
mov byte [ebp - 4], 4
call fcn.00405280
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 3
call fcn.00405280
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 2
call fcn.00405570
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 1
call fcn.00405280
lea ecx, [ebp - 0x4f4]
mov byte [ebp - 4], 0
call fcn.00405280
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x540]
call fcn.00405280
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00462848
mov esp, ebp
pop ebp
ret