Function at 0x40a860
Capabilities:
Terminate process

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x6c
mov edi, ecx
mov esi, edx
mov ebp, dword [0x938558]
test ebp, ebp
je 0x40ab85
mov eax, dword [esi + 0xc]
mov ebx, dword [eax + 8]
cmp dword [ebx + 0xe0], 0
jne 0x40aaf7
mov eax, dword [esi + 0x14]
mov edx, dword [ebx + 0x198]
cvtsi2ss xmm0, dword [edx + 0x48]
divss xmm0, dword [0x41e6fc]
mov dword [esp + 4], str.frame__5d_q__2.1f
pxor xmm1, xmm1
mov dword [esp], ebp
mov dword [esp + 8], eax
movss xmm1, xmm0
cvtps2pd xmm2, xmm1
movsd qword [esp + 0xc], xmm2
call dword [sym.imp.MSVCR90.dll_fprintf]
test dword [ebx + 0xc], 0x8000
jne 0x40aaff
push edi
push str.f_size__6d
push ebp
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
fild qword [0x938408]
fmul qword [0x41e680]
fild dword [ebx + 0x20]
fild dword [ebx + 0x24]
fild qword [esi + 0x20]
fld qword [0x41e670]
fld qword [0x41e678]
mov ecx, dword [0x938408]
mov edx, dword [0x93840c]
fxch st(3)
fdivp st(4)
fxch st(4)
fstp qword [esp + 8]
fmul st(2)
fxch st(3)
fcom st(3)
fnstsw ax
shl edi, 3
shl edx, 3
mov dword [esp + 4], str.s_size__8.0fkB_time__0.3f_br__7.1fkbits_s_avg_br__7.1fkbits_s
mov dword [esp], ebp
sahf
fcmovbe st(0), st(3)
fstp st(3)
fxch st(2)
fst qword [esp + 0x10]
mov ebp, ecx
mov dword [esp + 0x40], edi
fild dword [esp + 0x40]
fdivrp st(2)
fxch st(1)
fdiv st(2)
shr ebp, 0x1d
fstp qword [esp + 0x18]
shl ecx, 3
mov dword [esp + 0x40], ecx
or ebp, edx
mov dword [esp + 0x44], ebp
fild qword [esp + 0x40]
fdivrp st(1)
fdivrp st(1)
fstp qword [esp + 0x20]
call dword [sym.imp.MSVCR90.dll_fprintf]
mov eax, dword [ebx + 0x198]
push dword [eax + 0x34]
call sub.avcodec.dll_av_get_pict_type_char
mov esi, dword [0x938558]
movsx eax, al
push eax
push str.type__c_n
push esi
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0x10
test dword [ebx + 0xc], 0x8000
je 0x40aaf7
fld qword [0x41e658]
fstp st(0)
fld qword [0x41e688]
fstp st(0)
fldz
fst dword [esp + 0x58]
fld1
fdiv st(1)
fstp qword [esp + 0x30]
fld st(0)
fstp qword [esp + 0x50]
fstp qword [esp + 0x48]
xor ebp, ebp
mov byte [esp + 0x5c], 0x59
mov byte [esp + 0x5d], 0x55
mov byte [esp + 0x5e], 0x56
mov eax, dword [ebx + 0x198]
fild qword [eax + ebp*8 + 0x78]
mov edx, dword [eax + ebp*8 + 0x7c]
mov ecx, dword [ebx + 0x28]
imul ecx, dword [ebx + 0x2c]
shr edx, 0x1f
fadd qword [edx*8 + 0x41e590]
test ebp, ebp
mov dword [esp + 0x40], ecx
fild dword [esp + 0x40]
fmul qword [0x41e658]
je 0x40aa1a
fmul qword [0x41e688]
fld qword [esp + 0x50]
fadd st(2)
fld qword [esp + 0x48]
fxch st(2)
fdiv st(3), st(0)
fxch st(1)
fstp qword [esp + 0x50]
faddp st(1)
fld dword [esp + 0x58]
fucomp st(2)
fnstsw ax
fstp qword [esp + 0x48]
sahf
jp 0x40aa41
je 0x40aa6b
fstp qword [esp]
call sub.libmmd.dll_log.J
fld qword [0x41e660]
fxch st(1)
fstp qword [esp + 0x38]
fstp qword [esp]
call sub.libmmd.dll_log.J
fld qword [esp + 0x38]
fmul qword [0x41e668]
fdivrp st(1)
jmp 0x40aa71
fstp st(0)
fld qword [esp + 0x30]
movsx eax, byte [esp + ebp + 0x5c]
fstp qword [esp + 0xc]
mov dword [esp], esi
mov dword [esp + 4], str.PSNR_c:_.2f_n
mov dword [esp + 8], eax
call dword [sym.imp.MSVCR90.dll_fprintf]
inc ebp
cmp ebp, 3
jl 0x40a9e3
fld qword [esp + 0x30]
fld qword [esp + 0x50]
fld qword [esp + 0x48]
fdivp st(1)
fld dword [esp + 0x58]
fucomp st(1)
fnstsw ax
sahf
jp 0x40aab4
je 0x40aae0
fstp st(1)
fstp qword [esp]
call sub.libmmd.dll_log.J
fld qword [0x41e660]
fxch st(1)
fstp qword [esp + 0x30]
fstp qword [esp]
call sub.libmmd.dll_log.J
fld qword [esp + 0x30]
fmul qword [0x41e668]
fdivrp st(1)
jmp 0x40aae2
fstp st(0)
fstp qword [esp + 8]
mov dword [esp + 4], str.:_.2f_n
mov dword [esp], esi
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0x6c
pop ebx
pop ebp
pop esi
pop edi
ret
fldz
mov edx, dword [ebx + 0x198]
fild qword [edx + 0x78]
mov eax, dword [ebx + 0x28]
imul eax, dword [ebx + 0x2c]
mov ecx, dword [edx + 0x7c]
shr ecx, 0x1f
fadd qword [ecx*8 + 0x41e590]
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
fmul qword [0x41e658]
fdivp st(1)
fucom st(1)
fnstsw ax
sahf
jp 0x40ab37
je 0x40ab65
fstp st(1)
fstp qword [esp]
call sub.libmmd.dll_log.J
fld qword [0x41e660]
fxch st(1)
fstp qword [esp + 0x30]
fstp qword [esp]
call sub.libmmd.dll_log.J
fld qword [esp + 0x30]
fld qword [0x41e668]
fmulp st(1)
fdivrp st(1)
jmp 0x40ab6b
fstp st(0)
fld1
fdivrp st(1)
fstp qword [esp + 8]
mov dword [esp + 4], str.PSNR__6.2f
mov dword [esp], ebp
call dword [sym.imp.MSVCR90.dll_fprintf]
jmp 0x40a8d5
cmp dword [0x9384c8], 0
jne 0x40abb1
mov edx, dword [0x93855c]
test edx, edx
je 0x40abbc
movsx eax, byte [edx]
test eax, eax
je 0x40abbc
push 0x420d64
push edx
call sub.avutil.dll_fopen_utf8
add esp, 8
mov ebp, eax
jmp 0x40abe6
movsx eax, byte [0x90a4c0]
test eax, eax
jne 0x40abd2
push str.fopen
call dword [sym.imp.MSVCR90.dll_perror]
push 1
call dword [sym.imp.MSVCR90.dll_exit]
add esp, 8
push 0x420d64
push 0x90a4c0
call sub.avutil.dll_fopen_utf8
add esp, 8
mov ebp, eax
mov dword [0x938558], ebp
test ebp, ebp
je 0x40abbc
jmp 0x40a879