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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor eax, eax
push edi
mov dword [ebp - 0x10], eax
cmp dword [esi + 0x10], eax
jle 0x10060421
mov edx, dword [ebp + 0x10]
xor ecx, ecx
mov edi, dword [ebp + 8]
mov dword [ebp - 0x14], ecx
mov ebx, dword [esi + 0x30]
add ebx, ecx
test edx, edx
js 0x100601a6
cmp eax, edx
jne 0x1006040b
cmp dword [ebx + 4], 0
je 0x1006040b
inc dword [ebx + 0x148]
mov eax, dword [ebx + 0x148]
cmp eax, dword [ebx + 0x150]
jb 0x100601ed
add eax, 0x40
push 0x28
push eax
mov dword [ebp - 0xc], eax
lea eax, [ebx + 0x14c]
push eax
call sub.libavutil_56.dll_av_reallocp_array
add esp, 0xc
test eax, eax
jne 0x1006042a
mov eax, dword [ebp - 0xc]
mov dword [ebx + 0x150], eax
mov eax, dword [ebx + 0x148]
push 1
push 0
push 0
lea ecx, [eax + eax*4]
mov eax, dword [ebx + 0x14c]
push edi
lea eax, [eax + ecx*8]
add eax, 0xffffffd8
mov dword [ebp - 8], eax
call sym.libavformat_58.dll_avio_seek
mov ecx, dword [ebp - 8]
add esp, 0x10
mov dword [ecx], eax
mov eax, dword [ebp + 0x14]
mov dword [ecx + 4], edx
mov dword [ecx + 0x20], eax
mov eax, dword [ebx + 0x60]
mov eax, dword [eax + 0x28]
cdq
add eax, dword [ebx + 0x138]
adc edx, dword [ebx + 0x13c]
add eax, dword [ebx + 0x78]
mov dword [ebp - 0xc], eax
adc edx, dword [ebx + 0x7c]
mov dword [ecx + 0xc], edx
mov dword [ecx + 8], eax
mov ecx, dword [ebx + 0x60]
mov esi, dword [ebx + 0x88]
mov dword [ebp - 0x18], edx
mov eax, dword [ecx + 0x28]
cdq
sub esi, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], esi
mov esi, dword [ebx + 0x8c]
sbb esi, edx
mov edx, dword [ebp - 4]
sub edx, dword [ecx + 8]
mov dword [ebp - 4], edx
sbb esi, dword [ecx + 0xc]
mov dword [eax + 0x10], edx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], esi
mov dword [eax + 0x14], esi
mov esi, dword [ebp + 0xc]
test edx, edx
jg 0x100602a6
mov ecx, dword [ebp - 0xc]
jl 0x1006028c
test ecx, ecx
jae 0x100602a6
add ecx, dword [ebp - 4]
mov dword [eax + 0x10], ecx
adc edx, dword [ebp - 0x1c]
mov dword [eax + 0x14], edx
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
push 1
push 0
push 0
push edi
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], 0
call sym.libavformat_58.dll_avio_seek
mov esi, dword [esi + 0x5c]
mov ecx, edx
xor edx, edx
mov dword [ebp - 0x1c], eax
add esp, 0x10
mov dword [ebp - 0x18], ecx
mov dword [ebp - 8], edx
test esi, esi
jle 0x100603f2
nop dword [eax + eax]
mov eax, dword [ebx + 0x148]
mov ecx, eax
sub ecx, edx
sub ecx, 2
sub eax, ecx
dec eax
mov dword [ebp - 4], eax
test ecx, ecx
js 0x100603e0
mov eax, dword [ebx + 0x14c]
lea esi, [ecx + ecx*4]
shl esi, 3
push 0
push dword [esi + eax + 0x1c]
push dword [esi + eax + 0x18]
push edi
call sym.libavformat_58.dll_avio_seek
mov eax, dword [ebp - 4]
shl eax, 4
add eax, 0x1d
push eax
push edi
call sym.libavformat_58.dll_avio_wb32
push 0x64697575
push edi
call sym.libavformat_58.dll_avio_wl32
push 0x10
push 0x10143edc
push edi
call sym.libavformat_58.dll_avio_write
push 1
push edi
call sym.libavformat_58.dll_avio_w8
push 0
push edi
call sym.libavformat_58.dll_avio_wb24
push dword [ebp - 4]
push edi
call sym.libavformat_58.dll_avio_w8
mov eax, dword [ebp - 4]
add esp, 0x44
test eax, eax
jle 0x100603a7
mov dword [ebp - 0xc], eax
nop word [eax + eax]
mov eax, dword [ebx + 0x14c]
push dword [esi + eax + 0x34]
push dword [esi + eax + 0x30]
push edi
call sym.libavformat_58.dll_avio_wb64
mov eax, dword [ebx + 0x14c]
push dword [esi + eax + 0x3c]
push dword [esi + eax + 0x38]
push edi
call sym.libavformat_58.dll_avio_wb64
add esp, 0x18
lea esi, [esi + 0x28]
sub dword [ebp - 0xc], 1
jne 0x10060370
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov esi, dword [ecx + 0x5c]
cmp eax, esi
jge 0x100603dd
sub esi, eax
shl esi, 4
push esi
push edi
call sym.libavformat_58.dll_avio_wb32
push 0x65657266
push edi
call sym.libavformat_58.dll_avio_wl32
lea eax, [esi - 8]
push eax
push 0
push edi
call fcn.10001221
mov eax, dword [ebp + 0xc]
add esp, 0x1c
mov esi, dword [eax + 0x5c]
mov edx, dword [ebp - 8]
inc edx
mov dword [ebp - 8], edx
cmp edx, esi
jl 0x100602e0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
push 0
push ecx
push eax
push edi
call sym.libavformat_58.dll_avio_seek
mov esi, dword [ebp + 0xc]
add esp, 0x10
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 0x10]
inc eax
add ecx, 0x5a8
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
cmp eax, dword [esi + 0x10]
jl 0x10060195
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xfffffff4
pop ebx
mov esp, ebp
pop ebp
ret