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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
test eax, eax
jle 0x100105df
sub eax, 1
cmp eax, esi
cmovg eax, esi
mov dword [esp + 0x14], eax
test eax, eax
jle 0x1001056d
xor ebp, ebp
jmp 0x1001037f
lea eax, [ebx + 1]
mov ecx, dword [esp + 0x48]
mov dword [edi + 0xc], eax
movzx eax, byte [ebx]
mov byte [ecx + ebp], al
add ebp, 1
mov ebx, ebp
test al, al
je 0x100105d8
cmp dword [esp + 0x14], ebp
je 0x100104d8
mov ebx, dword [edi + 0xc]
mov eax, dword [edi + 0x10]
cmp ebx, eax
jb 0x10010358
mov edx, dword [edi + 0x3c]
mov ecx, 0x8000
mov esi, eax
test edx, edx
cmove edx, ecx
mov ecx, dword [edi + 4]
sub esi, ecx
mov dword [esp + 0x18], esi
mov ebx, dword [esp + 0x18]
mov esi, dword [edi + 8]
add edx, ebx
mov ebx, ecx
mov dword [esp + 0x1c], esi
cmp edx, esi
jg 0x100103c0
mov edx, dword [esp + 0x18]
mov ebx, eax
sub esi, edx
mov dword [esp + 0x1c], esi
mov edx, dword [edi + 0x18]
test edx, edx
je 0x10010530
mov esi, dword [edi + 0x30]
test esi, esi
jne 0x10010462
mov esi, dword [edi + 0x4c]
mov dword [esp + 0x18], esi
cmp ecx, ebx
jne 0x100103e9
test esi, esi
jne 0x10010540
mov esi, dword [edi + 0xc0]
test esi, esi
je 0x10010408
cmp esi, dword [edi + 8]
jge 0x10010408
mov eax, dword [esp + 0x1c]
cmp esi, eax
jle 0x10010560
lea esi, [esi]
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov eax, dword [edi + 0x14]
mov dword [esp], eax
call edx
mov ecx, eax
cmp eax, 0xdfb9b0bb
je 0x10010480
test eax, eax
js 0x100104bf
cdq
add dword [edi + 0x28], eax
adc dword [edi + 0x2c], edx
add ecx, ebx
add eax, dword [edi + 0xa8]
adc edx, dword [edi + 0xac]
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ecx
mov dword [edi + 0xa8], eax
mov dword [edi + 0xac], edx
mov dword [edi + 0x78], eax
mov dword [edi + 0x7c], edx
cmp ebx, ecx
jb 0x10010358
mov eax, dword [esp + 0x48]
mov byte [eax + ebp], 0
lea eax, [ebp + 1]
mov ebx, eax
add esp, 0x2c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [edi + 0xc]
mov ecx, dword [edi + 0x10]
mov dword [edi + 0x30], 1
jmp 0x1001045a
sub eax, esi
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [edi + 0x44]
mov dword [esp], eax
mov eax, dword [esp + 0x18]
call eax
mov ecx, dword [edi + 4]
mov edx, dword [edi + 0x18]
mov dword [edi + 0x44], eax
mov dword [edi + 0x48], ecx
test edx, edx
jne 0x100103e9
mov ecx, 0xffffffea
mov dword [edi + 0x34], ecx
mov ebx, dword [edi + 0xc]
mov dword [edi + 0x30], 1
mov ecx, dword [edi + 0x10]
jmp 0x1001045a
add dword [esp + 0x48], ebp
mov esi, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
mov byte [eax], 0
cmp esi, ebx
jle 0x10010558
mov edx, dword [edi + 0xc]
jmp 0x10010506
lea edx, [eax + 1]
add ebx, 1
mov dword [edi + 0xc], edx
cmp byte [eax], 0
je 0x1001046f
cmp esi, ebx
je 0x10010558
mov eax, edx
cmp edx, dword [edi + 0x10]
jb 0x100104f0
mov eax, edi
call fcn.1000a8a0
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 0x10]
jb 0x100104f0
add esp, 0x2c
add ebx, 1
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [edi + 0x30], 1
jmp 0x10010462
mov esi, dword [edi + 0x48]
cmp esi, eax
jb 0x10010490
mov dword [edi + 0x48], ecx
jmp 0x100103e9
mov ebx, esi
jmp 0x1001046f
cmp ebx, ecx
je 0x10010574
mov dword [esp + 0x1c], esi
jmp 0x10010408
xor ebx, ebx
jmp 0x100104e0
cmp ebx, dword [edi + 0xc]
je 0x10010564
mov dword [esp], esi
call sub.avutil_59.dll_av_malloc
mov ebx, eax
test eax, eax
je 0x100105e9
mov eax, dword [edi + 4]
mov dword [esp], eax
call fcn.1006c9b0
mov eax, dword [edi + 0x38]
mov dword [edi + 4], ebx
mov edx, ebx
mov dword [edi + 8], esi
mov dword [edi + 0xc0], esi
mov dword [edi + 0x70], ebx
mov dword [edi + 0xc], ebx
test eax, eax
je 0x100105b5
lea edx, [ebx + esi]
mov eax, 1
mov dword [edi + 0x10], edx
mov dword [edi + 0x38], eax
mov dword [esp + 0x1c], esi
mov edx, dword [edi + 0x18]
mov dword [edi + 0x48], ebx
test edx, edx
jne 0x10010408
jmp 0x100104ba
mov eax, ebp
jmp 0x1001046d
mov ebx, 0xffffffea
jmp 0x1001046f
mov dword [esp + 8], str.Failed_to_decrease_buffer_size_n
mov dword [esp + 4], 0x18
mov dword [esp], edi
call sub.avutil_59.dll_av_log
mov eax, dword [edi + 0xc0]
mov ebx, dword [edi + 4]
mov dword [esp + 0x1c], eax
jmp 0x100105bf