Function at 0x402890
Capabilities:
Check if file exists
Create process on windows
Get common file path
Hide graphical window
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47de2b
mov eax, dword fs:[0]
push eax
mov eax, 0x149c
call fcn.00465ba0
mov eax, dword [0x51384c]
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
push 0x20a
xor edi, edi
lea eax, [ebp - 0x220]
mov esi, ecx
push edi
push eax
mov dword [ebp - 0x1450], esi
call fcn.00464150
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x220]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x402911
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c30cc
call fcn.00462edb
add esp, 8
jmp 0x402ba6
push 0x800
lea edx, [ebp - 0x1430]
push edi
push edx
call fcn.00464150
add esp, 0xc
push 0x44
lea eax, [ebp - 0x14a8]
push edi
push eax
call fcn.00464150
add esp, 0xc
xor eax, eax
lea ecx, [ebp - 0x430]
push ecx
push 0x105
mov dword [ebp - 0x1460], eax
mov dword [ebp - 0x145c], eax
mov dword [ebp - 0x1458], eax
mov dword [ebp - 0x1454], eax
mov dword [ebp - 0x14a8], 0x44
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, esi
call fcn.00405330
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor edx, edx
push edi
mov eax, 0x4c2f78
lea esi, [ebp - 0x144c]
mov dword [ebp - 0x1438], 7
mov dword [ebp - 0x143c], edi
mov word [ebp - 0x144c], dx
call fcn.00403b50
mov dword [ebp - 4], edi
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push str.VideoViewer.exe
call esi
test eax, eax
je 0x4029d9
mov eax, str.VideoViewer.exe
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4029c2
sub eax, edx
sar eax, 1
push eax
mov eax, str.VideoViewer.exe
jmp 0x402a05
push 0x4c2be8
call esi
test eax, eax
je 0x402b81
mov eax, 0x4c2be8
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4029f0
sub eax, edx
sar eax, 1
push eax
mov eax, 0x4c2be8
lea esi, [ebp - 0x144c]
call fcn.00403b50
mov eax, dword [ebp - 0x144c]
mov edi, 8
cmp dword [ebp - 0x1438], edi
jae 0x402a25
mov eax, esi
lea ecx, [ebp - 0x220]
push ecx
push eax
push str._s___s_
mov eax, 0x800
lea ebx, [ebp - 0x1430]
call fcn.00401040
add esp, 0xc
push str.Launching_Viewer_n
call fcn.00462edb
mov ebx, dword [ebp - 0x1450]
add esp, 4
mov ecx, ebx
call fcn.00405330
push eax
push str.Launch_location:__s_n
call fcn.00462edb
mov eax, dword [ebp - 0x144c]
add esp, 8
cmp dword [ebp - 0x1438], edi
jae 0x402a81
lea eax, [ebp - 0x144c]
push eax
push str.Application_Filename:__s_n
call fcn.00462edb
lea edx, [ebp - 0x1430]
push edx
push str.Command_line:__s_n
call fcn.00462edb
add esp, 0x10
lea eax, [ebp - 0x1460]
push eax
lea ecx, [ebp - 0x14a8]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x1430]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x402b41
push str.Running...
call fcn.00462edb
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 4
push 0x3e8
call esi
push 0x4c2f80
call fcn.00462edb
add esp, 4
push 0x3e8
call esi
push 0x4c2f80
call fcn.00462edb
add esp, 4
push 0x3e8
call esi
push 0x4c38e8
call fcn.00462edb
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp - 0x1460]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xbb8
call esi
mov ecx, ebx
call fcn.00405330
push eax
push str.Output_directory:__s
call fcn.00462edb
add esp, 8
mov ecx, ebx
call fcn.00405330
push eax
call fcn.00401560
add esp, 4
cmp dword [ebp - 0x1438], edi
jb 0x402b7d
mov ecx, dword [ebp - 0x144c]
push ecx
call fcn.00462992
add esp, 4
mov al, 1
jmp 0x402ba8
push str.ERROR:_The_viewer_is_not_inside_the_video_wrap..._n
call fcn.00462edb
add esp, 4
cmp dword [ebp - 0x1438], 8
jb 0x402ba6
mov edx, dword [ebp - 0x144c]
push edx
call fcn.00462992
add esp, 4
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 - 0x10]
xor ecx, ebp
call fcn.00462848
mov esp, ebp
pop ebp
ret