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 0x47dd19
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.00462ecb
push 0x20a
xor edi, edi
lea eax, [ebp - 0x224]
push edi
push eax
call fcn.00464140
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 0x4c3074
call fcn.00462ecb
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.00462ecb
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.004051d0
lea ecx, [ebp - 0x4f4]
mov dword [ebp - 4], edi
call fcn.004051d0
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 1
call fcn.004051d0
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.00405300
push str.VideoViewer.zip
lea ecx, [ebp - 0x4f4]
call fcn.00405300
lea ecx, [ebp - 0x434]
push ecx
lea ecx, [ebp - 0x504]
call fcn.00405300
lea ecx, [ebp - 0x4e4]
call fcn.004054c0
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 3
call fcn.004051d0
push 0x4c2da8
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 4
call fcn.004052f0
lea ecx, [ebp - 0x514]
call fcn.004053e0
push eax
lea ecx, [ebp - 0x4e4]
call fcn.00405960
test al, al
je 0x401f71
lea ecx, [ebp - 0x4f4]
call fcn.004053e0
push eax
lea ecx, [ebp - 0x4e4]
call fcn.004057e0
test al, al
je 0x401f71
lea ecx, [ebp - 0x504]
call fcn.004053e0
push eax
lea ecx, [ebp - 0x4e4]
call fcn.004055e0
lea ecx, [ebp - 0x570]
call fcn.004051d0
lea ecx, [ebp - 0x4f4]
mov byte [ebp - 4], 5
call fcn.00405320
push eax
push str.Temporary_zip_file_being_created:__s_n
call fcn.00462ecb
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 8
cmp dword [ebp + 8], edi
je 0x401bc2
mov edi, 0x4c2e90
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.00462ecb
add esp, 0xc
jmp 0x401bb5
lea eax, [ebp - 0x4e4]
push eax
call fcn.004018c0
add esp, 4
add edi, 4
cmp edi, 0x4c2f04
jl 0x401b86
jmp 0x401c00
mov esi, dword [edi + 0x4c2de8]
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.00462ecb
add esp, 0xc
jmp 0x401bf5
lea edx, [ebp - 0x4e4]
push edx
call fcn.004018c0
add esp, 4
add edi, 4
cmp edi, 0xa8
jb 0x401bc2
push 0
lea ecx, [ebp - 0x4e4]
call fcn.00405740
test al, al
je 0x401edc
lea ecx, [ebp - 0x4f4]
call fcn.00405320
push eax
push 0x4c3230
call fcn.00462ecb
add esp, 8
lea ecx, [ebp - 0x560]
call fcn.004051d0
mov bl, 7
lea ecx, [ebp - 0x550]
mov byte [ebp - 4], bl
call fcn.004051d0
push str.VideoViewer.zip
lea ecx, [ebp - 0x550]
mov byte [ebp - 4], 8
call fcn.004052f0
mov esi, dword [ebp - 0x518]
push esi
lea ecx, [ebp - 0x560]
call fcn.004052f0
lea ecx, [ebp - 0x4f4]
call fcn.004053e0
push eax
lea ecx, [ebp - 0x550]
call fcn.004053e0
push eax
lea ecx, [ebp - 0x560]
call fcn.004053e0
push eax
lea ecx, [ebp - 0x4e4]
call fcn.00405ac0
test al, al
jne 0x401d19
lea ecx, [ebp - 0x528]
call fcn.004051d0
lea eax, [ebp - 0x528]
push eax
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 9
call fcn.00405430
push str.ERROR:_Failed_to_embed_the_archive_file_n
call fcn.00462ecb
add esp, 4
lea ecx, [ebp - 0x528]
call fcn.00405320
push eax
call fcn.00462ecb
add esp, 4
push 0x4c322c
call fcn.00462ecb
add esp, 4
lea ecx, [ebp - 0x528]
mov byte [ebp - 4], 8
call fcn.00405270
lea ecx, [ebp - 0x550]
mov byte [ebp - 4], bl
call fcn.00405270
lea ecx, [ebp - 0x560]
jmp 0x401f59
lea ecx, [ebp - 0x580]
call fcn.004051d0
lea ecx, [ebp - 0x580]
push ecx
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 0xa
call fcn.00405430
push str.Successfully_appended_zip_file_to_wrap_executable_n
call fcn.00462ecb
add esp, 4
lea ecx, [ebp - 0x580]
call fcn.00405320
push eax
call fcn.00462ecb
add esp, 4
push 0x4c322c
call fcn.00462ecb
add esp, 4
lea ecx, [ebp - 0x580]
mov byte [ebp - 4], 8
call fcn.00405270
lea ecx, [ebp - 0x4e4]
call fcn.00405950
lea ecx, [ebp - 0x4f4]
call fcn.00405320
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.00405270
lea ecx, [ebp - 0x560]
mov byte [ebp - 4], 5
call fcn.00405270
lea ecx, [ebp - 0x570]
mov byte [ebp - 4], 4
call fcn.00405270
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 3
call fcn.00405270
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 2
call fcn.00405560
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 1
call fcn.00405270
lea ecx, [ebp - 0x4f4]
mov byte [ebp - 4], 0
call fcn.00405270
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.00405270
lea ecx, [ebp - 0x560]
mov byte [ebp - 4], 5
call fcn.00405270
lea ecx, [ebp - 0x570]
mov byte [ebp - 4], 4
call fcn.00405270
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 3
call fcn.00405270
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 2
call fcn.00405560
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 1
call fcn.00405270
lea ecx, [ebp - 0x4f4]
mov byte [ebp - 4], 0
call fcn.00405270
lea ecx, [ebp - 0x540]
mov dword [ebp - 4], edi
call fcn.00405270
mov al, 1
jmp 0x401fc1
lea ecx, [ebp - 0x528]
call fcn.004051d0
lea ecx, [ebp - 0x528]
push ecx
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 6
call fcn.00405430
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.00462ecb
add esp, 0x14
lea ecx, [ebp - 0x528]
call fcn.00405320
push eax
call fcn.00462ecb
add esp, 4
push 0x4c322c
call fcn.00462ecb
add esp, 4
lea ecx, [ebp - 0x528]
mov byte [ebp - 4], 5
call fcn.00405270
lea ecx, [ebp - 0x570]
mov byte [ebp - 4], 4
call fcn.00405270
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 3
call fcn.00405270
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 2
call fcn.00405560
lea ecx, [ebp - 0x504]
mov byte [ebp - 4], 1
call fcn.00405270
lea ecx, [ebp - 0x4f4]
mov byte [ebp - 4], 0
call fcn.00405270
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x540]
call fcn.00405270
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.00462838
mov esp, ebp
pop ebp
ret