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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x40
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov eax, dword [esi]
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x34]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0x18]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], edx
test eax, eax
mov dword [esp + 0x38], eax
sete al
movzx eax, al
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
mov eax, dword [ebx + 0x40]
mov edi, dword [eax + 0x2c]
test edi, edi
je 0x6faf6199
test byte [ebx + 0x330], 1
jne 0x6faf62f0
test byte [ebx + 0x59], 2
je 0x6faf61ac
mov eax, dword [ebx + 0x29c]
test eax, eax
je 0x6faf61ac
mov byte [eax], 0
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x6faf61c0
mov eax, dword [ebx + 0xc]
test byte [eax + 0x10], 0x20
je 0x6faf63a0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov eax, dword [ebx + 0x7c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call sub.avutil_54.dll_av_image_check_size
test eax, eax
jne 0x6faf63d0
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 0x54]
test eax, eax
je 0x6faf63f7
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 8], ecx
call eax
test eax, eax
mov edi, eax
jg 0x6faf6430
mov eax, dword [esi + 0x18]
test eax, eax
je 0x6faf6228
mov edx, dword [ebx + 0x40]
cmp eax, dword [edx + 0x24]
je 0x6faf6320
test edi, edi
jne 0x6faf62d0
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
test eax, eax
je 0x6faf62e3
mov eax, dword [ebx + 0xc]
test byte [eax + 0x10], 0x20
jne 0x6faf6261
mov eax, dword [ebp + 0x10]
mov edx, dword [eax + 0x8c]
mov eax, dword [eax + 0x88]
mov dword [esi + 0x14], edx
mov dword [esi + 0x10], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], edx
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x6faf6294
mov edx, dword [esi + 0x18]
test edx, edx
je 0x6faf6294
mov eax, dword [esi + 0x1c]
mov dword [esp], esi
add eax, 0x20
mov dword [esp + 4], eax
call sub.avutil_54.dll_av_buffer_realloc
test eax, eax
mov edi, eax
js 0x6faf63c0
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov dword [esi + 0x18], eax
mov eax, dword [ebp + 0x14]
add dword [ebx + 0x1ac], 1
mov eax, dword [eax]
test eax, eax
je 0x6faf62d0
mov dword [esp], esi
call sym.avcodec_56.dll_av_packet_merge_side_data
call sub.avutil_54.dll_av_get_cpu_flags
test al, 1
je 0x6faf62b7
emms
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, 0xfffffff4
lea esi, [esi]
lea edi, [edi]
mov dword [esp], esi
call sym.avcodec_56.dll_av_free_packet
call sub.avutil_54.dll_av_get_cpu_flags
test al, 1
je 0x6faf62b7
jmp 0x6faf62b5
mov dword [esi + 0x1c], 0
jmp 0x6faf6261
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
call fcn.6f7a98e0
lea esp, [ebp - 0xc]
mov edi, eax
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x38]
test edx, edx
je 0x6faf63da
mov edx, dword [esi + 0x1c]
cmp edx, dword [esp + 0x34]
jle 0x6faf6380
mov dword [esp + 0xc], edx
mov dword [esp + 8], str.Provided_packet_is_too_small__needs_to_be__d_n
mov edi, 0xffffffff
mov dword [esp + 4], 0x10
mov dword [esp], ebx
call sub.avutil_54.dll_av_log
mov eax, dword [esp + 0x34]
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x3c], 0
mov dword [esi], eax
mov eax, dword [esp + 0x38]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x34], eax
jmp 0x6faf6228
mov dword [esp + 4], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
jmp 0x6faf635d
mov dword [esp], esi
xor edi, edi
call sym.avcodec_56.dll_av_free_packet
mov dword [esp], esi
call sym.avcodec_56.dll_av_init_packet
mov dword [esi + 0x1c], 0
jmp 0x6faf62b7
add dword [ebx + 0x1ac], 1
jmp 0x6faf62d0
mov edi, 0xffffffea
jmp 0x6faf62b7
mov dword [esp], esi
call sym.avcodec_56.dll_av_dup_packet
test eax, eax
js 0x6faf62c1
mov dword [esp + 0x3c], 0
jmp 0x6faf6228
mov dword [esp + 0x14], 0x82b
mov dword [esp + 0x10], 0x7063e200
mov dword [esp + 0xc], str.avctx__codec__encode2
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
mov dword [esp + 0x14], 0x82e
mov dword [esp + 0x10], 0x7063e200
mov dword [esp + 0xc], str.ret___0
jmp 0x6faf640f