<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Home on pwn-e4</title>
    <link>https://pwn-e4.pages.dev/</link>
    <description>Recent content in Home on pwn-e4</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <lastBuildDate>Sun, 11 Jun 2023 00:00:00 +0000</lastBuildDate>
    
	<atom:link href="https://pwn-e4.pages.dev/index.xml" rel="self" type="application/rss+xml" />
    
    
    
    <item>
      <title>Transformer LM</title>
      <link>https://pwn-e4.pages.dev/transformer-lm/</link>
      <pubDate>Sun, 11 Jun 2023 00:00:00 +0000</pubDate>
      
      <guid>https://pwn-e4.pages.dev/transformer-lm/</guid>
      <description></description>
    </item>
    
    
    
    <item>
      <title>Inside the Architecture of Game Repacks</title>
      <link>https://pwn-e4.pages.dev/inside-the-architecture-of-game-repacks/</link>
      <pubDate>Thu, 02 Feb 2023 00:00:00 +0000</pubDate>
      
      <guid>https://pwn-e4.pages.dev/inside-the-architecture-of-game-repacks/</guid>
      <description>&lt;p&gt;If you have ever spent time in PC gaming communities, you have almost certainly encountered &lt;strong&gt;repacks&lt;/strong&gt;. Within hours of a game’s release, a highly specialized subset of software engineers known in the digital underground as &lt;strong&gt;repackers&lt;/strong&gt; will release a version of that exact same game, compressed to a fraction of its original size. A huge 80GB chunk reduced to a 20GB download, all while remaining fully functional upon installation.&lt;/p&gt;
&lt;p&gt;To the average user, seeing a game cut to a quarter of its original download size looks like black magic. Standard file compression utilities like 7-Zip, WinRAR, or Windows ZIP usually struggle to trim off even 5% from a modern game folder.&lt;/p&gt;
&lt;p&gt;How do repackers achieve these extreme ratios?&lt;/p&gt;
&lt;p&gt;This phenomenon is not achieved through simple file zipping. Standard archiving tools like WinRAR or 7-Zip won&amp;rsquo;t be able to achieve anything similar or even come close for a task like this, often yielding negligible space savings when applied to pre-compiled game data. Instead, game repacking is a highly complex, multi-stage discipline that sits at the intersection of reverse engineering, advanced data compression mathematics, and systems architecture.&lt;/p&gt;
&lt;p&gt;To understand how repackers manage to shrink the huge size of modern software, we need to look at what a repack is really made of, from dismantling a game’s proprietary file structure to the practical (and theoretical) limits of dictionary-based compression.&lt;/p&gt;
&lt;h2 id=&#34;modern-aaa-bloat&#34;&gt;Modern AAA Bloat&lt;/h2&gt;
&lt;p&gt;Before you can shrink a game, you have to understand why it’s so big to begin with. Modern video games aren’t just code. They’re massive collections of multimedia data. The executable that holds the game’s real logic usually stays under a few hundred megabytes, and the remaining bulk—about 99% of the disk space is mostly made up of assets.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;High-Fidelity Textures and Mipmapping&lt;/strong&gt; &lt;br&gt;
As screens have moved from 1080p to 4K (and higher), texture files have ballooned in size. A single 4K texture, if it’s stored without compression, can take up tens of megabytes. On top of that, many engines use mipmaps smaller, pre-made versions of the same texture that the game swaps in when objects are far away. Mipmaps make rendering faster and reduce visual shimmering, but they also add roughly about 33% more storage for the texture package.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Uncompressed and Localized Audio&lt;/strong&gt; &lt;br&gt;
Audio is one of the biggest space hogs. To avoid extra processing during gameplay, games often ship sound in uncompressed PCM-style formats. If the game has a layered soundtrack, thousands of sound effects, and fully voiced dialogue, the audio banks can swell quickly. Then comes localization: if the game releases in multiple languages and each one includes full voice acting, the install size grows almost linearly with the number of languages. So even if one language is what you use, you may end up downloading a huge amount of useless data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Data Duplication to Speed Up Loading&lt;/strong&gt; &lt;br&gt;
Older game builds were designed around mechanical HDDs, where reading scattered data is slow because the drive head has to physically seek. To keep loading smooth, developers sometimes duplicated the same assets many times across different archive sections things like common textures or repeated objects so each level’s required data could be laid out more sequentially on disk. SSDs (especially NVMe) made this less necessary, but some older pipelines and content packaging approaches can still leave behind duplication.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;breakdown-of-the-virtual-file-system&#34;&gt;Breakdown of the Virtual File System&lt;/h2&gt;
&lt;p&gt;Before a repacker can shrink a game, it has to be willing to &lt;strong&gt;“break”&lt;/strong&gt; the way the game is packaged. It can’t just run compression on the whole install folder, because the engine usually stores assets inside proprietary containers (like Unreal’s .pak, Frostbite’s .cas, or Unity’s .assets).&lt;/p&gt;
&lt;p&gt;These containers act like a Virtual File System: they’re built for fast access during gameplay, not for maximum storage efficiency. Inside, the data is often already lightly compressed for speed (for example with LZ4 or Oodle Kraken) and may also be encrypted.&lt;/p&gt;
&lt;p&gt;That’s where repack compression gets tricky: common general-purpose compressors depend on finding repeated byte patterns. If the data is encrypted or already compressed well, it looks almost random high &lt;strong&gt;entropy&lt;/strong&gt; so it doesn’t compress any further. To get big savings, the repacker has to get past the engine’s container format and extract the underlying raw assets.&lt;/p&gt;
&lt;h4 id=&#34;reverse-engineering-with-quickbms&#34;&gt;Reverse Engineering with QuickBMS&lt;/h4&gt;
&lt;p&gt;&lt;abbr title= &#34;Quick Binary Management System&#34;&gt;QuickBMS&lt;/abbr&gt; is a tool for extracting/repacking data from packed or proprietary archive formats, using custom &lt;strong&gt;scripts&lt;/strong&gt; that describe how to locate file tables, offsets, encryption/compression, and naming. To reduce all that, repackers lean on QuickBMS. Those scripts decode the container structure by identifying file headers, offset tables, and the internal layout the engine uses. Once the repacker understands that structure, it extracts every raw asset textures, audio chunks, models, scripts out of the container and into a huge folder of mostly uncompressed files.&lt;/p&gt;
&lt;p&gt;Now that the repacker has individual building blocks, it can use compression methods that aim for a lopsided outcome: heavy compute time during packing, but reasonable decompression time for the end user.&lt;/p&gt;
&lt;h4 id=&#34;solid-archiving&#34;&gt;Solid Archiving&lt;/h4&gt;
&lt;p&gt;Repacking usually relies on solid archives. In a normal ZIP, each file is compressed separately. In a solid archive, many files are stitched into one continuous stream and compressed together.&lt;/p&gt;
&lt;p&gt;That matters for games because lots of assets are similar. Think of thousands of XML files with recurring structures, or many UI textures that share patterns. When the compressor can see across file boundaries, it can reuse more repeated sequences, boosting the compression ratio.&lt;/p&gt;
&lt;h4 id=&#34;the-dictionary-size&#34;&gt;The Dictionary Size&lt;/h4&gt;
&lt;p&gt;Modern repacks often use dictionary-based compression (especially &lt;strong&gt;LZMA2&lt;/strong&gt;-style variants or &lt;strong&gt;Zstandard&lt;/strong&gt;). These work by learning a &lt;strong&gt;dictionary&lt;/strong&gt; of recurring byte sequences. When the same sequence shows up again, the compressor replaces it with a reference instead of storing the bytes directly.&lt;/p&gt;
&lt;p&gt;How well this works depends heavily on dictionary size. A dictionary of &lt;strong&gt;1GB&lt;/strong&gt; means the decompressor can look back up to that far to find matching sequences bigger dictionary, more chances to reuse patterns, but also higher memory and overhead.&lt;/p&gt;
&lt;h4 id=&#34;patching-and-deduplication&#34;&gt;Patching and Deduplication&lt;/h4&gt;
&lt;p&gt;Before algorithmic compression, repackers often run custom deduplication scripts. If the extracted files contain 50 identical copies of a 10MB texture (due to the HDD optimization mentioned earlier), the repacker will delete 49 of them. They then write a custom script instructing the installer to dynamically recreate the missing 49 copies upon installation using hardlinks or direct byte-copying.&lt;/p&gt;
&lt;h2 id=&#34;lossless-vs-lossy&#34;&gt;Lossless vs. Lossy&lt;/h2&gt;
&lt;p&gt;Compression algorithms alone cannot shrink 80GB to 20GB. To achieve the most staggering size reductions, repackers must alter the heaviest assets: audio and video. This introduces the distinction between Lossless and Lossy repacks.&lt;/p&gt;
&lt;h4 id=&#34;lossless-repack&#34;&gt;Lossless Repack&lt;/h4&gt;
&lt;p&gt;A &lt;strong&gt;lossless&lt;/strong&gt; repack means that when the game is installed, the files are mathematically identical (1:1 hash match) to the original game files. No audio quality is downgraded; no video pixels are lost.&lt;br&gt;
To achieve this with audio, repackers exploit the inefficiency of game audio formats. Game engines often use ADPCM or raw PCM WAV files wrapped in middleware containers (like Wwise &lt;em&gt;.pck&lt;/em&gt; files).&lt;/p&gt;
&lt;h4 id=&#34;lossy-repack&#34;&gt;Lossy Repack&lt;/h4&gt;
&lt;p&gt;In a lossy repack,the actual quality of the media is permanently altered. &lt;br&gt;
4K Bink (&lt;em&gt;.bik&lt;/em&gt;) cutscenes with bitrates of 50 Mbps are aggressively re-encoded down to 1080p or 720p at 5 Mbps using HEVC (&lt;em&gt;H.265&lt;/em&gt;). The repacker utilizes tools like RAD Video Tools to convert the standard MP4/MKV back into the engine&amp;rsquo;s proprietary &lt;em&gt;.bik&lt;/em&gt; format so the game engine can still read them. This alone can take off 20GB off a modern game.
Uncompressed audio is heavily downsampled (e.g., from &lt;em&gt;48kHz to 32kHz&lt;/em&gt;) or re-encoded to lossy formats like &lt;em&gt;opus&lt;/em&gt; or &lt;em&gt;ogg vorbis&lt;/em&gt;, drastically reducing the size of the audio banks.&lt;br&gt;
While the game is fully playable, a lossy repack sacrifices audiovisual fidelity for extreme bandwidth savings.&lt;/p&gt;
&lt;h2 id=&#34;final-decompression&#34;&gt;Final Decompression&lt;/h2&gt;
&lt;p&gt;The trade-off for all this clever compression is time and stress on your hardware. Repackers push work onto installation: instead of making the download smaller for free, they shift the heavy lifting to your CPU, RAM, and disk I/O.&lt;/p&gt;
&lt;p&gt;Installing a highly compressed repack can be a brutal workload—often driving many-core CPUs to 100% usage for hours.&lt;/p&gt;
&lt;h4 id=&#34;what-happens-during-decompression&#34;&gt;What happens during decompression&lt;/h4&gt;
&lt;p&gt;When you run &lt;code&gt;setup.exe&lt;/code&gt;, the installer’s unpacking engine typically runs a staged pipeline:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Memory Allocation&lt;/strong&gt;: The installer maps the dictionary into the system RAM.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CPU Decoding&lt;/strong&gt;: The CPU processes the LZMA/Zstd data streams, resolving dictionary pointers into raw bytes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disk I/O&lt;/strong&gt;: The decompressed raw bytes are written to a temporary folder on the storage drive.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Recompilation&lt;/strong&gt;: Custom scripts run in the background, taking the raw bytes and repacking them back into the game engine&amp;rsquo;s proprietary &lt;em&gt;.pak&lt;/em&gt; or &lt;em&gt;.cas&lt;/em&gt; formats.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Verification&lt;/strong&gt;: The installer runs a CRC (Cyclic Redundancy Check) or MD5 hash check on the final reconstructed files to ensure they perfectly match the retail release.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The architecture of a video game repack is a masterclass in data science. Reverse engineering proprietary formats, extracting redundancy, and then using aggressive heuristics plus brute-force compute to squeeze data down as far as possible.&lt;/p&gt;
&lt;p&gt;Even though repacks are tied to piracy, the underlying engineering problem is genuinely impressive from a technical perspective: instead of optimizing for runtime performance, repackers optimize for storage density by dismantling engine containers and extracting redundancy that general-purpose packaging leaves behind.&lt;/p&gt;
</description>
    </item>
    
    
    
    <item>
      <title>initial-test-page</title>
      <link>https://pwn-e4.pages.dev/initial-test-page/</link>
      <pubDate>Thu, 29 Dec 2022 00:00:00 +0000</pubDate>
      
      <guid>https://pwn-e4.pages.dev/initial-test-page/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;If the enemy is in range, so are you&amp;rdquo; &lt;br&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;-Unknown&lt;/p&gt;
</description>
    </item>
    
    
    
    
  </channel>
</rss>
