Function at 0x573840
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 [0x5e6038]
fmul st(1), st(0)
fxch st(1)
fmul st(2)
fdiv qword [edi + 0x10]
call fcn.004fb9a6
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 [0x5e54c8]
call fcn.004fb970
or eax, 1
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
jle 0x57394b
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 0x5738cc
cmp dword [esp + 0x54], eax
ja 0x57394b
jb 0x5738f3
cmp dword [esp + 0x50], ebx
jae 0x57394b
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.004fb970
push eax
push 0x5e8648
push 0
push esi
call fcn.0056e800
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 0x573b51
fxch st(2)
mov dword [esp + 0x14], 0
fadd st(0), st(0)
fstp qword [esp + 0x60]
jmp 0x57397a
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 0x573a5f
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 0x573a5f
fild dword [esi + 0x30]
fidiv dword [edi + 0x28]
fld qword [0x5e4ff0]
call fcn.005c4c40
fld1
fsubrp st(1)
fmul qword [esp + 0x40]
fst qword [esp + 0x40]
fcomp qword [0x5e8640]
fnstsw ax
test ah, 5
jnp 0x573a5f
mov edx, ebx
imul edx, ebx
neg edx
mov dword [esp + 0x30], edx
fild dword [esp + 0x30]
fdiv qword [0x5e8638]
call fcn.005c566c
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.005712e0
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 0x5739c5
fld1
xor ebx, ebx
fst qword [esp + 0x40]
fld qword [esp + 0x60]
fst qword [esp + 0x70]
fcomp qword [0x6115c8]
fnstsw ax
test ah, 1
jne 0x573b24
mov esi, dword [esp + 0x18]
cmp ebx, dword [esp + 0xc]
jg 0x573b24
mov eax, ebx
fstp st(0)
imul eax, ebx
neg eax
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fdiv qword [0x5e8638]
call fcn.005c566c
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.005712e0
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 [0x5e4ff0]
call fcn.005c4c40
fld1
fld st(0)
fsubrp st(2)
fxch st(1)
fmul qword [esp + 0x40]
fst qword [esp + 0x40]
fcomp qword [0x5e8640]
fnstsw ax
test ah, 5
jnp 0x573b24
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 0x573a84
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 0x573978
jmp 0x573b55
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.0056e940
add esp, 4
cmp dword [esp + 0x10], 1
mov dword [esp + 0x14], eax
jle 0x573b8c
mov eax, dword [edi + 0xe0]
add eax, eax
add eax, eax
add eax, eax
push eax
call fcn.0056e940
add esp, 4
cmp dword [edi + 0xe0], 0
fld1
fst qword [esp + 0x40]
mov dword [esp + 0x1c], eax
mov dword [esp + 0xc], 0
jle 0x573c09
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.00571f90
fstp qword [esp + 4]
mov ecx, dword [esp + 0x24]
add esp, 4
add esi, ecx
call fcn.005712e0
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 0x573bb0
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 [0x5e8630]
fst qword [esp + 0x60]
fxch st(3)
fmul qword [0x5e8628]
fst qword [esp + 0x78]
fcomp st(3)
fnstsw ax
test ah, 5
jp 0x573fca
fld qword [esp + 0x48]
jmp 0x573c75
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 0x573cee
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.00571f90
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 0x573cb2
fld qword [esp + 0x48]
fldz
mov esi, dword [edi + 0xe0]
sub esi, 1
js 0x573d67
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.00572070
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 0x573d57
push 0x74f
fstp st(0)
push str.....encoder_ratecontrol.c
push str.qscale_i____0
call fcn.005c5796
fldz
add esp, 0xc
sub esi, 1
sub ebx, 0x48
test esi, esi
jge 0x573d04
fld qword [esp + 0x48]
fxch st(1)
cmp dword [esp + 0x10], 1
jle 0x573ee3
mov eax, dword [esp + 0x10]
and eax, reloc.WS2_32.dll_accept
jns 0x573d82
dec eax
or eax, 0xfffffffe
inc eax
cmp eax, 1
je 0x573da8
push 0x755
fstp st(1)
push str.....encoder_ratecontrol.c
fstp st(0)
push str.filter_size_21
call fcn.005c5796
fld qword [esp + 0x54]
fldz
add esp, 0xc
cmp dword [edi + 0xe0], 0
mov dword [esp + 0xc], 0
jle 0x573ee3
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 0x573ebd
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 0x573e36
fstp st(0)
fld1
jmp 0x573e61
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.005c566c
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 0x573e9c
cmp ebx, dword [edi + 0xe0]
jge 0x573e9c
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 0x573e9c
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 0x573e9e
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 0x573e21
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 0x573dc5
xor eax, eax
cmp dword [edi + 0xe0], eax
mov dword [esp + 0xc], eax
jle 0x573f92
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.00572510
fstp dword [esp + 0x44]
add esp, 8
fld dword [esp + 0x3c]
fst dword [ebx + 0x28]
fldz
fcompp
fnstsw ax
test ah, 0x41
jnp 0x573f55
push 0x771
push str.....encoder_ratecontrol.c
push str.rce__new_qscale___0
call fcn.005c5796
add esp, 0xc
fld dword [ebx + 0x28]
sub esp, 8
mov esi, ebx
fstp qword [esp]
call fcn.005712e0
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 0x573f00
fld qword [esp + 0x48]
fldz
fld qword [esp + 0x50]
fcomp qword [esp + 0x40]
fnstsw ax
fld qword [esp + 0x58]
test ah, 5
jp 0x573fa9
fsub qword [esp + 0x60]
fld qword [esp + 0x60]
fmul qword [0x6116c0]
fst qword [esp + 0x60]
fld qword [esp + 0x78]
fcomp st(1)
fnstsw ax
test ah, 5
jnp 0x573c73
fstp st(3)
mov edx, dword [esp + 0x14]
fstp st(2)
fstp st(1)
push edx
fstp st(0)
call fcn.0056e970
add esp, 4
cmp dword [esp + 0x10], 1
jle 0x573ff1
mov eax, dword [esp + 0x1c]
push eax
call fcn.0056e970
add esp, 4
cmp dword [edi + 8], 0
je 0x573fff
mov esi, dword [ebp + 8]
call fcn.00573590
mov esi, dword [ebp + 8]
mov eax, esi
call fcn.00573520
fst qword [esp + 0x40]
fdiv qword [esp + 0x50]
fsub qword [0x6115d8]
fabs
fcomp qword [0x5e8578]
fnstsw ax
test ah, 0x41
jne 0x5741c8
mov eax, dword [edi + 0xe0]
fldz
test eax, eax
mov dword [esp + 0x14], eax
jle 0x574053
mov eax, dword [edi + 0xe4]
mov ecx, dword [edi + 0xe0]
add eax, 0x28
fadd dword [eax]
add eax, 0x48
sub ecx, 1
jne 0x574049
fidiv dword [esp + 0x14]
fdiv qword [0x5dfc38]
call fcn.005c5020
fmul qword [0x611700]
fstp qword [esp + 0x78]
fld qword [0x5e4ff0]
call fcn.005c5020
fdivr qword [esp + 0x78]
fadd qword [0x5e8210]
fstp qword [esp + 0x60]
fld qword [esp + 0x50]
fcomp qword [esp + 0x40]
fnstsw ax
test ah, 5
jnp 0x57409a
cmp dword [edi + 8], 0
jne 0x5740aa
push str.Error:_2pass_curve_failed_to_converge_n
push 1
push esi
call fcn.0056e800
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 [0x5e6038]
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.0056e800
fld qword [esp + 0x74]
fld qword [esp + 0x64]
add esp, 0x24
fcom st(1)
fnstsw ax
test ah, 5
jp 0x57414f
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 0x57414f
test ecx, ecx
fstp st(0)
fstp st(0)
jle 0x574136
push ecx
push str.try_reducing_target_bitrate_or_reducing_qp_min__currently__d__n
push 1
push esi
call fcn.0056e800
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.0056e800
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 0x5741ac
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 0x5741ac
cmp ecx, 0x33
jge 0x574193
push ecx
push str.try_increasing_target_bitrate_or_increasing_qp_max__currently__d__n
push 1
push esi
call fcn.0056e800
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.0056e800
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 4], 0
je 0x5741b8
cmp dword [edi + 8], 0
jne 0x5741c8
push 0x5e8440
push 1
push esi
call fcn.0056e800
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret