Function at 0x140004250
Capabilities:
Check if file exists
Resolve function by parsing pe exports

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x398]
sub rsp, 0x498
mov rax, qword [0x14003b010]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rdi, qword [rbp + 0x408]
mov r15, r9
mov rsi, r8
mov rbx, rdx
mov r14, rcx
test rdx, rdx
je 0x1400048e7
test r8, r8
je 0x1400048e7
mov rcx, rdx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1400042b5
mov eax, 0xb
jmp 0x140004678
lea r8, str.file:
mov qword [rsp + 0x490], r12
mov edx, 0x10a
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov r8, rbx
lea rcx, [rsp + 0x40]
mov edx, 0x10a
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea r8, str.file:
mov edx, 0x10a
lea rcx, [rbp + 0x160]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov r8, rsi
lea rcx, [rbp + 0x160]
mov edx, 0x10a
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea rax, [rsp + 0x40]
mov rbx, 0xffffffffffffffff
cmp word [rax + rbx*2 + 2], 0
lea rbx, [rbx + 1]
jne 0x140004321
lea rbx, [rbx*2 + 2]
xor r12d, r12d
mov rcx, rbx
mov qword [rsp + 0x38], r12
call fcn.140028a4c
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], 0xffffffffffffffff
mov r8, rbx
lea rcx, [rsp + 0x38]
mov rdx, rax
mov rsi, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstombs_s]
test eax, eax
jne 0x1400048d1
mov qword [r14 + 0x50], rsi
lea rax, [rbp + 0x160]
mov rbx, 0xffffffffffffffff
cmp word [rax + rbx*2 + 2], r12w
lea rbx, [rbx + 1]
jne 0x140004381
lea rbx, [rbx*2 + 2]
mov qword [rsp + 0x38], r12
mov rcx, rbx
call fcn.140028a4c
lea r9, [rbp + 0x160]
mov qword [rsp + 0x20], 0xffffffffffffffff
mov r8, rbx
lea rcx, [rsp + 0x38]
mov rdx, rax
mov rsi, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstombs_s]
test eax, eax
jne 0x1400048bb
mov qword [r14 + 0x58], rsi
mov rbx, 0xffffffffffffffff
nop dword [rax]
cmp word [rdi + rbx*2 + 2], r12w
lea rbx, [rbx + 1]
jne 0x1400043e0
lea rbx, [rbx*2 + 2]
mov qword [rsp + 0x38], r12
mov rcx, rbx
call fcn.140028a4c
mov r9, rdi
mov qword [rsp + 0x20], 0xffffffffffffffff
mov r8, rbx
lea rcx, [rsp + 0x38]
mov rdx, rax
mov rsi, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstombs_s]
test eax, eax
jne 0x1400048a5
mov qword [r14 + 0x60], rsi
call qword [sym.imp.avcodec_59.dll_av_packet_alloc]
mov rcx, rax
mov qword [rsp + 0x30], rax
call qword [sym.imp.avcodec_59.dll_av_init_packet]
mov rax, qword [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
mov dword [rax + 0x20], r12d
mov rax, qword [rsp + 0x30]
mov qword [rax + 0x18], r12
mov rdx, qword [r14 + 0x50]
call qword [sym.imp.avformat_59.dll_avformat_open_input]
test eax, eax
je 0x140004474
mov eax, 0x10
jmp 0x140004670
mov rcx, qword [r14]
xor edx, edx
call qword [sym.imp.avformat_59.dll_avformat_find_stream_info]
mov r8, qword [r14 + 0x50]
xor r9d, r9d
mov rcx, qword [r14]
lea edx, [r9 - 1]
call qword [sym.imp.avformat_59.dll_av_dump_format]
mov rcx, qword [r14]
lea rbx, [r14 + 0x28]
mov r9d, 0xffffffff
mov dword [rsp + 0x28], r12d
mov r8d, r9d
mov qword [rsp + 0x20], rbx
xor edx, edx
call qword [sym.imp.avformat_59.dll_av_find_best_stream]
mov edi, eax
cmp eax, 0xadabac08
jne 0x1400044c8
mov eax, 0xe
jmp 0x140004670
mov r11, qword [r14]
mov edx, r12d
mov r9d, dword [r11 + 0x2c]
test r9d, r9d
je 0x140004523
mov r10, qword [r11 + 0x30]
nop dword [rax + rax]
mov r8d, edx
mov rax, qword [r10 + r8*8]
mov rcx, qword [rax + 0xd0]
cmp dword [rcx], r12d
je 0x1400044fc
inc edx
cmp edx, r9d
jb 0x1400044e0
jmp 0x140004523
mov dword [r14 + 0x48], edx
cmp edi, 0xbcbabb08
jne 0x140004523
mov rax, qword [r11 + 0x30]
mov rcx, qword [rax + r8*8]
mov rax, qword [rcx + 0xd0]
mov ecx, dword [rax + 4]
call qword [sym.imp.avcodec_59.dll_avcodec_find_decoder]
mov qword [rbx], rax
mov rcx, qword [rbx]
test rcx, rcx
je 0x14000457f
call qword [sym.imp.avcodec_59.dll_avcodec_alloc_context3]
mov rcx, qword [r14]
movsxd rdx, dword [r14 + 0x48]
mov qword [r14 + 0x18], rax
mov r8, qword [rcx + 0x30]
mov rcx, rax
mov rdx, qword [r8 + rdx*8]
mov rdx, qword [rdx + 0xd0]
call qword [sym.imp.avcodec_59.dll_avcodec_parameters_to_context]
mov rdx, qword [rbx]
xor r8d, r8d
mov rcx, qword [r14 + 0x18]
call qword [sym.imp.avcodec_59.dll_avcodec_open2]
test eax, eax
jns 0x140004589
mov r9d, eax
lea r8, str.Error_opening_codec:__d_n
mov edx, 0x10
xor ecx, ecx
call qword [sym.imp.avutil_57.dll_av_log]
mov eax, 0x21
jmp 0x140004670
mov edx, dword [rbp + 0x3f8]
test edx, edx
jle 0x14000459f
mov r8d, dword [rbp + 0x400]
test r8d, r8d
jg 0x1400045a8
mov edx, 0x140
lea r8d, [rdx - 0x50]
mov rcx, r14
call fcn.140003f80
test eax, eax
jns 0x1400045c0
lea r8, str.Error_init_muxer:__d_n
jmp 0x140004790
mov rcx, r14
call fcn.140003bc0
test eax, eax
jns 0x1400045d8
lea r8, str.Error_init_filter_graph:__d_n
jmp 0x140004790
movsxd rdx, dword [r14 + 0x48]
mov rax, qword [r14]
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x3c], 0x3e8
mov rcx, qword [rax + 0x30]
mov rdi, qword [rcx + rdx*8]
mov rcx, r15
mov rdx, qword [rsp + 0x38]
mov r8, qword [rdi + 0x10]
call qword [sym.imp.avutil_57.dll_av_rescale_q]
mov r8, qword [rdi + 0x10]
mov rsi, rax
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rbp + 0x3f0]
call qword [sym.imp.avutil_57.dll_av_rescale_q]
mov edx, dword [r14 + 0x48]
mov r9, rsi
mov rcx, qword [r14]
mov r15, rax
movabs rax, 0x7fffffffffffffff
mov dword [rsp + 0x28], r12d
movabs r8, 0x8000000000000000
mov qword [rsp + 0x20], rax
call qword [sym.imp.avformat_59.dll_avformat_seek_file]
test eax, eax
jns 0x140004697
lea r8, str.seek_file_failed......._n
mov edx, 0x10
xor ecx, ecx
call qword [sym.imp.avutil_57.dll_av_log]
mov eax, 1
mov r12, qword [rsp + 0x490]
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.1400285f0
add rsp, 0x498
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
xor dil, dil
nop word [rax + rax]
mov rdx, qword [rsp + 0x30]
mov rcx, qword [r14]
call qword [sym.imp.avformat_59.dll_av_read_frame]
test eax, eax
jne 0x140004775
mov rdx, qword [rsp + 0x30]
mov eax, dword [r14 + 0x48]
cmp dword [rdx + 0x24], eax
jne 0x1400046a0
mov rcx, qword [r14 + 0x18]
call qword [sym.imp.avcodec_59.dll_avcodec_send_packet]
test eax, eax
js 0x1400046a0
call qword [sym.imp.avutil_57.dll_av_frame_alloc]
mov rcx, qword [r14 + 0x18]
mov rdx, rax
mov qword [rsp + 0x38], rax
call qword [sym.imp.avcodec_59.dll_avcodec_receive_frame]
mov ebx, eax
cmp eax, 0xfffffff5
je 0x140004765
cmp eax, 0xdfb9b0bb
je 0x140004765
test eax, eax
js 0x140004748
mov rax, qword [rsp + 0x38]
mov r8d, 4
mov rcx, qword [rax + 0x158]
cmp rcx, r15
mov qword [rax + 0x88], rcx
mov rdx, qword [rsp + 0x38]
mov rcx, qword [r14 + 0x38]
setge dil
call qword [sym.imp.avfilter_8.dll_av_buffersrc_add_frame_flags]
mov ebx, eax
test eax, eax
jns 0x140004748
mov r9d, eax
lea r8, str.Error_adding_frame_to_fg_buffer_source:__d__continuing..._n
mov edx, 0x10
xor ecx, ecx
call qword [sym.imp.avutil_57.dll_av_log]
lea rcx, [rsp + 0x38]
call qword [sym.imp.avutil_57.dll_av_frame_free]
test dil, dil
jne 0x140004775
test ebx, ebx
jns 0x1400046d2
jmp 0x1400046a0
lea rcx, [rsp + 0x38]
call qword [sym.imp.avutil_57.dll_av_frame_free]
jmp 0x1400046a0
mov rcx, qword [r14 + 0x38]
xor edx, edx
lea r8d, [rdx + 4]
call qword [sym.imp.avfilter_8.dll_av_buffersrc_add_frame_flags]
test eax, eax
jns 0x1400047a5
lea r8, str.Error_adding_empty_frame_to_fg_buffer_source:__d__continuing..._n
mov r9d, eax
mov edx, 0x10
xor ecx, ecx
call qword [sym.imp.avutil_57.dll_av_log]
jmp 0x14000466b
call qword [sym.imp.avutil_57.dll_av_frame_alloc]
mov rcx, qword [r14 + 0x40]
mov rdx, rax
mov rsi, rax
call qword [sym.imp.avfilter_8.dll_av_buffersink_get_frame]
mov r15d, eax
cmp eax, 0xfffffff5
je 0x140004880
cmp eax, 0xdfb9b0bb
je 0x140004880
mov rcx, qword [r14 + 0x20]
mov rdx, rsi
call qword [sym.imp.avcodec_59.dll_avcodec_send_frame]
mov ebx, eax
call qword [sym.imp.avcodec_59.dll_av_packet_alloc]
mov rcx, rax
mov rdi, rax
call qword [sym.imp.avcodec_59.dll_av_init_packet]
test ebx, ebx
js 0x14000484f
nop word [rax + rax]
mov rcx, qword [r14 + 0x20]
mov rdx, rdi
call qword [sym.imp.avcodec_59.dll_avcodec_receive_packet]
mov r8, qword [r14 + 0x10]
mov rcx, rdi
mov rdx, qword [r14 + 0x20]
mov ebx, eax
mov r8, qword [r8 + 0x10]
mov rdx, qword [rdx + 0x64]
call qword [sym.imp.avcodec_59.dll_av_packet_rescale_ts]
mov rcx, qword [r14 + 0x10]
mov edx, dword [rcx]
mov dword [rdi + 0x24], edx
cmp ebx, 0xfffffff5
je 0x14000484f
cmp ebx, 0xdfb9b0bb
je 0x14000484f
mov rcx, qword [r14 + 8]
mov rdx, rdi
call qword [sym.imp.avformat_59.dll_av_write_frame]
test ebx, ebx
jns 0x140004800
mov rcx, rdi
call qword [sym.imp.avcodec_59.dll_av_packet_unref]
lea r8, str.muxing_one_frame_n
mov edx, 0x20
xor ecx, ecx
call qword [sym.imp.avutil_57.dll_av_log]
mov rcx, rsi
call qword [sym.imp.avutil_57.dll_av_frame_unref]
test r15d, r15d
jns 0x1400047a5
jmp 0x140004889
mov rcx, rsi
call qword [sym.imp.avutil_57.dll_av_frame_unref]
mov rcx, qword [r14 + 8]
call qword [sym.imp.avformat_59.dll_av_write_trailer]
lea rcx, [rsp + 0x30]
call qword [sym.imp.avcodec_59.dll_av_packet_free]
xor eax, eax
jmp 0x140004670
mov rcx, rsi
call fcn.14002889c
mov eax, 4
mov qword [r14 + 0x60], r12
jmp 0x140004670
mov rcx, rsi
call fcn.14002889c
mov eax, 4
mov qword [r14 + 0x58], r12
jmp 0x140004670
mov rcx, rsi
call fcn.14002889c
mov eax, 4
mov qword [r14 + 0x50], r12
jmp 0x140004670
mov eax, 7
jmp 0x140004678