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

Disassembly:
push ebp
push edi
push esi
xor esi, esi
push ebx
sub esp, 0x7c
mov ebx, dword [esp + 0x90]
mov edi, dword [ebx + 0x75f0]
mov eax, dword [ebx + 0x3a68]
mov edx, dword [edi + 0x220]
mov ecx, dword [eax + 0x5c]
sub edx, 1
js 0x84609b
lea eax, [edx + edx*2]
shl eax, 3
add eax, dword [edi + 0x224]
cmp ecx, dword [eax]
mov esi, eax
jl 0x846091
cmp ecx, dword [eax + 4]
jle 0x84609b
sub eax, 0x18
sub edx, 1
jns 0x846086
xor esi, esi
emms
test esi, esi
je 0x8460c3
mov eax, dword [edi + 0x228]
test eax, eax
je 0x84667b
mov edx, dword [esi + 0x14]
cmp edx, dword [eax + 0x14]
je 0x8460c3
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.00803250
mov eax, dword [ebx + 0x2ac]
xor ebp, ebp
mov dword [edi + 0x228], esi
test eax, eax
je 0x846114
mov eax, dword [ebx + 0x3a68]
mov eax, dword [eax + 0x5c]
test eax, eax
js 0x846695
cmp eax, dword [edi + 0x108]
jge 0x846695
mov edx, dword [ebx + 0x75f0]
lea ebp, [eax + eax*2]
shl ebp, 6
add ebp, dword [edx + 0x10c]
cmp dword [ebx + 0xbe8], 1
mov dword [edx + 0x40], ebp
je 0x846621
mov ecx, dword [edi + 8]
test ecx, ecx
jne 0x846282
mov eax, dword [ebx + 0xbe8]
mov dword [esp + 0x44], eax
cmp dword [esp + 0x44], 1
je 0x846143
mov eax, dword [ebx + 0x3a68]
movzx eax, byte [eax + 0x82]
mov dword [edi + 0x218], eax
mov edx, dword [edi]
test edx, edx
jne 0x846520
mov eax, dword [edi + 4]
test eax, eax
jne 0x8465c0
cmp dword [esp + 0x44], 1
je 0x8465f5
mov edx, dword [ebx + 0x3a6c]
mov ecx, dword [esp + 0x44]
mov eax, edx
cvtsi2ss xmm0, dword [edi + ecx*4 + 0x34]
test esi, esi
je 0x846192
mov edx, dword [esi + 8]
test edx, edx
je 0x846580
mov edx, dword [esi + 0xc]
sub edx, dword [edi + 0x34]
cvtsi2ss xmm1, edx
addss xmm0, xmm1
mov ecx, dword [esp + 0x94]
test ecx, ecx
je 0x8461ab
mov edx, dword [esp + 0x94]
sub edx, 1
cvtsi2ss xmm0, edx
fild dword [ebx + 0x264]
mov edx, dword [ebx + 0x268]
movss dword [esp + 0x1c], xmm0
fld dword [esp + 0x1c]
fcomi st(1)
jb 0x8461d7
fstp st(1)
mov dword [esp + 0x64], edx
fild dword [esp + 0x64]
fcomi st(1)
fcmovnb st(0), st(1)
fstp st(1)
jmp 0x8461d9
fstp st(0)
mov ecx, 0x45
mov dword [edi + 0x50], 0
mov dword [edi + 0x4c], 0
fst dword [esp + 0x1c]
movss xmm0, dword [esp + 0x1c]
fst dword [edi + 0x48]
addss xmm0, dword [0xbb27fc]
cvttss2si edx, xmm0
cmp edx, 0x45
cmovg edx, ecx
xor cl, cl
test edx, edx
cmovns ecx, edx
test ebp, ebp
mov dword [edi + 0x44], ecx
fst dword [eax + 0x88]
fst dword [eax + 0x84]
je 0x846228
mov dword [ebp + 0x40], ecx
mov eax, dword [ebx + 0x75f0]
fld qword [str.ffffff]
cmp dword [esp + 0x44], 2
fld qword [eax + 0x138]
fmul st(1)
fst qword [eax + 0x138]
fxch st(1)
fmul qword [eax + 0x140]
fadd dword [0xbb2804]
fstp qword [eax + 0x140]
je 0x846568
faddp st(1)
cmp dword [esp + 0x44], 1
fstp qword [eax + 0x138]
je 0x84627a
mov eax, dword [esp + 0x44]
mov dword [edi + 0x130], eax
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x3a6c]
mov edx, dword [ebx + 0x47a4]
mov eax, dword [eax + 0x2114]
shl edx, 2
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebx + 0x3a6c]
mov edx, dword [ebx + 0x47a4]
mov eax, dword [eax + 0x2118]
shl edx, 2
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebx + 0x3a6c]
mov edx, dword [ebx + 0x47a4]
mov eax, dword [eax + 0x211c]
shl edx, 2
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov edx, dword [ebx + 0xbe8]
movss xmm0, dword [ebx + 0x208c]
mov eax, edx
shl eax, 5
lea eax, [edi + eax + 0x1b4]
mov dword [edi + 0x1b0], eax
movlps qword [esp + 0x68], xmm0
mov eax, dword [ebx + 0x3a68]
fild qword [esp + 0x68]
movss xmm0, dword [ebx + 0x2090]
mov dword [esp + 0x44], edx
fild qword [eax + 0x40]
fmulp st(1)
movlps qword [esp + 0x68], xmm0
mov eax, dword [ebx + 0x75f0]
mov edx, dword [ebx + 0x2090]
mov dword [esp + 0x48], eax
mov eax, dword [ebx + 0x328]
fild qword [esp + 0x68]
fld qword [edi + 0x78]
fmul st(2)
mov ecx, dword [eax + 0x75f0]
fdiv st(1)
fstp qword [edi + 0x70]
fxch st(1)
mov dword [esp + 8], edx
mov dword [esp + 0xc], 0
mov eax, dword [ecx + 0x60]
mov edx, dword [ecx + 0x64]
fstp qword [esp + 0x30]
fstp qword [esp + 0x20]
mov dword [esp + 0x2c], ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.008e8f78
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x5c], edx
mov edx, dword [ebx + 0x57c]
fild qword [esp + 0x58]
fst qword [eax + 0x68]
fld qword [esp + 0x30]
cmp edx, 1
fld qword [esp + 0x20]
jle 0x846683
sub eax, ecx
mov ecx, dword [esp + 0x48]
sar eax, 4
imul eax, eax, 0x914c1bad
mov dword [esp + 0x4c], ebp
fld qword [ecx + 0x58]
mov ecx, 1
mov dword [esp + 0x50], edi
fldz
mov edi, dword [esp + 0x48]
mov dword [esp + 0x54], esi
mov ebp, eax
mov esi, edx
jmp 0x846402
fstp st(0)
fld qword [edi + 0x68]
fxch st(4)
fxch st(3)
fxch st(2)
fxch st(1)
lea eax, [ecx + ebp]
mov edx, eax
sar edx, 0x1f
idiv esi
mov edx, dword [ebx + edx*4 + 0x328]
mov eax, dword [edx + 0x75f0]
mov edx, dword [edx + 0x52c]
fld qword [eax + 0x1a0]
test edx, edx
je 0x846453
fld dword [eax + 0x194]
fcomi st(1)
fcmovb st(0), st(1)
fstp st(1)
fsubp st(5)
fxch st(4)
fcomi st(4)
fcmovb st(0), st(4)
fadd qword [eax + 0x70]
fxch st(1)
fcomi st(1)
fxch st(1)
fcmovb st(0), st(1)
fstp qword [edi + 0x68]
fxch st(1)
fxch st(2)
fxch st(3)
jmp 0x84645d
fstp st(0)
fstp st(4)
fxch st(1)
fxch st(2)
fxch st(3)
add ecx, 1
cmp ecx, esi
fld st(1)
jne 0x8463f5
fstp st(2)
fstp st(0)
mov eax, dword [esp + 0x48]
mov ebp, dword [esp + 0x4c]
mov edi, dword [esp + 0x50]
mov esi, dword [esp + 0x54]
fld qword [eax + 0x68]
mov edx, eax
fcomi st(1)
mov eax, 0xbb0d80
fcmovnb st(0), st(1)
fstp st(1)
fild dword [esp + 0x98]
fsubp st(1)
fstp qword [edx + 0x68]
mov edx, dword [0xbb0d80]
test edx, edx
je 0x8464b2
mov ecx, dword [ebx + 0x20]
jmp 0x8464ae
add eax, 0x34
mov edx, dword [eax]
test edx, edx
je 0x8464b2
cmp edx, ecx
jne 0x8464a5
mov edx, dword [ebx + 0x7c]
mov ecx, 4
test edx, edx
cmove ecx, dword [eax + 0x24]
cmp dword [ebx + 0x1ff4], 0x6d
jg 0x8465e0
mov edx, dword [ebx + 0x574]
test edx, edx
jne 0x846657
fstp st(0)
fstp st(0)
mov edx, dword [ebx + 0x47a4]
imul edx, dword [ebx + 0x47a0]
mov dword [esp + 0x64], edx
fild dword [esp + 0x64]
fild dword [eax + 4]
fmul qword [0xbb2978]
fxch st(1)
mov dword [esp + 0x64], ecx
fcomi st(1)
fcmovb st(0), st(1)
fstp st(1)
fmul dword [0xbb2980]
fild dword [esp + 0x64]
fdivp st(1)
fstp qword [edi + 0x198]
jmp 0x846129
mov eax, ebx
call fcn.0083fa10
mulss xmm0, dword [0xbb28b0]
movss dword [esp], xmm0
call fcn.008eb2d0
fstp dword [esp + 0x1c]
mov edx, dword [ebx + 0xbe8]
movss xmm0, dword [esp + 0x1c]
mov eax, dword [ebx + 0x3a6c]
mulss xmm0, dword [0xbb28b4]
mov dword [esp + 0x44], edx
addss xmm0, dword [0xbb28b8]
jmp 0x846192
fadd qword [eax + 0xe0]
faddp st(1)
fstp qword [eax + 0x138]
jmp 0x846270
mov edx, dword [esi + 0x10]
mov dword [esp + 0x2c], eax
movss dword [esp + 0x30], xmm0
mov dword [esp], edx
call fcn.008eb2d0
mov eax, dword [esp + 0x2c]
movss xmm0, dword [esp + 0x30]
fstp dword [esp + 0x1c]
movss xmm1, dword [esp + 0x1c]
mulss xmm1, dword [0xbb28b4]
subss xmm0, xmm1
jmp 0x846192
mov eax, ebx
call fcn.0083fa10
movss dword [esp + 0x1c], xmm0
fld dword [esp + 0x1c]
fstp qword [ebp + 0x38]
jmp 0x846527
fstp st(0)
fstp st(0)
fld dword [0xbb2970]
fstp qword [edi + 0x198]
jmp 0x846129
mov eax, dword [ebx + 0x3a6c]
mov ecx, dword [eax + 0x74]
mov edx, eax
test ecx, ecx
je 0x846169
mov edx, dword [edi + 0x34]
add edx, dword [edi + 0x38]
mov ecx, edx
shr ecx, 0x1f
lea edx, [ecx + edx]
sar edx, 1
cvtsi2ss xmm0, edx
jmp 0x846175
cmp dword [ebx + 0x20c], 3
jne 0x846114
xor eax, eax
cmp byte [ebp + 0x54], 0x73
sete al
mov dword [ebx + 0xc20], eax
movzx eax, byte [ebp + 0x54]
sub eax, 0x73
cmp al, 1
setbe al
movzx eax, al
mov dword [ebx + 0x6f88], eax
jmp 0x846114
fild dword [eax + 4]
fmul dword [0xbb2980]
fxch st(2)
mov dword [esp + 0x64], ecx
fdivrp st(1)
fmulp st(1)
fild dword [esp + 0x64]
fdivp st(1)
fstp qword [edi + 0x198]
jmp 0x846129
mov edx, dword [esi + 0x14]
jmp 0x8460b7
fld qword [eax + 0x58]
fxch st(1)
fxch st(2)
fxch st(3)
mov edx, dword [esp + 0x48]
jmp 0x84647f
mov dword [esp + 8], 0x4c9
mov dword [esp + 4], str.encoder_ratecontrol.c
mov dword [esp], str.frame___0__frame___rc__num_entries
call sub.msvcrt.dll__assert
jmp fcn.008466c0