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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4ec
mov eax, dword [esp + 0x50c]
mov edx, dword [eax + 0x18]
test edx, edx
je 0x666f00
mov eax, dword [esp + 0x500]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x667078
cmp dword [eax + 8], 3
jne 0x667059
mov eax, dword [esp + 0x508]
xor edx, edx
mov dword [eax], 0
mov eax, dword [esp + 0x504]
mov dword [eax], 0
mov eax, dword [esp + 0x504]
mov dword [eax + 0x1c], 0
mov eax, dword [esp + 0x504]
add eax, 4
mov ecx, eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x504]
and ecx, 0xfffffffc
sub eax, ecx
add eax, 0x20
and eax, 0xfffffffc
mov dword [ecx + edx], 0
add edx, 4
cmp edx, eax
jb 0x666954
mov eax, dword [esp + 0x504]
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], 0x80000000
mov eax, dword [esp + 0x500]
mov eax, dword [eax + 0xc]
test byte [eax + 0x10], 0x20
jne 0x66699d
mov eax, dword [esp + 0x50c]
mov eax, dword [eax + 0x1c]
test eax, eax
mov dword [esp + 0x30], eax
je 0x666ca9
mov esi, dword [esp + 0x50c]
lea edi, [esp + 0x98]
mov ecx, 0x12
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x98]
mov dword [esp], eax
call fcn.005d1e10
test eax, eax
mov dword [esp + 0x38], eax
jne 0x666ea6
mov eax, dword [esp + 0x500]
mov ecx, 0x12
lea edi, [esp + 0x50]
lea esi, [esp + 0x98]
rep movsd dword es:[edi], dword [esi]
cmp dword [eax + 0x3ac], 1
je 0x666dda
mov eax, dword [eax + 0x40]
lea edi, [esp + 0x50]
mov dword [eax + 0x18], edi
mov eax, dword [esp + 0x500]
mov eax, dword [eax + 0x37c]
test eax, eax
je 0x666a69
mov eax, dword [esp + 0x50c]
mov ecx, dword [eax + 0xc]
mov ebx, dword [eax + 8]
lea eax, [ecx - 0x80000000]
or eax, ebx
je 0x666a69
mov eax, dword [esp + 0x500]
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0xf4240
mov edx, dword [eax + 0x380]
mov eax, dword [eax + 0x37c]
mov dword [esp], ebx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
call fcn.00892710
mov edi, dword [esp + 0x504]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], edx
mov eax, dword [esp + 0x500]
lea edi, [esp + 0x50]
mov eax, dword [eax + 0xc]
mov dword [esp + 0xc], edi
mov edi, dword [esp + 0x508]
mov dword [esp + 8], edi
mov edi, dword [esp + 0x504]
mov dword [esp + 4], edi
mov edi, dword [esp + 0x500]
mov dword [esp], edi
call dword [eax + 0x58]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x500]
cmp dword [eax + 0x3d4], 1
je 0x666f3f
mov eax, dword [esp + 0x504]
mov eax, dword [eax + 0xc]
test eax, eax
mov dword [esp + 0x2c], eax
je 0x666ccd
mov eax, dword [esp + 0x504]
mov eax, dword [eax + 8]
test eax, eax
jne 0x666b02
mov eax, dword [esp + 0x50c]
mov ecx, dword [eax + 0x34]
mov ebx, dword [eax + 0x30]
mov eax, ecx
or eax, ebx
je 0x666b02
mov eax, dword [esp + 0x500]
mov ebp, dword [eax + 0x37c]
test ebp, ebp
jne 0x667205
mov eax, dword [esp + 0x504]
xor edi, edi
mov eax, dword [eax + 0x10]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x28]
mov eax, dword [eax + edi*4]
mov ebp, dword [eax + 0x7c]
test ebp, ebp
je 0x666cc0
movzx edx, byte [ebp]
test dl, dl
je 0x666cc0
movzx eax, dl
and edx, 0xffffffc0
mov ecx, eax
shr ecx, 1
and ecx, 0x40
cmp dl, 0x80
sete bl
cmp eax, 0xfd
seta dl
or bl, dl
mov byte [esp + 0x24], bl
jne 0x666b93
test eax, ecx
lea ebx, [ebp + 1]
je 0x666d70
lea ebx, [ebp + 2]
movzx edx, byte [ebp + 1]
jmp 0x666b87
shl eax, 6
shl ecx, 5
add eax, edx
test eax, ecx
je 0x666d70
add ebx, 1
movzx edx, byte [ebx - 1]
add edx, 0xffffff80
mov esi, edx
sar esi, 6
test esi, esi
je 0x666b70
mov eax, dword [esp + 0x500]
mov dword [esp + 8], str.Invalid_UTF_8_in_decoded_subtitles_text__maybe_missing__sub_charenc_option_n
xor ebx, ebx
mov dword [esp + 4], 0x10
mov dword [esp], eax
call fcn.00891920
mov eax, dword [esp + 0x504]
mov edx, dword [eax + 0xc]
mov esi, eax
test edx, edx
je 0x666c4e
mov eax, dword [esi + 0x10]
lea edi, [ebx*4]
mov eax, dword [eax + ebx*4]
add eax, 0x54
mov dword [esp], eax
call fcn.00894200
mov eax, dword [esi + 0x10]
mov eax, dword [eax + ebx*4]
add eax, 0x58
mov dword [esp], eax
call fcn.00894200
mov eax, dword [esi + 0x10]
mov eax, dword [eax + ebx*4]
add eax, 0x5c
mov dword [esp], eax
call fcn.00894200
mov eax, dword [esi + 0x10]
mov eax, dword [eax + ebx*4]
add eax, 0x60
mov dword [esp], eax
call fcn.00894200
mov eax, dword [esi + 0x10]
mov eax, dword [eax + ebx*4]
add eax, 0x78
mov dword [esp], eax
call fcn.00894200
mov eax, dword [esi + 0x10]
mov eax, dword [eax + ebx*4]
add ebx, 1
add eax, 0x7c
mov dword [esp], eax
call fcn.00894200
mov eax, dword [esi + 0x10]
add eax, edi
mov dword [esp], eax
call fcn.00894200
cmp ebx, dword [esi + 0xc]
jb 0x666bc8
mov eax, dword [esp + 0x504]
add eax, 0x10
mov dword [esp], eax
call fcn.00894200
mov eax, dword [esp + 0x504]
xor edx, edx
mov dword [eax], 0
mov eax, dword [esp + 0x504]
mov dword [eax + 0x1c], 0
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x504]
and ecx, 0xfffffffc
sub eax, ecx
add eax, 0x20
and eax, 0xfffffffc
mov dword [ecx + edx], 0
add edx, 4
cmp edx, eax
jb 0x666c93
mov dword [esp + 0x30], 0xbebbb1b7
mov eax, dword [esp + 0x30]
add esp, 0x4ec
pop ebx
pop esi
pop edi
pop ebp
ret
add edi, 1
cmp edi, dword [esp + 0x2c]
jne 0x666b12
mov eax, dword [esp + 0x68]
cmp dword [esp + 0xb0], eax
je 0x666cf6
lea eax, [esp + 0x50]
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp], eax
call fcn.005d23b0
mov eax, dword [esp + 0x500]
mov eax, dword [eax + 0x384]
mov eax, dword [eax + 0x10]
test eax, 0x10000
je 0x666f20
mov eax, dword [esp + 0x504]
xor edi, edi
mov word [eax], di
mov eax, dword [esp + 0x500]
mov ebx, dword [esp + 0x38]
mov eax, dword [eax + 0x40]
test ebx, ebx
mov dword [eax + 0x18], 0
jne 0x666e73
mov eax, dword [esp + 0x508]
mov ecx, dword [eax]
test ecx, ecx
je 0x666ca9
mov eax, dword [esp + 0x500]
add dword [eax + 0x1b0], 1
mov eax, dword [esp + 0x30]
add esp, 0x4ec
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [ecx + ecx - 1]
and eax, edx
mov edx, ebx
sub edx, ebp
cmp edx, 1
je 0x666d96
cmp edx, 2
je 0x666dd0
lea ecx, [edx + edx*4 - 4]
mov edx, 1
shl edx, cl
cmp eax, edx
setb byte [esp + 0x24]
movzx ecx, byte [esp + 0x24]
cmp eax, 0x10ffff
seta dl
or cl, dl
jne 0x666b93
cmp eax, 0xfffe
je 0x666b93
sub eax, 0xd800
mov ebp, ebx
cmp eax, 0x7ff
ja 0x666b24
jmp 0x666b93
cmp eax, 0x7f
setbe byte [esp + 0x24]
jmp 0x666d96
mov edi, dword [esp + 0xb4]
test edi, edi
je 0x6669f3
mov eax, dword [eax + 0x3a8]
mov dword [esp], 0xc9e89a
mov dword [esp + 4], eax
call fcn.008cdf20
cmp eax, 0xffffffff
mov ebx, eax
je 0x66753c
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xb4]
cmp eax, 0x1fffffde
mov dword [esp + 0x48], eax
jbe 0x6670cb
mov eax, dword [esp + 0x500]
mov dword [esp + 8], str.Subtitles_packet_is_too_big_for_recoding_n
mov dword [esp + 4], 0x10
mov dword [esp], eax
call fcn.00891920
mov dword [esp + 0x30], 0xfffffff4
mov dword [esp], ebx
call fcn.008ce420
mov eax, dword [esp + 0x508]
mov dword [eax], 0
mov eax, dword [esp + 0x38]
test eax, eax
je 0x666ca9
lea eax, [esp + 0x98]
mov dword [esp], eax
call fcn.005d1960
mov eax, dword [esp + 0x30]
cmp dword [esp + 0xb4], eax
jne 0x666d3a
mov eax, dword [esp + 0x50c]
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x30], eax
jmp 0x666d3a
mov eax, dword [esp + 0x50c]
mov edx, dword [esp + 0xb4]
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x24], eax
sub eax, edx
cmp eax, 0x20
jle 0x666ec7
mov eax, 0x20
add edx, dword [esp + 0xb0]
cmp eax, 4
jae 0x66708f
test eax, eax
je 0x6669cd
test al, 2
mov byte [edx], 0
je 0x6669cd
xor ebp, ebp
mov word [edx + eax - 2], bp
jmp 0x6669cd
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x6668ec
mov dword [esp + 8], str.invalid_packet:_NULL_data__size___0_n
jmp 0x667061
test eax, 0x20000
je 0x666d1d
mov eax, dword [esp + 0x504]
mov esi, 1
mov word [eax], si
jmp 0x666d1d
mov eax, dword [esp + 0x508]
mov eax, dword [eax]
test eax, eax
je 0x666ab6
mov eax, dword [esp + 0x504]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x666ccd
mov eax, dword [esp + 0x500]
mov eax, dword [eax + 0x37c]
test eax, eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x500]
je 0x66725d
mov eax, dword [eax + 0x380]
mov dword [esp + 0x28], eax
lea eax, [esp + 0xe0]
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0
xor ebx, ebx
mov dword [esp], eax
mov dword [esp + 0x24], eax
call fcn.00876af0
mov eax, dword [esp + 0x504]
mov edx, dword [eax + 0xc]
test edx, edx
jne 0x666fcf
jmp 0x667244
add ebx, 1
cmp ebx, edx
jae 0x667244
mov eax, dword [esp + 0x504]
mov eax, dword [eax + 0x10]
mov ebp, dword [eax + ebx*4]
cmp dword [ebp + 0x74], 3
jne 0x666fc4
mov esi, dword [ebp + 0x7c]
mov edi, str.Dialogue:
mov ecx, 0xa
repe cmpsb byte [esi], byte es:[edi]
je 0x666fc4
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.00877730
mov dword [esp + 4], 0x2c
mov eax, dword [ebp + 0x7c]
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
mov dword [esp + 0x4c], eax
je 0x66704a
lea edi, [esp + 0x4c]
add eax, 1
mov dword [esp + 8], 0xa
mov dword [esp], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 4], edi
call sub.msvcrt.dll_strtol
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x4c]
cmp byte [eax], 0x2c
je 0x667277
mov eax, dword [esp + 0x504]
mov edx, dword [eax + 0xc]
jmp 0x666fc4
mov dword [esp + 8], str.Invalid_media_type_for_subtitles_n
mov eax, dword [esp + 0x500]
mov dword [esp + 4], 0x10
mov dword [esp], eax
call fcn.00891920
mov dword [esp + 0x30], 0xffffffea
mov eax, dword [esp + 0x30]
add esp, 0x4ec
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [edx + 4]
mov dword [edx], 0
mov dword [edx + eax - 4], 0
and ecx, 0xfffffffc
sub edx, ecx
add eax, edx
and eax, 0xfffffffc
cmp eax, 4
jb 0x6669cd
and eax, 0xfffffffc
xor edx, edx
mov dword [ecx + edx], 0
add edx, 4
cmp edx, eax
jb 0x6670b8
jmp 0x6669cd
shl eax, 2
mov dword [esp + 4], eax
lea eax, [esp + 0xe0]
mov dword [esp], eax
mov dword [esp + 0x24], eax
call fcn.005d10c0
test eax, eax
mov dword [esp + 0x30], eax
js 0x666e52
mov eax, dword [esp + 0xe0]
mov edx, dword [esp + 0xf8]
lea edi, [esp + 0x4c]
lea esi, [esp + 0x44]
mov dword [esp], ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0xfc]
mov dword [esp + 0xc], esi
mov dword [esp + 0x68], edx
mov dword [esp + 0x44], edx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x48]
mov dword [esp + 8], eax
lea eax, [esp + 0x40]
mov dword [esp + 4], eax
call fcn.008ce3c0
cmp eax, 0xffffffff
je 0x667184
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.008ce3c0
cmp eax, 0xffffffff
je 0x667184
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x4c]
cmp eax, edx
jbe 0x667184
mov ecx, dword [esp + 0x48]
test ecx, ecx
je 0x667511
call sub.msvcrt.dll__errno
mov esi, dword [eax]
test esi, esi
jle 0x6674a6
call sub.msvcrt.dll__errno
mov esi, dword [eax]
mov eax, esi
neg eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x500]
mov eax, dword [eax + 0x3a8]
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 + 0xb0]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x500]
mov dword [esp], eax
call fcn.00891920
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.005d23b0
mov dword [esp], ebx
call fcn.008ce420
test esi, esi
jg 0x666e5a
mov eax, dword [esp + 0x500]
jmp 0x6669f3
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0x3e8
mov edx, dword [eax + 0x380]
mov eax, dword [eax + 0x37c]
mov dword [esp], ebx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
call fcn.00892710
mov edi, dword [esp + 0x504]
mov dword [edi + 8], eax
jmp 0x666b02
mov eax, dword [esp + 0x24]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00877750
jmp 0x666ab6
mov eax, dword [eax + 0x6c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x500]
mov eax, dword [eax + 0x70]
mov dword [esp + 0x28], eax
jmp 0x666f8c
add eax, 1
mov edi, dword [esp + 0x50c]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0x64
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov eax, dword [edi + 8]
mov edx, dword [edi + 0xc]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00892710
mov edi, eax
mov eax, dword [esp + 0x50c]
mov edx, dword [esp + 0x50c]
mov eax, dword [eax + 0x34]
mov edx, dword [edx + 0x30]
mov ecx, eax
and ecx, edx
cmp ecx, 0xffffffff
je 0x667502
mov ecx, dword [esp + 0x28]
mov dword [esp + 8], esi
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0x64
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 0xc], ecx
call fcn.00892710
mov esi, eax
lea eax, [eax + eax*4]
add eax, eax
mov ecx, dword [esp + 0x504]
mov edx, dword [ecx + 8]
cmp edx, eax
jae 0x667319
mov edx, eax
mov eax, dword [esp + 0x504]
mov dword [eax + 8], edx
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], str.Dialogue:__ld_
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.00876c20
cmp edi, 0xffffffff
je 0x6675bb
mov eax, 0x5d34edef
mov dword [esp + 4], str._d:_02d:_02d._02d_
imul edi
mov eax, edi
sar eax, 0x1f
sar edx, 0x11
sub edx, eax
imul ecx, edx, 0xfffa81c0
mov dword [esp + 8], edx
mov edx, 0x57619f1
add ecx, edi
mov eax, ecx
imul edx
mov eax, ecx
sar eax, 0x1f
sar edx, 7
sub edx, eax
imul eax, edx, 0xffffe890
mov dword [esp + 0xc], edx
mov edx, 0x51eb851f
add ecx, eax
mov eax, ecx
imul edx
mov eax, edx
mov edx, ecx
sar edx, 0x1f
sar eax, 5
sub eax, edx
imul edx, eax, 0xffffff9c
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
add ecx, edx
mov dword [esp], eax
mov dword [esp + 0x14], ecx
call fcn.00876c20
cmp esi, 0xffffffff
je 0x6675a2
add esi, edi
cmp esi, 0xffffffff
je 0x6675a2
mov eax, 0x5d34edef
mov dword [esp + 4], str._d:_02d:_02d._02d_
imul esi
mov eax, esi
sar eax, 0x1f
sar edx, 0x11
mov edi, edx
mov edx, 0x57619f1
sub edi, eax
imul eax, edi, 0xfffa81c0
mov dword [esp + 8], edi
add esi, eax
mov eax, esi
imul edx
mov eax, esi
sar eax, 0x1f
sar edx, 7
mov ecx, edx
mov edx, 0x51eb851f
sub ecx, eax
imul eax, ecx, 0xffffe890
mov dword [esp + 0xc], ecx
add esi, eax
mov eax, esi
imul edx
mov eax, edx
mov edx, esi
sar edx, 0x1f
sar eax, 5
sub eax, edx
imul edx, eax, 0xffffff9c
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
add esi, edx
mov dword [esp], eax
mov dword [esp + 0x14], esi
call fcn.00876c20
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], str._s_r_n
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.00876c20
mov eax, dword [esp + 0xe0]
mov dword [esp], eax
call fcn.00894320
mov edi, dword [esp + 0xe8]
cmp dword [esp + 0xe4], edi
mov dword [esp + 0x48], eax
jae 0x667575
test eax, eax
je 0x667575
lea eax, [ebp + 0x7c]
mov dword [esp], eax
call fcn.00894200
mov eax, dword [esp + 0x48]
mov dword [ebp + 0x7c], eax
jmp 0x66704a
mov eax, dword [esp + 0x500]
mov eax, dword [eax + 0x3a8]
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 + 0xb0]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x500]
mov dword [esp], eax
call fcn.00891920
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.005d23b0
mov dword [esp], ebx
call fcn.008ce420
mov dword [esp + 0x30], 0xffffffff
jmp 0x666e5a
mov eax, 0xfffffff6
mov esi, 0xffffffff
jmp 0x667309
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 sub.msvcrt.dll_memset
mov dword [esp], ebx
call fcn.008ce420
jmp 0x6671f9
mov dword [esp + 0x14], 0x9d2
mov dword [esp + 0x10], str.libavcodec_utils.c
mov dword [esp + 0xc], str.cd____libiconv_t__1
mov dword [esp + 8], 0xc9d2cc
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00891920
call sub.msvcrt.dll_abort
lea eax, [esp + 0x48]
mov dword [esp], eax
call fcn.00894200
mov eax, dword [esp + 0x24]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00877750
mov dword [esp + 0x30], 0xfffffff4
jmp 0x666ab6
mov eax, dword [esp + 0x24]
mov dword [esp + 4], str.9:59:59.99_
mov dword [esp], eax
call fcn.00876c20
jmp 0x667444
mov eax, dword [esp + 0x24]
mov dword [esp + 4], str.9:59:59.99_
mov dword [esp], eax
call fcn.00876c20
jmp 0x6673ba