Research Article

All-in-One Framework for Detection, Unpacking, and Verification for Malware Analysis

Algorithm 3

Restoration rate calculation algorithm.
Input: A, an original file
   B, a restored file
Output: restorationAccuracy //a list of restoration accuracy values for n sections
begin
(1) Remove garbage and padding values from B;
(2)A , where is the i-th section of A;
(3)for each section A do
(4)  totalLen .length;
(5)  curLen totalLen;
(6)  while curLen do
(7)    hash (); //hash a part of section
(8)   for to (B.length ) do
(9)     hash (); //hash a part of B
(10)    if then break;
(11)    else ;
(12)   end-for
(13)  end-while
(14)  restorationAccuracy[i] ;
(15)end-for
(16)return restorationAccuracy;
end