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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov ebx, dword [eax + 0x10]
mov edi, dword [eax + 0xc]
push 1
push 0
push 0
push ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], 0
call sym.avformat_58.dll_avio_seek
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [edi + 0x6c], 0
mov dword [ebp - 0x10], edx
jne 0x1012ce9a
mov esi, dword [edi + 0x24]
test esi, esi
je 0x1012ceb5
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
lea ecx, [eax + eax*2]
mov eax, esi
shl eax, 4
sub eax, esi
lea esi, [ecx*2 + 0x73]
add esi, eax
mov dword [ebp - 4], esi
je 0x1012ceb5
add esi, 0x14
mov ecx, 0x200
mov eax, esi
and eax, 0x1ff
sub ecx, eax
cmp ecx, 0x14
jae 0x1012ceaa
add ecx, 0x200
jmp 0x1012ceb0
cmp dword [ebp + 0x10], 0
je 0x1012ceb5
mov esi, 0x64
mov ecx, 0x19c
and ecx, 0x1ff
add esi, ecx
mov dword [ebp - 4], esi
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x1012cf13
mov ecx, eax
mov edx, 0x1022b904
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1012cf13
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1012cec8
mov eax, dword [edi + 0x3c]
lea esi, [edi + 0x38]
push 8
inc eax
push eax
push esi
call sub.avutil_56.dll_av_reallocp_array
add esp, 0xc
test eax, eax
jns 0x1012cefe
mov dword [edi + 0x3c], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x3c]
mov ecx, dword [esi]
mov edx, dword [ebp - 0x14]
mov dword [ecx + eax*8], edx
mov edx, dword [ebp - 0x10]
mov dword [ecx + eax*8 + 4], edx
inc dword [edi + 0x3c]
mov ecx, dword [ebp + 0x14]
mov eax, 0x1022b904
test ecx, ecx
push 0x10
cmovne eax, ecx
push eax
push ebx
call sym.avformat_58.dll_avio_write
mov esi, dword [edi + 0x10]
push 0x83
push ebx
call sym.avformat_58.dll_avio_w8
cmp esi, 1
lea eax, [esi + 1]
cmovle eax, esi
shl eax, 4
add eax, 0x58
push eax
push ebx
call sym.avformat_58.dll_avio_wb24
push 1
push ebx
call sym.avformat_58.dll_avio_wb16
push 3
push ebx
call sym.avformat_58.dll_avio_wb16
push 0x200
push ebx
call sym.avformat_58.dll_avio_wb32
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push ebx
call sym.avformat_58.dll_avio_wb64
mov eax, dword [ebp + 0x14]
add esp, 0x40
test eax, eax
je 0x1012cfe8
mov ecx, eax
mov edx, 0x1022b904
mov esi, 0xc
nop word [eax + eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1012cfb6
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1012cf90
mov ecx, dword [edi + 0x3c]
cmp ecx, 1
jbe 0x1012cfb6
mov eax, dword [edi + 0x38]
mov edx, dword [eax + ecx*8 - 0x10]
mov eax, dword [eax + ecx*8 - 0xc]
jmp 0x1012cff6
mov ecx, dword [ebp + 0x14]
mov edx, 0x1022b8a4
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1012cfe8
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1012cfc3
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x1012cfe8
mov eax, dword [edi + 0x38]
mov edx, dword [eax + ecx*8 - 8]
mov eax, dword [eax + ecx*8 - 4]
jmp 0x1012cff6
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
push eax
push edx
push ebx
call sym.avformat_58.dll_avio_wb64
push dword [edi + 0xc]
push dword [edi + 8]
push ebx
call sym.avformat_58.dll_avio_wb64
push 1
push 0
push 0
push ebx
call sym.avformat_58.dll_avio_seek
push 0
push 0
push ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], edx
call sym.avformat_58.dll_avio_wb64
mov esi, dword [ebp - 4]
push 0
push esi
push ebx
call sym.avformat_58.dll_avio_wb64
add esp, 0x40
xor eax, eax
test esi, esi
cmovne eax, dword [ebp + 0x10]
push eax
push ebx
call sym.avformat_58.dll_avio_wb32
mov esi, dword [ebp + 8]
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x1012d06d
cmp dword [edi + 0x24], 0
je 0x1012d06d
cmp dword [edi + 0x3c], 0
je 0x1012d06d
cmp dword [esi + 8], 0x1025ffc8
je 0x1012d06d
mov eax, dword [edi + 0x78]
mov ecx, dword [edi + 0x7c]
jmp 0x1012d07b
xorps xmm0, xmm0
movlpd qword [ebp - 8], xmm0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 8]
push ecx
push eax
push ebx
call sym.avformat_58.dll_avio_wb64
push dword [ebp + 0xc]
push ebx
call sym.avformat_58.dll_avio_wb32
cmp dword [esi + 8], 0x1025ffc8
mov ecx, 0x1022b894
mov eax, 0x1022b884
push 0x10
cmove eax, ecx
push eax
push ebx
call sym.avformat_58.dll_avio_write
push esi
call fcn.1012a980
add esp, 0x24
cmp dword [ebp + 0x18], 0
je 0x1012d14c
push esi
call fcn.1012bcf0
push 1
push 0
push 0
push dword [esi + 0x10]
call sym.avformat_58.dll_avio_seek
push esi
mov dword [ebp + 8], eax
call fcn.1012d440
push esi
call fcn.1012bcf0
push esi
call fcn.1012adf0
push 1
push 0
push 0
push dword [esi + 0x10]
call sym.avformat_58.dll_avio_seek
push 0
push dword [ebp - 0x14]
mov ebx, eax
mov esi, 0x200
push dword [ebp - 0x10]
mov ecx, ebx
mov edi, edx
push dword [ebp - 0xc]
and ecx, 0x1ff
sub esi, ecx
call sym.avformat_58.dll_avio_seek
add esp, 0x40
lea ecx, [esi + 0x200]
mov eax, esi
and eax, 0x1ff
cmp esi, 0x14
cmovae ecx, eax
sub ecx, dword [ebp + 8]
add ecx, ebx
push 0
push ecx
push dword [ebp - 0xc]
call sym.avformat_58.dll_avio_wb64
push 0
push edi
push ebx
mov ebx, dword [ebp - 0xc]
push ebx
call sym.avformat_58.dll_avio_seek
add esp, 0x1c
cmp dword [ebp + 0x14], 0
je 0x1012d164
push 5
push connect
push 0
push ebx
call sym.avformat_58.dll_avio_write_marker
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret