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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x74
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi + 0x3e30]
mov eax, dword [edi + 0xe0]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
xor ebx, ebx
fild dword [esi + 0x1d0]
mov dword [esp + 0x64], ebx
fld qword [0x57bed0]
fmul st(1), st(0)
fxch st(1)
fmul st(2)
fdiv qword [edi + 0x10]
call fcn.004a3f16
fld dword [esi + 0x20c]
fst qword [esp + 0x48]
mov dword [esp + 0x50], eax
fld dword [esi + 0x210]
mov dword [esp + 0x54], edx
fxch st(1)
fmul qword [0x57b358]
call fcn.004a3ee0
or eax, 1
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
jle 0x4c955b
mov ecx, dword [edi + 0xe4]
mov edx, dword [edi + 0xe0]
add ecx, 0x14
mov dword [esp + 0x28], edx
mov eax, dword [ecx]
cdq
add ebx, eax
mov eax, dword [esp + 0x64]
adc eax, edx
add ecx, 0x48
sub dword [esp + 0x28], 1
mov dword [esp + 0x64], eax
jne 0x4c94dc
cmp dword [esp + 0x54], eax
ja 0x4c955b
jb 0x4c9503
cmp dword [esp + 0x50], ebx
jae 0x4c955b
fstp st(0)
mov ecx, eax
and eax, 0x7fffffff
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], ebx
fild qword [esp + 0x60]
and ecx, 0x80000000
mov dword [esp + 0x64], ecx
mov dword [esp + 0x60], 0
fild qword [esp + 0x60]
fchs
faddp st(1)
fmul qword [edi + 0x10]
fxch st(2)
fmulp st(1)
fdivp st(1)
call fcn.004a3ee0
push eax
push 0x57e508
push 0
push esi
call fcn.004c44b0
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x14], 0
fstp st(2)
fstp st(0)
mov dword [esp + 0xc], 0
fldz
fld1
jle 0x4c9761
fxch st(2)
mov dword [esp + 0x14], 0
fadd st(0), st(0)
fstp qword [esp + 0x60]
jmp 0x4c958a
fldz
mov eax, dword [edi + 0xe4]
fst qword [esp + 0x20]
mov ecx, dword [esp + 0x14]
fstp qword [esp + 0x28]
add eax, ecx
fst qword [esp + 0x40]
mov dword [esp + 0x18], eax
fld qword [esp + 0x60]
mov ebx, 1
fst qword [esp + 0x70]
fcompp
fnstsw ax
test ah, 0x41
jne 0x4c966f
mov eax, dword [edi + 0xe0]
sub eax, dword [esp + 0xc]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x3c], eax
add esi, 0x48
cmp ebx, dword [esp + 0x3c]
jge 0x4c966f
fild dword [esi + 0x30]
fidiv dword [edi + 0x28]
fld qword [0x5a3950]
call fcn.00567b80
fld1
fsubrp st(1)
fmul qword [esp + 0x40]
fst qword [esp + 0x40]
fcomp qword [0x57e500]
fnstsw ax
test ah, 5
jnp 0x4c966f
mov edx, ebx
imul edx, ebx
neg edx
mov dword [esp + 0x30], edx
fild dword [esp + 0x30]
fdiv qword [0x57e4f8]
call fcn.0056846c
fmul qword [esp + 0x40]
sub esp, 8
fst qword [esp + 0x38]
fadd qword [esp + 0x28]
fstp qword [esp + 0x28]
fld1
fstp qword [esp]
call fcn.004c6ef0
fisub dword [esi + 0x14]
add ebx, 1
mov dword [esp + 0x24], ebx
add esp, 8
add esi, 0x48
fmul qword [esp + 0x30]
fadd qword [esp + 0x28]
fstp qword [esp + 0x28]
fild dword [esp + 0x1c]
fcomp qword [esp + 0x70]
fnstsw ax
test ah, 5
jnp 0x4c95d5
fld1
xor ebx, ebx
fst qword [esp + 0x40]
fld qword [esp + 0x60]
fst qword [esp + 0x70]
fcomp qword [0x5798b0]
fnstsw ax
test ah, 1
jne 0x4c9734
mov esi, dword [esp + 0x18]
cmp ebx, dword [esp + 0xc]
jg 0x4c9734
mov eax, ebx
fstp st(0)
imul eax, ebx
neg eax
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fdiv qword [0x57e4f8]
call fcn.0056846c
fmul qword [esp + 0x40]
sub esp, 8
fst qword [esp + 0x38]
fadd qword [esp + 0x28]
fstp qword [esp + 0x28]
fld1
fstp qword [esp]
call fcn.004c6ef0
fisub dword [esi + 0x14]
add esp, 8
fmul qword [esp + 0x30]
fadd qword [esp + 0x28]
fstp qword [esp + 0x28]
fild dword [esi + 0x30]
fidiv dword [edi + 0x28]
fld qword [0x5a3950]
call fcn.00567b80
fld1
fld st(0)
fsubrp st(2)
fxch st(1)
fmul qword [esp + 0x40]
fst qword [esp + 0x40]
fcomp qword [0x57e500]
fnstsw ax
test ah, 5
jnp 0x4c9734
add ebx, 1
mov dword [esp + 0x1c], ebx
fild dword [esp + 0x1c]
sub esi, 0x48
fcomp qword [esp + 0x70]
fnstsw ax
test ah, 0x41
jnp 0x4c9694
fld qword [esp + 0x28]
mov eax, dword [esp + 0xc]
fdiv qword [esp + 0x20]
mov ecx, dword [esp + 0x18]
add dword [esp + 0x14], 0x48
add eax, 1
mov dword [esp + 0xc], eax
fstp dword [ecx + 0x3c]
cmp eax, dword [edi + 0xe0]
jl 0x4c9588
jmp 0x4c9765
fstp st(1)
fstp st(0)
mov edx, dword [edi + 0xe0]
fstp st(0)
add edx, edx
add edx, edx
add edx, edx
push edx
call fcn.004c45f0
add esp, 4
cmp dword [esp + 0x10], 1
mov dword [esp + 0x14], eax
jle 0x4c979c
mov eax, dword [edi + 0xe0]
add eax, eax
add eax, eax
add eax, eax
push eax
call fcn.004c45f0
add esp, 4
cmp dword [edi + 0xe0], 0
fld1
fst qword [esp + 0x40]
mov dword [esp + 0x1c], eax
mov dword [esp + 0xc], 0
jle 0x4c9819
mov dword [esp + 0x18], 0
nop
mov esi, dword [edi + 0xe4]
fstp st(0)
mov edx, dword [esp + 0x18]
fld1
mov ebx, dword [ebp + 8]
sub esp, 8
lea eax, [esi + edx]
fstp qword [esp]
mov edx, dword [esp + 0x14]
push eax
call fcn.004c7ba0
fstp qword [esp + 4]
mov ecx, dword [esp + 0x24]
add esp, 4
add esi, ecx
call fcn.004c6ef0
fadd qword [esp + 0x48]
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], 0x48
add eax, 1
fst qword [esp + 0x48]
add esp, 8
cmp eax, dword [edi + 0xe0]
mov dword [esp + 0xc], eax
jl 0x4c97c0
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
mov ecx, eax
and eax, 0x7fffffff
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], edx
fild qword [esp + 0x60]
and ecx, 0x80000000
mov dword [esp + 0x64], ecx
mov dword [esp + 0x60], 0
fild qword [esp + 0x60]
fchs
faddp st(1)
fst qword [esp + 0x50]
fdivrp st(1)
fldz
fld st(0)
fld st(2)
fmul qword [0x57e4f0]
fst qword [esp + 0x60]
fxch st(3)
fmul qword [0x57e4e8]
fst qword [esp + 0x78]
fcomp st(3)
fnstsw ax
test ah, 5
jp 0x4c9bda
fld qword [esp + 0x48]
jmp 0x4c9885
fxch st(3)
fxch st(2)
xor esi, esi
cmp dword [edi + 0xe0], esi
fst qword [esp + 0x40]
fxch st(3)
mov dword [edi + 0x118], 0xffffffff
faddp st(1)
fstp qword [esp + 0x58]
fld1
fstp qword [edi + 0x130]
fxch st(1)
fst qword [edi + 0x128]
jle 0x4c98fe
mov ebx, dword [ebp + 8]
fstp st(1)
fstp st(0)
mov dword [esp + 0x18], esi
mov eax, dword [edi + 0xe4]
fld qword [esp + 0x58]
add eax, dword [esp + 0x18]
sub esp, 8
fstp qword [esp]
push eax
mov edx, esi
call fcn.004c7ba0
mov ecx, dword [esp + 0x20]
add dword [esp + 0x24], 0x48
fstp qword [ecx + esi*8]
add esi, 1
add esp, 0xc
cmp esi, dword [edi + 0xe0]
jl 0x4c98c2
fld qword [esp + 0x48]
fldz
mov esi, dword [edi + 0xe0]
sub esi, 1
js 0x4c9977
lea ebx, [esi + esi*8]
fstp st(1)
add ebx, ebx
add ebx, ebx
add ebx, ebx
mov edx, dword [esp + 0x14]
fstp st(0)
mov eax, dword [edi + 0xe4]
fld qword [edx + esi*8]
mov ecx, dword [ebp + 8]
sub esp, 8
fstp qword [esp]
add eax, ebx
push eax
push ecx
call fcn.004c7c80
mov edx, dword [esp + 0x24]
fst qword [edx + esi*8]
add esp, 0x10
fldz
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jnp 0x4c9967
push 0x74f
fstp st(0)
push str.....encoder_ratecontrol.c
push str.qscale_i____0
call fcn.0049ea71
fldz
add esp, 0xc
sub esi, 1
sub ebx, 0x48
test esi, esi
jge 0x4c9914
fld qword [esp + 0x48]
fxch st(1)
cmp dword [esp + 0x10], 1
jle 0x4c9af3
mov eax, dword [esp + 0x10]
and eax, reloc.intf.dll_Ordinal_1
jns 0x4c9992
dec eax
or eax, 0xfffffffe
inc eax
cmp eax, 1
je 0x4c99b8
push 0x755
fstp st(1)
push str.....encoder_ratecontrol.c
fstp st(0)
push str.filter_size_21
call fcn.0049ea71
fld qword [esp + 0x54]
fldz
add esp, 0xc
cmp dword [edi + 0xe0], 0
mov dword [esp + 0xc], 0
jle 0x4c9af3
mov dword [esp + 0x28], 0
cmp dword [esp + 0x10], 0
fld st(0)
fst qword [esp + 0x68]
fld st(1)
fst qword [esp + 0x70]
jle 0x4c9acd
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov eax, esi
cdq
sub eax, edx
sar eax, 1
sub ecx, eax
mov eax, esi
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
mov esi, eax
lea eax, [edx + ecx*8]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0xe4]
mov ebx, ecx
lea ecx, [ecx + ecx*8]
lea edx, [eax + ecx*8]
mov eax, dword [esp + 0x10]
neg esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x3c], eax
fild dword [esp + 0x30]
fld st(3)
fucomp st(5)
fnstsw ax
test ah, 0x44
jp 0x4c9a46
fstp st(0)
fld1
jmp 0x4c9a71
fstp st(2)
fstp st(0)
fstp st(1)
fmul st(0), st(0)
fld st(1)
fmulp st(2)
fdivrp st(1)
fchs
call fcn.0056846c
fldz
fld qword [esp + 0x70]
fld qword [esp + 0x68]
fld qword [esp + 0x48]
fxch st(4)
fxch st(1)
fxch st(2)
fxch st(1)
test ebx, ebx
jl 0x4c9aac
cmp ebx, dword [edi + 0xe0]
jge 0x4c9aac
mov eax, dword [edi + 0xe4]
mov ecx, dword [esp + 0x28]
mov edx, dword [eax + ecx]
mov eax, dword [esp + 0x18]
cmp edx, dword [eax]
jne 0x4c9aac
mov ecx, dword [esp + 0x20]
fld qword [ecx]
fmul st(1)
faddp st(3)
fxch st(2)
fst qword [esp + 0x68]
fxch st(2)
faddp st(1)
fst qword [esp + 0x70]
jmp 0x4c9aae
fstp st(0)
add dword [esp + 0x18], 0x48
add dword [esp + 0x20], 8
add esi, 1
add ebx, 1
sub dword [esp + 0x3c], 1
mov dword [esp + 0x30], esi
jne 0x4c9a31
fdivp st(1)
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
add dword [esp + 0x28], 0x48
add eax, 1
mov dword [esp + 0xc], eax
fstp qword [edx + eax*8 - 8]
cmp eax, dword [edi + 0xe0]
jl 0x4c99d5
xor eax, eax
cmp dword [edi + 0xe0], eax
mov dword [esp + 0xc], eax
jle 0x4c9ba2
fstp st(1)
mov dword [esp + 0x28], eax
fstp st(0)
lea ecx, [ecx]
mov ebx, dword [edi + 0xe4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
add ebx, dword [esp + 0x28]
fld qword [eax + ecx*8]
mov esi, dword [ebp + 8]
mov eax, dword [ebx]
sub esp, 8
fstp qword [esp]
call fcn.004c8120
fstp dword [esp + 0x44]
add esp, 8
fld dword [esp + 0x3c]
fst dword [ebx + 0x28]
fldz
fcompp
fnstsw ax
test ah, 0x41
jnp 0x4c9b65
push 0x771
push str.....encoder_ratecontrol.c
push str.rce__new_qscale___0
call fcn.0049ea71
add esp, 0xc
fld dword [ebx + 0x28]
sub esp, 8
mov esi, ebx
fstp qword [esp]
call fcn.004c6ef0
fadd qword [esp + 0x48]
mov eax, dword [esp + 0x14]
add dword [esp + 0x30], 0x48
add eax, 1
fstp qword [esp + 0x48]
add esp, 8
cmp eax, dword [edi + 0xe0]
mov dword [esp + 0xc], eax
jl 0x4c9b10
fld qword [esp + 0x48]
fldz
fld qword [esp + 0x50]
fcomp qword [esp + 0x40]
fnstsw ax
fld qword [esp + 0x58]
test ah, 5
jp 0x4c9bb9
fsub qword [esp + 0x60]
fld qword [esp + 0x60]
fmul qword [0x5a3860]
fst qword [esp + 0x60]
fld qword [esp + 0x78]
fcomp st(1)
fnstsw ax
test ah, 5
jnp 0x4c9883
fstp st(3)
mov edx, dword [esp + 0x14]
fstp st(2)
fstp st(1)
push edx
fstp st(0)
call fcn.004c4620
add esp, 4
cmp dword [esp + 0x10], 1
jle 0x4c9c01
mov eax, dword [esp + 0x1c]
push eax
call fcn.004c4620
add esp, 4
cmp dword [edi + 8], 0
je 0x4c9c0f
mov esi, dword [ebp + 8]
call fcn.004c91a0
mov esi, dword [ebp + 8]
mov eax, esi
call fcn.004c9130
fst qword [esp + 0x40]
fdiv qword [esp + 0x50]
fsub qword [0x577fa0]
fabs
fcomp qword [0x57e438]
fnstsw ax
test ah, 0x41
jne 0x4c9dd8
mov eax, dword [edi + 0xe0]
fldz
test eax, eax
mov dword [esp + 0x14], eax
jle 0x4c9c63
mov eax, dword [edi + 0xe4]
mov ecx, dword [edi + 0xe0]
add eax, 0x28
fadd dword [eax]
add eax, 0x48
sub ecx, 1
jne 0x4c9c59
fidiv dword [esp + 0x14]
fdiv qword [0x577fb0]
call fcn.00567f60
fmul qword [0x57ae78]
fstp qword [esp + 0x78]
fld qword [0x5a3950]
call fcn.00567f60
fdivr qword [esp + 0x78]
fadd qword [0x5a3938]
fstp qword [esp + 0x60]
fld qword [esp + 0x50]
fcomp qword [esp + 0x40]
fnstsw ax
test ah, 5
jnp 0x4c9caa
cmp dword [edi + 8], 0
jne 0x4c9cba
push str.Error:_2pass_curve_failed_to_converge_n
push 1
push esi
call fcn.004c44b0
add esp, 0xc
fld qword [esp + 0x60]
sub esp, 0x18
fstp qword [esp + 0x10]
fld qword [edi + 0x10]
fmul qword [esp + 0x58]
fild dword [edi + 0xe0]
fmul qword [0x57bed0]
fdivp st(1)
fstp qword [esp + 8]
fild dword [esi + 0x1d0]
fstp qword [esp]
push str.target:__.2f_kbit_s__expected:__.2f_kbit_s__avg_QP:__.4f_n
push 1
push esi
call fcn.004c44b0
fld qword [esp + 0x74]
fld qword [esp + 0x64]
add esp, 0x24
fcom st(1)
fnstsw ax
test ah, 5
jp 0x4c9d5f
mov ecx, dword [esi + 0x1c4]
lea edx, [ecx + 2]
mov dword [esp + 0x3c], edx
fild dword [esp + 0x3c]
fcomp qword [esp + 0x60]
fnstsw ax
test ah, 0x41
jne 0x4c9d5f
test ecx, ecx
fstp st(0)
fstp st(0)
jle 0x4c9d46
push ecx
push str.try_reducing_target_bitrate_or_reducing_qp_min__currently__d__n
push 1
push esi
call fcn.004c44b0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.try_reducing_target_bitrate_n
push 1
push esi
call fcn.004c44b0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fcompp
fnstsw ax
test ah, 0x41
jne 0x4c9dbc
mov ecx, dword [esi + 0x1c8]
lea eax, [ecx - 2]
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fcomp qword [esp + 0x60]
fnstsw ax
test ah, 5
jp 0x4c9dbc
cmp ecx, 0x33
jge 0x4c9da3
push ecx
push str.try_increasing_target_bitrate_or_increasing_qp_max__currently__d__n
push 1
push esi
call fcn.004c44b0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.try_increasing_target_bitrate_n
push 1
push esi
call fcn.004c44b0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 4], 0
je 0x4c9dc8
cmp dword [edi + 8], 0
jne 0x4c9dd8
push 0x57e300
push 1
push esi
call fcn.004c44b0
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret