Function at 0x6faf81c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x14c
mov eax, dword [esp + 0x16c]
mov ebp, dword [esp + 0x164]
mov esi, dword [eax + 0x18]
test esi, esi
je 0x6faf87b0
mov eax, dword [esp + 0x160]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x6faf87fd
cmp dword [eax + 8], 3
jne 0x6faf87de
mov eax, dword [esp + 0x168]
xor edx, edx
mov dword [eax], 0
lea eax, [ebp + 4]
mov dword [ebp], 0
mov dword [ebp + 0x1c], 0
mov ecx, eax
mov dword [esp + 0x34], eax
mov eax, ebp
and ecx, 0xfffffffc
sub eax, ecx
add eax, 0x20
and eax, 0xfffffffc
mov dword [ecx + edx], 0
add edx, 4
cmp edx, eax
jb 0x6faf8232
mov eax, dword [esp + 0x160]
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 0x80000000
mov eax, dword [eax + 0xc]
test byte [eax + 0x10], 0x20
jne 0x6faf8270
mov eax, dword [esp + 0x16c]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x6faf853b
mov esi, dword [esp + 0x16c]
lea edi, [esp + 0xa0]
mov ecx, 0x14
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xa0]
mov dword [esp], eax
call sym.avcodec_56.dll_av_packet_split_side_data
test eax, eax
mov dword [esp + 0x3c], eax
jne 0x6faf875c
mov eax, dword [esp + 0x160]
mov ecx, 0x14
lea edi, [esp + 0x50]
lea esi, [esp + 0xa0]
rep movsd dword es:[edi], dword [esi]
cmp dword [eax + 0x3bc], 1
je 0x6faf8690
mov eax, dword [esp + 0x160]
lea edi, [esp + 0x50]
mov eax, dword [eax + 0x40]
mov dword [eax + 0x20], edi
mov eax, dword [esp + 0x160]
mov ebx, dword [eax + 0x38c]
test ebx, ebx
je 0x6faf833c
mov eax, dword [esp + 0x16c]
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
lea ecx, [eax - 0x80000000]
or ecx, edx
je 0x6faf833c
mov edi, dword [esp + 0x160]
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0xf4240
mov ecx, dword [edi + 0x388]
mov ebx, dword [edi + 0x38c]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebx
call sub.avutil_54.dll_av_rescale_q
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x1c], edx
mov eax, dword [esp + 0x160]
lea edi, [esp + 0x50]
mov eax, dword [eax + 0xc]
mov dword [esp + 0xc], edi
mov edi, dword [esp + 0x168]
mov dword [esp + 4], ebp
mov dword [esp + 8], edi
mov edi, dword [esp + 0x160]
mov dword [esp], edi
call dword [eax + 0x58]
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0xc]
test eax, eax
mov dword [esp + 0x30], eax
je 0x6faf8564
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x6faf83a7
mov eax, dword [esp + 0x16c]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x6faf83a7
mov edi, dword [esp + 0x160]
mov edx, dword [edi + 0x388]
test edx, edx
jne 0x6faf8974
mov eax, dword [ebp + 0x10]
xor edi, edi
mov dword [esp + 0x164], ebp
mov dword [esp + 0x2c], eax
mov esi, esi
lea edi, [edi]
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + edi*4]
mov ebp, dword [eax + 0x5c]
test ebp, ebp
je 0x6faf8550
movzx ebx, byte [ebp]
test bl, bl
je 0x6faf8550
lea eax, [ebp + 1]
mov ecx, ebx
and ecx, 0xffffff80
mov dword [esp + 0x28], eax
movzx ecx, cl
movzx eax, bl
and ebx, 0xffffffc0
shr ecx, 1
cmp bl, 0x80
sete bl
cmp eax, 0xfd
mov esi, ebx
seta bl
mov edx, esi
or dl, bl
jne 0x6faf8443
mov esi, dword [esp + 0x28]
test eax, ecx
je 0x6faf85f5
lea ebx, [esi + 1]
movzx edx, byte [esi]
jmp 0x6faf8437
shl eax, 6
shl ecx, 5
add eax, edx
test eax, ecx
je 0x6faf8600
add ebx, 1
movzx edx, byte [ebx - 1]
add edx, 0xffffff80
mov esi, edx
sar esi, 6
test esi, esi
je 0x6faf8420
mov eax, dword [esp + 0x160]
mov ebp, dword [esp + 0x164]
xor ebx, ebx
mov dword [esp + 8], str.Invalid_UTF_8_in_decoded_subtitles_text__maybe_missing__sub_charenc_option_n
mov dword [esp + 4], 0x10
mov dword [esp], eax
call sub.avutil_54.dll_av_log
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x6faf84fc
mov eax, dword [ebp + 0x10]
lea esi, [ebx*4]
mov eax, dword [eax + ebx*4]
add eax, 0x14
mov dword [esp], eax
call sub.avutil_54.dll_av_freep
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + ebx*4]
add eax, 0x18
mov dword [esp], eax
call sub.avutil_54.dll_av_freep
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + ebx*4]
add eax, 0x1c
mov dword [esp], eax
call sub.avutil_54.dll_av_freep
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + ebx*4]
add eax, 0x20
mov dword [esp], eax
call sub.avutil_54.dll_av_freep
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + ebx*4]
add eax, 0x58
mov dword [esp], eax
call sub.avutil_54.dll_av_freep
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + ebx*4]
add ebx, 1
add eax, 0x5c
mov dword [esp], eax
call sub.avutil_54.dll_av_freep
mov eax, dword [ebp + 0x10]
add eax, esi
mov dword [esp], eax
call sub.avutil_54.dll_av_freep
cmp ebx, dword [ebp + 0xc]
jb 0x6faf8476
lea eax, [ebp + 0x10]
mov dword [esp], eax
call sub.avutil_54.dll_av_freep
mov dword [ebp], 0
mov dword [ebp + 0x1c], 0
mov eax, ebp
mov ecx, dword [esp + 0x34]
xor edx, edx
and ecx, 0xfffffffc
sub eax, ecx
add eax, 0x20
and eax, 0xfffffffc
mov dword [ecx + edx], 0
add edx, 4
cmp edx, eax
jb 0x6faf8528
mov eax, 0xbebbb1b7
add esp, 0x14c
pop ebx
pop esi
pop edi
pop ebp
ret
add edi, 1
cmp edi, dword [esp + 0x30]
jne 0x6faf83c0
mov ebp, dword [esp + 0x164]
mov eax, dword [esp + 0x68]
cmp dword [esp + 0xb8], eax
je 0x6faf858d
lea eax, [esp + 0x50]
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp], eax
call sym.avcodec_56.dll_av_free_packet
mov eax, dword [esp + 0x160]
mov eax, dword [eax + 0x390]
mov eax, dword [eax + 0x10]
test eax, 0x10000
je 0x6faf87c5
xor esi, esi
mov word [ebp], si
mov eax, dword [esp + 0x160]
mov ecx, dword [esp + 0x3c]
mov eax, dword [eax + 0x40]
test ecx, ecx
mov dword [eax + 0x20], 0
jne 0x6faf8729
mov eax, dword [esp + 0x168]
mov edx, dword [eax]
test edx, edx
je 0x6faf85e6
mov eax, dword [esp + 0x160]
add dword [eax + 0x1ac], 1
mov eax, dword [esp + 0x38]
add esp, 0x14c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, esi
mov esi, esi
lea edi, [edi]
lea edx, [ecx + ecx - 1]
xor ecx, ecx
and eax, edx
mov edx, ebx
sub edx, ebp
cmp edx, 1
je 0x6faf862c
cmp eax, 0x7f
setbe cl
cmp edx, 2
je 0x6faf862c
lea ecx, [edx + edx*4 - 4]
mov edx, 1
shl edx, cl
cmp eax, edx
setb cl
cmp eax, 0x10ffff
seta dl
or dl, cl
jne 0x6faf8443
cmp eax, 0xfffe
je 0x6faf8443
sub eax, 0xd800
cmp eax, 0x7ff
jbe 0x6faf8443
movzx edx, byte [ebx]
test dl, dl
je 0x6faf8550
mov ecx, edx
movzx eax, dl
and edx, 0xffffffc0
and ecx, 0xffffff80
lea esi, [ebx + 1]
movzx ecx, cl
shr ecx, 1
cmp dl, 0x80
je 0x6faf8443
cmp eax, 0xfd
ja 0x6faf8443
mov ebp, ebx
jmp 0x6faf840f
mov edx, dword [esp + 0xbc]
test edx, edx
je 0x6faf82c6
mov eax, dword [eax + 0x3b8]
mov dword [esp], 0x7063eb5e
mov dword [esp + 4], eax
call fcn.6fc71c10
cmp eax, 0xffffffff
mov ebx, eax
je 0x6faf89af
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xbc]
cmp eax, 0x1fffffde
mov dword [esp + 0x48], eax
jbe 0x6faf884b
mov eax, dword [esp + 0x160]
mov dword [esp + 8], str.Subtitles_packet_is_too_big_for_recoding_n
mov dword [esp + 4], 0x10
mov dword [esp], eax
call sub.avutil_54.dll_av_log
mov dword [esp + 0x38], 0xfffffff4
mov dword [esp], ebx
call fcn.6fc72140
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x168]
test esi, esi
mov dword [eax], 0
je 0x6faf85e6
lea eax, [esp + 0xa0]
mov dword [esp], eax
call sym.avcodec_56.dll_av_packet_free_side_data
mov eax, dword [esp + 0x38]
cmp dword [esp + 0xbc], eax
jne 0x6faf85cb
mov eax, dword [esp + 0x16c]
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x38], eax
jmp 0x6faf85cb
mov eax, dword [esp + 0x16c]
mov ecx, dword [esp + 0xbc]
mov eax, dword [eax + 0x1c]
mov edx, eax
mov dword [esp + 0x28], eax
mov eax, 0x20
sub edx, ecx
cmp edx, 0x20
cmovg edx, eax
mov eax, dword [esp + 0xb8]
add eax, ecx
cmp edx, 4
jae 0x6faf880d
test edx, edx
je 0x6faf82a0
test dl, 2
mov byte [eax], 0
je 0x6faf82a0
xor ecx, ecx
mov word [edx + eax - 2], cx
jmp 0x6faf82a0
mov ebx, dword [eax + 0x1c]
test ebx, ebx
je 0x6faf81e3
mov dword [esp + 8], str.invalid_packet:_NULL_data__size___0_n
jmp 0x6faf87e6
test eax, 0x20000
je 0x6faf85ae
mov ebx, 1
mov word [ebp], bx
jmp 0x6faf85ae
mov dword [esp + 8], str.Invalid_media_type_for_subtitles_n
mov eax, dword [esp + 0x160]
mov dword [esp + 4], 0x10
mov dword [esp], eax
call sub.avutil_54.dll_av_log
add esp, 0x14c
mov eax, 0xffffffea
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [eax + 4]
mov dword [eax], 0
mov dword [edx + eax - 4], 0
and ecx, 0xfffffffc
sub eax, ecx
add eax, edx
and eax, 0xfffffffc
cmp eax, 4
jb 0x6faf82a0
and eax, 0xfffffffc
mov edx, eax
xor eax, eax
mov dword [ecx + eax], 0
add eax, 4
cmp eax, edx
jb 0x6faf8838
jmp 0x6faf82a0
lea esi, [esp + 0xf0]
shl eax, 2
mov dword [esp + 4], eax
mov dword [esp], esi
call sym.avcodec_56.dll_av_new_packet
test eax, eax
mov dword [esp + 0x38], eax
js 0x6faf8708
mov eax, dword [esp + 0xf0]
mov edx, dword [esp + 0x10c]
lea edi, [esp + 0x4c]
mov dword [esp], ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x108]
mov dword [esp + 0x6c], edx
mov dword [esp + 0x4c], edx
lea edx, [esp + 0x44]
mov dword [esp + 0x68], eax
mov dword [esp + 0x44], eax
lea eax, [esp + 0x48]
mov dword [esp + 0xc], edx
mov dword [esp + 0x28], edx
mov dword [esp + 8], eax
lea eax, [esp + 0x40]
mov dword [esp + 4], eax
call fcn.6fc720e0
cmp eax, 0xffffffff
mov edx, dword [esp + 0x28]
je 0x6faf8908
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.6fc720e0
cmp eax, 0xffffffff
je 0x6faf8908
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x4c]
cmp eax, edx
jbe 0x6faf8908
mov edi, dword [esp + 0x48]
test edi, edi
je 0x6faf89e8
mov edi, dword [sym.imp.msvcrt.dll__errno]
call edi
mov eax, dword [eax]
neg eax
test eax, eax
js 0x6faf8a13
mov eax, dword [esp + 0x160]
mov eax, dword [eax + 0x3b8]
mov dword [esp + 8], str.Unable_to_recode_subtitle_event___s__from__s_to_UTF_8_n
mov dword [esp + 4], 0x10
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x160]
mov dword [esp], eax
call sub.avutil_54.dll_av_log
mov dword [esp], esi
call sym.avcodec_56.dll_av_free_packet
mov dword [esp], ebx
call fcn.6fc72140
mov dword [esp + 0x38], 0xffffffff
jmp 0x6faf8710
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0x3e8
mov ecx, dword [edi + 0x388]
mov ebx, dword [edi + 0x38c]
mov dword [esp], eax
sar eax, 0x1f
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebx
call sub.avutil_54.dll_av_rescale_q
mov dword [ebp + 8], eax
jmp 0x6faf83a7
mov dword [esp + 0x14], 0xa41
mov dword [esp + 0x10], 0x7063e200
mov dword [esp + 0xc], str.cd____libiconv_t__1
mov dword [esp + 8], 0x7063e264
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.avutil_54.dll_av_log
call sub.msvcrt.dll_abort
sub eax, edx
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp + 0x6c], eax
add eax, dword [esp + 0x68]
mov dword [esp], eax
call fcn.6fef7ef0
mov dword [esp], ebx
call fcn.6fc72140
jmp 0x6faf82c6
call edi
mov eax, dword [eax]
neg eax
mov edi, eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x160]
mov eax, dword [eax + 0x3b8]
mov dword [esp + 8], str.Unable_to_recode_subtitle_event___s__from__s_to_UTF_8_n
mov dword [esp + 4], 0x10
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x160]
mov dword [esp], eax
call sub.avutil_54.dll_av_log
mov dword [esp], esi
call sym.avcodec_56.dll_av_free_packet
mov dword [esp], ebx
call fcn.6fc72140
test edi, edi
js 0x6faf8710
jmp 0x6faf82c6