Вот что я вытянул с кода рипера, но там фигня одна
program test; {$APPTYPE CONSOLE} uses Windows, SysUtils, Classes; type TBuffer = array [0..3] of Byte; TOffsetsList = record Offset: Int64; end; var DestFile: TFileStream; Buffer: TBuffer; PosBuf, FoundSize: Int64; MP3Ver: byte; MP3Layer: byte; MP3Padding: byte; MP3Rate: longword; MP3BitRate: longword; MP3FrameLen, MP3FrameSize: longword; MP3Frames: longword; buf3: array[1..3] of char; B: Byte; OffsetsList: array of TOffsetsList; i: Integer; const BIT_RATE_TABLE: array [0..15] of Integer = (0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 0); var firstOffset, lastOffset: Int64; begin PosBuf:= 0; DestFile:= TFileStream.Create('data.pak', fmOpenReadWrite and fmShareExclusive); repeat DestFile.Read(B, 1); until B = 255; DestFile.Seek((DestFile.Position-1), 0); firstOffset:= DestFile.Position; DestFile.Seek(firstOffset, 0); DestFile.Read(Buffer, 4); if (Buffer[0] = 255) and ((Buffer[1] and 224) = 224) then begin MP3Ver := Buffer[1] And 24; case MP3Ver of 24: MP3Ver := 10; 16: MP3Ver := 20; 8: exit; else MP3Ver := 25; end; MP3Layer:= (4 - (Buffer [1] shr 1) and 3) and 3; MP3Padding:= ((Buffer [2] shr 1) and 1); MP3BitRate := BIT_RATE_TABLE[(Buffer[2] And 240) shr 4]; MP3Rate := Buffer[2] And 12; if MP3Rate = 0 then MP3Rate := 44100; if MP3Rate = 4 then MP3Rate := 48000; if MP3Rate = 8 then MP3Rate := 32000; MP3FrameSize := (144000 * MP3BitRate) div MP3Rate + MP3Padding; end; repeat DestFile.Read(B, 1); if B = 255 then begin lastOffset:= (DestFile.Position - 1); end; until DestFile.Position >= DestFile.Size; Writeln(MP3FrameSize); Writeln(firstOffset, ' ', lastOffset); end.