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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x10c
mov edx, dword [esp + 0x120]
cmp dword [edx + 0x40], 1
je 0x6a4ce58f
mov eax, dword [edx + 0x48]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], 2
mov esi, dword [esp + 0x128]
mov dword [esp + 0xc0], esi
mov ecx, dword [esp + 0x12c]
imul ecx, dword [edx + 0x2c]
lea ebx, [ecx + ecx]
mov eax, dword [edx + 0x58]
test eax, eax
je 0x6a4ce501
cmp ebx, eax
jbe 0x6a4ce954
mov eax, dword [edx + 0x50]
mov dword [esp], eax
mov dword [esp + 0x2c], edx
call fcn.6a68be94
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x58], ebx
mov dword [esp], ebx
call sub.avutil_52.dll_av_malloc
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x50], eax
test eax, eax
je 0x6a4cee16
mov ecx, dword [esp + 0x12c]
imul ecx, dword [edx + 0x2c]
mov dword [esp + 0xe0], eax
mov dword [esp + 0x14], ecx
lea eax, [esp + 0x70]
mov dword [esp + 0x10], eax
lea ebx, [esp + 0xc0]
mov dword [esp + 0xc], ebx
lea eax, [esp + 0x74]
mov dword [esp + 8], eax
lea ebp, [esp + 0xe0]
mov dword [esp + 4], ebp
mov eax, dword [edx + 0x38]
mov dword [esp], eax
mov dword [esp + 0x2c], edx
call sym.avcodec_54.dll_av_audio_convert
test eax, eax
mov edx, dword [esp + 0x2c]
js 0x6a4ceaea
mov esi, dword [edx + 0x50]
mov dword [esp + 0x128], esi
mov eax, dword [edx + 0x30]
shl eax, 1
imul eax, dword [esp + 0x12c]
mov dword [esp + 0x54], eax
fild dword [esp + 0x54]
fstp dword [esp + 0x5c]
fld dword [esp + 0x5c]
fmul dword [edx + 0x28]
fadd dword [0x6aba1a10]
fnstcw word [esp + 0x5a]
mov ax, word [esp + 0x5a]
mov ah, 0xc
mov word [esp + 0x58], ax
fldcw word [esp + 0x58]
fistp dword [esp + 0x48]
fldcw word [esp + 0x5a]
mov eax, dword [edx + 0x44]
cmp eax, 1
je 0x6a4ce64c
mov dword [esp], eax
mov dword [esp + 0x2c], edx
call sub.avutil_52.dll_av_get_bytes_per_sample
imul eax, dword [esp + 0x48]
mov edx, dword [esp + 0x2c]
imul eax, dword [edx + 0x30]
mov ecx, dword [edx + 0x5c]
test ecx, ecx
je 0x6a4ce601
cmp ecx, eax
jae 0x6a4cead4
mov ecx, dword [edx + 0x54]
mov dword [esp], ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], edx
call fcn.6a68be94
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x5c], eax
mov dword [esp], eax
call sub.avutil_52.dll_av_malloc
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x54], eax
test eax, eax
je 0x6a4cee35
mov ebx, dword [esp + 0x124]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x124], eax
jmp 0x6a4ce654
mov dword [esp + 0x50], 0
mov eax, dword [edx + 0x34]
mov dword [esp + 0x40], eax
test eax, eax
jle 0x6a4ce6e4
mov ebx, dword [esp + 0x48]
shl ebx, 1
mov dword [esp + 0x40], ebx
xor ebp, ebp
lea ebx, [esp + 0xc0]
lea esi, [esp + 0x80]
mov dword [esp + 0x34], esi
lea edi, [esp + 0xa0]
mov dword [esp + 0x44], edi
mov dword [esp + 0x4c], ebx
mov ebx, edx
nop
mov eax, dword [esp + 0x12c]
add eax, dword [ebx + 0x24]
shl eax, 1
mov dword [esp], eax
call sub.avutil_52.dll_av_malloc
mov edx, dword [esp + 0x34]
mov dword [edx + ebp*4], eax
mov ecx, dword [ebx + 0x24]
shl ecx, 1
mov esi, dword [ebx + ebp*4 + 4]
mov edi, eax
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x4c]
mov dword [edx + ebp*4], edi
mov edx, dword [esp + 0x40]
mov dword [esp], edx
call sub.avutil_52.dll_av_malloc
mov edx, dword [esp + 0x44]
mov dword [edx + ebp*4], eax
inc ebp
mov eax, dword [ebx + 0x34]
cmp eax, ebp
jg 0x6a4ce694
mov dword [esp + 0x40], eax
mov edx, ebx
mov edi, dword [edx + 0x2c]
cmp edi, 2
je 0x6a4ce95c
mov ecx, dword [edx + 0x30]
cmp ecx, 1
jle 0x6a4ce701
cmp edi, 1
je 0x6a4ceb28
cmp edi, 6
je 0x6a4ceabc
cmp edi, ecx
jg 0x6a4ce970
cmp edi, 1
jle 0x6a4ce970
xor eax, eax
lea ebp, [esp + 0xe0]
lea ebx, [esp + 0xa0]
mov dword [esp + 0x44], ebx
nop
mov ecx, dword [ebx + eax*4]
mov dword [ebp + eax*4], ecx
inc eax
cmp edi, eax
jg 0x6a4ce730
mov ebp, dword [esp + 0x12c]
test ebp, ebp
jle 0x6a4ce7a1
test edi, edi
jle 0x6a4ceb5b
lea esi, [edi + edi]
mov dword [esp + 0x38], esi
mov ebp, dword [esp + 0x128]
xor esi, esi
lea ebx, [esp + 0xc0]
mov dword [esp + 0x44], edx
nop
mov edx, ebp
xor eax, eax
mov dword [esp + 0x34], esi
mov ecx, dword [ebx + eax*4]
mov si, word [edx]
mov word [ecx], si
add ecx, 2
mov dword [ebx + eax*4], ecx
add edx, 2
inc eax
cmp edi, eax
jg 0x6a4ce774
mov esi, dword [esp + 0x34]
inc esi
add ebp, dword [esp + 0x38]
cmp esi, dword [esp + 0x12c]
jne 0x6a4ce76c
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x12c]
add ebx, dword [edx + 0x24]
mov dword [esp + 0x3c], ebx
mov esi, dword [esp + 0x40]
test esi, esi
jle 0x6a4ceb1b
xor ebx, ebx
lea ebp, [esp + 0xe0]
lea esi, [esp + 0x80]
mov dword [esp + 0x34], esi
mov eax, dword [esp + 0x40]
mov ecx, ebp
mov ebp, ebx
mov ebx, edx
mov edx, ecx
nop
inc ebp
mov edi, dword [esp + 0x34]
mov esi, dword [edi + ebp*4 - 4]
cmp eax, ebp
sete al
movzx eax, al
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x10], ecx
lea edi, [esp + 0x6c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov eax, dword [edx + ebp*4 - 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
mov dword [esp + 0x2c], edx
call sym.avcodec_54.dll_av_resample
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x3c]
sub eax, dword [esp + 0x6c]
mov dword [ebx + 0x24], eax
shl eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebx + ebp*4]
mov dword [esp], eax
call sub.avutil_52.dll_av_realloc
mov dword [ebx + ebp*4], eax
mov ecx, dword [ebx + 0x24]
shl ecx, 1
mov edi, dword [esp + 0x6c]
lea esi, [esi + edi*2]
mov edi, eax
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x34]
cmp eax, ebp
mov edx, dword [esp + 0x2c]
jg 0x6a4ce7dc
mov edx, ebx
mov esi, dword [edx + 0x30]
mov eax, dword [edx + 0x2c]
cmp esi, 2
je 0x6a4ce9a3
cmp esi, 6
je 0x6a4cea13
cmp esi, eax
je 0x6a4ceaa0
cmp esi, 2
je 0x6a4ceadc
cmp dword [edx + 0x44], 1
je 0x6a4ce8fc
mov dword [esp + 0x70], 2
mov eax, dword [edx + 0x4c]
mov dword [esp + 0x74], eax
mov ebx, dword [esp + 0x124]
mov dword [esp + 0x78], ebx
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x7c], ebx
imul esi, dword [esp + 0x40]
mov dword [esp + 0x14], esi
lea eax, [esp + 0x70]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x78]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x74]
mov dword [esp + 8], eax
lea eax, [esp + 0x7c]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x3c]
mov dword [esp], eax
mov dword [esp + 0x2c], edx
call sym.avcodec_54.dll_av_audio_convert
test eax, eax
mov edx, dword [esp + 0x2c]
js 0x6a4ceaea
mov eax, dword [edx + 0x34]
test eax, eax
jle 0x6a4ce945
xor ebx, ebx
lea esi, [esp + 0x80]
mov dword [esp + 0x34], esi
lea edi, [esp + 0xa0]
mov dword [esp + 0x44], edi
mov esi, edx
mov edi, dword [esp + 0x34]
mov ebp, dword [esp + 0x44]
lea esi, [esi]
mov eax, dword [edi + ebx*4]
mov dword [esp], eax
call fcn.6a68be94
mov eax, dword [ebp + ebx*4]
mov dword [esp], eax
call fcn.6a68be94
inc ebx
cmp dword [esi + 0x34], ebx
jg 0x6a4ce928
mov eax, dword [esp + 0x40]
add esp, 0x10c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edx + 0x50]
jmp 0x6a4ce539
mov eax, dword [edx + 0x30]
cmp eax, 1
je 0x6a4ced43
cmp edi, eax
jle 0x6a4ce71b
mov ebx, dword [esp + 0x124]
mov dword [esp + 0xe0], ebx
mov ecx, dword [esp + 0x12c]
shl ecx, 1
mov edi, dword [esp + 0xc0]
mov esi, dword [esp + 0x128]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [edx + 0x34]
mov dword [esp + 0x40], esi
jmp 0x6a4ce7a1
cmp eax, 1
je 0x6a4cec9d
cmp esi, eax
jne 0x6a4ce887
mov ecx, dword [esp + 0x40]
test ecx, ecx
jle 0x6a4ce890
lea eax, [esi + esi]
mov edi, dword [esp + 0x124]
xor ebp, ebp
mov dword [esp + 0x3c], edx
mov edx, eax
nop
test esi, esi
jle 0x6a4cea03
xor eax, eax
lea ebx, [esp + 0xe0]
mov dword [esp + 0x34], edx
lea esi, [esi]
mov ecx, dword [ebx + eax*4]
mov dx, word [ecx]
mov word [edi + eax*2], dx
add ecx, 2
mov dword [ebx + eax*4], ecx
inc eax
cmp eax, esi
jne 0x6a4ce9e8
mov edx, dword [esp + 0x34]
add edi, edx
inc ebp
cmp ebp, dword [esp + 0x40]
jne 0x6a4ce9d4
mov edx, dword [esp + 0x3c]
jmp 0x6a4ce890
cmp eax, 2
jne 0x6a4ce9ac
mov edi, dword [esp + 0xe4]
mov eax, dword [esp + 0xe0]
mov dword [esp + 0x34], eax
mov ebx, dword [esp + 0x40]
test ebx, ebx
jle 0x6a4ce890
mov ebp, dword [esp + 0x124]
xor eax, eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x34]
mov bx, word [edx + eax*2]
mov dx, word [edi + eax*2]
mov word [ebp], bx
mov ecx, edx
shr cx, 0xf
add ecx, edx
sar cx, 1
mov esi, ebx
shr si, 0xf
add ebx, esi
sar bx, 1
add ecx, ebx
mov word [ebp + 2], cx
mov word [ebp + 4], dx
mov word [ebp + 6], 0
mov word [ebp + 8], 0
mov word [ebp + 0xa], 0
add ebp, 0xc
inc eax
cmp eax, dword [esp + 0x40]
jne 0x6a4cea47
mov esi, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
jmp 0x6a4ce890
cmp esi, 1
jle 0x6a4ce887
mov ecx, dword [esp + 0x40]
test ecx, ecx
jg 0x6a4ce9c0
jmp 0x6a4ce890
cmp ecx, 2
je 0x6a4ceb68
cmp ecx, 5
jg 0x6a4ce71b
jmp 0x6a4ce970
mov eax, dword [edx + 0x54]
jmp 0x6a4ce636
cmp eax, 6
jne 0x6a4ce890
jmp 0x6a4ce9b4
mov dword [esp + 8], str.Audio_sample_format_conversion_failed_n
mov dword [esp + 4], 0x10
mov eax, dword [edx]
mov dword [esp], eax
call sub.avutil_52.dll_av_log
mov dword [esp + 0x40], 0
mov eax, dword [esp + 0x40]
add esp, 0x10c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x40], 0
jmp 0x6a4ce867
mov eax, dword [esp + 0xa0]
mov dword [esp + 0xe0], eax
mov ecx, dword [esp + 0x12c]
shl ecx, 1
mov edi, dword [esp + 0xc0]
mov esi, dword [esp + 0x128]
rep movsb byte es:[edi], byte [esi]
mov edi, dword [edx + 0x34]
mov dword [esp + 0x40], edi
jmp 0x6a4ce7a1
mov dword [esp + 0x38], 2
jmp 0x6a4ce756
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0xe0], ecx
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0xe4], ecx
mov ebx, dword [esp + 0x12c]
test ebx, ebx
jle 0x6a4cec94
mov ecx, dword [esp + 0xc4]
mov dword [esp + 0x38], ecx
mov ebp, dword [esp + 0xc0]
mov edi, ecx
mov ebx, dword [esp + 0x12c]
shl ebx, 1
mov dword [esp + 0x40], ebx
add ebx, ebp
mov dword [esp + 0x34], ebx
fld dword [0x6aba1a2c]
fnstcw word [esp + 0x5a]
mov cx, word [esp + 0x5a]
mov ch, 0xc
mov word [esp + 0x58], cx
mov dword [esp + 0x44], edx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x128]
mov cx, word [eax + 2]
mov bx, word [eax + 0xa]
fld xword [0x6aba1a20]
fimul word [eax + 4]
fld st(1)
fimul word [eax + 8]
fiadd word [eax]
fadd st(1)
fldcw word [esp + 0x58]
fistp dword [esp + 0x54]
fldcw word [esp + 0x5a]
mov edx, dword [esp + 0x54]
lea esi, [edx + 0x8000]
and esi, 0xffff0000
je 0x6a4cec20
sar edx, 0x1f
xor edx, 0x7fff
fld dword [0x6aba1a2c]
push ebx
fimul word [esp]
mov dword [esp], ecx
fiadd word [esp]
pop ecx
faddp st(1)
fldcw word [esp + 0x58]
fistp dword [esp + 0x54]
fldcw word [esp + 0x5a]
mov ecx, dword [esp + 0x54]
lea ebx, [ecx + 0x8000]
and ebx, 0xffff0000
je 0x6a4cec5a
sar ecx, 0x1f
xor ecx, 0x7fff
mov word [ebp], dx
mov word [edi], cx
add eax, 0xc
add ebp, 2
add edi, 2
cmp ebp, dword [esp + 0x34]
jne 0x6a4cebdf
fstp st(0)
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x4c]
mov dword [esp + 0xc0], ebp
mov ecx, dword [esp + 0x38]
add ecx, dword [esp + 0x40]
mov dword [esp + 0xc4], ecx
mov dword [esp + 0x40], eax
jmp 0x6a4ce7a1
mov eax, dword [esp + 0xe0]
cmp dword [esp + 0x40], 3
jle 0x6a4cee4b
mov ecx, dword [esp + 0x40]
sub ecx, 4
mov dword [esp + 0x3c], ecx
shr ecx, 2
mov dword [esp + 0x34], ecx
mov ebp, ecx
inc ebp
lea edi, [eax + ebp*8]
mov ecx, dword [esp + 0x124]
mov bx, word [eax]
mov word [ecx], bx
mov word [ecx + 2], bx
mov bx, word [eax + 2]
mov word [ecx + 4], bx
mov word [ecx + 6], bx
mov bx, word [eax + 4]
mov word [ecx + 8], bx
mov word [ecx + 0xa], bx
mov bx, word [eax + 6]
mov word [ecx + 0xc], bx
mov word [ecx + 0xe], bx
add ecx, 0x10
add eax, 8
cmp eax, edi
jne 0x6a4cecce
mov ecx, ebp
shl ecx, 4
add ecx, dword [esp + 0x124]
mov ebx, dword [esp + 0x34]
neg ebx
mov edi, dword [esp + 0x3c]
lea ebx, [edi + ebx*4]
test ebx, ebx
jle 0x6a4ce890
lea edi, [eax + ebx*2]
mov bx, word [eax]
mov word [ecx], bx
mov word [ecx + 2], bx
add ecx, 4
add eax, 2
cmp eax, edi
jne 0x6a4ced2a
jmp 0x6a4ce890
mov ebx, dword [esp + 0x124]
mov dword [esp + 0xe0], ebx
mov eax, dword [esp + 0xc0]
cmp dword [esp + 0x12c], 3
jle 0x6a4cee42
mov ebx, dword [esp + 0x12c]
sub ebx, 4
mov dword [esp + 0x38], ebx
shr ebx, 2
mov dword [esp + 0x34], ebx
mov ebp, ebx
inc ebp
lea edi, [eax + ebp*8]
mov ecx, dword [esp + 0x128]
movsx esi, word [ecx]
movsx ebx, word [ecx + 2]
add ebx, esi
sar ebx, 1
mov word [eax], bx
movsx esi, word [ecx + 4]
movsx ebx, word [ecx + 6]
add ebx, esi
sar ebx, 1
mov word [eax + 2], bx
movsx esi, word [ecx + 8]
movsx ebx, word [ecx + 0xa]
add ebx, esi
sar ebx, 1
mov word [eax + 4], bx
movsx esi, word [ecx + 0xc]
movsx ebx, word [ecx + 0xe]
add ebx, esi
sar ebx, 1
mov word [eax + 6], bx
add eax, 8
add ecx, 0x10
cmp eax, edi
jne 0x6a4ced88
shl ebp, 4
add dword [esp + 0x128], ebp
mov ecx, dword [esp + 0x34]
neg ecx
mov esi, dword [esp + 0x38]
lea ecx, [esi + ecx*4]
test ecx, ecx
jle 0x6a4ce7a1
lea esi, [eax + ecx*2]
mov ecx, dword [esp + 0x128]
movsx edi, word [ecx]
movsx ebx, word [ecx + 2]
add ebx, edi
sar ebx, 1
mov word [eax], bx
add eax, 2
add ecx, 4
cmp eax, esi
jne 0x6a4cedf9
jmp 0x6a4ce7a1
mov dword [esp + 8], str.Could_not_allocate_buffer_n
mov dword [esp + 4], 0x10
mov eax, dword [edx]
mov dword [esp], eax
call sub.avutil_52.dll_av_log
jmp 0x6a4ceb04
mov dword [esp + 8], str.Could_not_allocate_buffer_n
jmp 0x6a4ceaf2
mov ecx, dword [esp + 0x12c]
jmp 0x6a4cede7
mov ebx, dword [esp + 0x40]
mov ecx, dword [esp + 0x124]
jmp 0x6a4ced1f