<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yuvi on Medium]]></title>
        <description><![CDATA[Stories by Yuvi on Medium]]></description>
        <link>https://medium.com/@yuviapp?source=rss-dbecd3b5c1fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*E_VrZdIMjuKH1e6rpkzImw.png</url>
            <title>Stories by Yuvi on Medium</title>
            <link>https://medium.com/@yuviapp?source=rss-dbecd3b5c1fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:17:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yuviapp/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Big One! Saving Kingdom Hearts Coded from Keitai Jail]]></title>
            <link>https://medium.com/@yuviapp/the-big-one-saving-kingdom-hearts-coded-from-keitai-jail-2ff715e4ea18?source=rss-dbecd3b5c1fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ff715e4ea18</guid>
            <dc:creator><![CDATA[Yuvi]]></dc:creator>
            <pubDate>Sat, 28 Nov 2026 22:06:39 GMT</pubDate>
            <atom:updated>2026-11-30T04:04:58.053Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*nu9wJcZ37kpGRpNVIggSLw.png" /></figure><p>I’m Yuvi, and if you have somehow made it to this article and don&#39;t know who I am, well, that&#39;s fair. But around 4 months ago I saved a little-known game called “Dirge of Cerberus: Lost Episodes” by utilizing the amazing power of money and a GPU farm. But you know I also do so much more than just this; I digress. So before we begin to talk about the next big game, I think it&#39;s best you read the last article I wrote if you have not already.<br><a href="https://medium.com/@yuviapp/the-story-to-save-a-couple-of-lost-keitai-games-1be4ede27c75">https://medium.com/@yuviapp/the-story-to-save-a-couple-of-lost-keitai-games-1be4ede27c75</a></p><p>The story again begins well over 2 years ago in 2024. Alongside Dirge of Cerberus, another important game was “preserved” back in 2024. That being Kingdom Hearts Coded for Keitai. This was the original version of the game that was released only for mobile phones. I used preserved lightly because, well, technically this was already “preserved” in multiple ways. First, Coded is the original version of Re:Coded, so some would say that alone this game is preserved. Secondly, the game files we had gotten were once again unplayable and were encrypted. So here comes the story of my two-year-plus battle to make this game playable again and preserve it once and forever. To hopefully never be lost again.</p><p>If you forgot or did not read my previous article two years ago, there was a donation of a phone that contained many games, those standouts being Dirge of Cerberus and Kingdom Hearts Coded. This contained a full SD card dump, and more importantly, the game&#39;s executable file was needed to actually play the game. As you needed both to play the game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*1xaPuc0b_9R8WA27XBGVnQ.png" /></figure><p>This is where I come in. I first joined this team many years ago to help solve the issues of this phone (and well, much more, but that&#39;s a story for another day). As I joined and learned more about the inner workings of how SD card encryption and everything worked. We had learned that we need a hidden partition of the SD card to actually decrypt the data. So a simple copy of the files off the SD card is not enough to decrypt the data ever (trust me, I tried).</p><p>You see, the phones would use this hidden partition, which the phone would create once inserted. It would then use the identifier of the SD card to make this said encryption, which is a C2 cipher. So without this hidden partition, there is truly no easy way to decrypt this data. The other issue is you could not use any normal SD card reader to view this hidden partition. We have so far only found one SD card reader chipset that can access this partition, so we can then see the contents of this hidden partition. That&#39;s where it gets difficult to explain to other users how to dump these much-needed keys. As you need a special reader, with special software to make it all work. That&#39;s pretty much a no-go for most normal users. This is where, over the last year, I have been hard at work trying to solve the problem of “How do I get these games playable again?&quot;</p><h3>The Decryption Process</h3><p>KH Coded SD card files: there are a total of 29 of them, and there are 4 different file extensions. 1 TXT, 9 DAT, 1 MV3, 18 MV1. So first I started to look into the game&#39;s code to see what it does with all these files once they are decrypted. As I was building a network server for this game, this game would always request one file first, which was this .TXT. So okay, let&#39;s start looking into that. Well, let me tell you, I knew for the longest time this file held the keys to the kingdom (I&#39;ll explain what I mean later), but figuring out how to brute force a txt file is not the simplest thing. You see, the only option I had when it came to decrypting these files was brute-forcing a 52-bit key or 72,057,594,037,927,936 keys, even if the outdated security standard is no easy feat. That&#39;s just a lot of keys to check, and that per file, which I had to do this 29 times. This is way more than I had to crack for Dirge of Cerberus, which, in terms of difficulty, was a way easier game to brute force and figure out than Coded. As you know, a TXT file can just be anything you want it to be. To bruteforce I have to know/guess what a good copy of this file might look like. Easier said than done when it&#39;s just a txt file. You see, the full game provided me some clues about what this TXT file might be, but where I really found the most help was Kingdom Hearts Coded Side Episode, which was an exclusive demo released for P-01A phone. This demo was self-contained, and being a spinoff from the real game meant it shared a lot of the same code. The difference is that it did not require any downloads. So inside the demo executable files was some txt file that helped me get an idea of what the main game file might so happen to look like. With all of this in mind, I went to work on trying to crack this all-needed TXT file. Which took many, many different attempts and fine-tuning of the algorithm I was using to detect a proper TXT file. But eventually it came down to two things. Detecting two numbers and a comma at the start of the file and then ensuring it was in SJIS format. While this meant I had to sacrifice speed for accuracy, it was something I was willing to do because I knew this file contained what I needed to know to figure out the almighty DAT files. So after a couple months I had finally cracked the key for the TXT file, and boy was it glorious.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*MvyCEaSnKl0xul-8GSdqNQ.png" /><figcaption>The top part of the TXT</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*eENlziOezlJG03I74taCzQ.png" /><figcaption>The bottom half and the most important part</figcaption></figure><p>DAT files…. There are 9 of these, all corresponding to the worlds and shared assets data used by the game. The format of these was nothing I could have ever guessed without the help of this TXT file. Above in the picture you can see a bunch of other files like a0100005.DAT, C0000999.ZLI etc. Well, the DAT I was working with was not called that. They were more generic. But this TXT file told me that inside of each of these DAT files were more files. In which case ZLI was the key here. You see, ZLI is just a random file extension. Once viewed in a hex editor, I knew these were ZLIB files. This was all thanks to the demo for providing the context clues I needed. Which thankfully ZLIB provides a consistent file signature depending on what type of compression was used, the first byte always being 0x78, and the next being the compression level. In the case of this game, they used the default compression, which was a two-byte signature of 78 9C. Looking at that text file, you can see C0000999.ZLI,569,0,569,0,173,<br>Well, pretty much this information boiled down to telling me important things like which dat file this was in, what offset in that dat file this file is located at, and how big that file is supposed to be. So you see the key for the DAT file bruteforce algorithm was this: for each of the 9 DAT find a single ZLI file inside of it using this TXT as the key. Go to that offset, try to decrypt that location using a key for the 52-bit space, and if the first two bytes were 0x789C, then we attempt a full decryption, and if we found all the files per this txt file, then we found the decryption key. Which led to me getting all of the world working and loading into the main game! <br>Decrypting all 9 DAT files was completed in roughly 8 hours thanks to 190 GPUs mostly all RTX 4090’s and 5090’s cranking out over 21K Gkeys/s which is roughly 21 TRILLION keys a second. A whole file could go from encrypted to decrypted in roughly 1.5 hours if it needs to go through 100% of the spectrum.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XwhE8Zr0TwI-1cJx6GXMcg.png" /><figcaption>Gotta go fast</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*xilKwRenLJspnwX38Gshog.png" /><figcaption>This was the first thing i saw after getting this done. I felt so happy</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*D8g-QOVG8EilY55PE-QNYg.png" /><figcaption>Seeing the world selection for the first time</figcaption></figure><p>Next we have movie files! Well, the good news is I had actually already figured out this format long ago but was not willing to spend the resources to crack them all until I had the actual game playable. These MV1 and MV3 files are just MP4 movie files in a fancy wrapper. Once I knew that it was dead simple to put together a bruteforce decryption method to look for “ftyp” which is inside of all MP4 video file headers. The bad news is there were 19 of them to decrypt. That&#39;s over double the world files. So again, it was time to spin up another 190+ GPUs to start the process of cracking these. I might have gotten super lucky here, but I was able to get these cracked within about 7 hours. Again, putting out over 21 trillion key attempts a second. <br>With these files done, that meant I now had the world&#39;s first playable copy of KH coded, extracted, and preserved for good.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOBXL2uSUi-0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOBXL2uSUi-0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOBXL2uSUi-0%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/61ee7e98cb106604eedb6789a4bb1a2e/href">https://medium.com/media/61ee7e98cb106604eedb6789a4bb1a2e/href</a></iframe><h3>The Finishing Touches</h3><p>You see, <strong>there</strong> are a couple other things worth mentioning here. One was this game that relied upon a server since it was directly connected to the KH Mobile Minigames and Avatar Kingdom. So after two years of me originally creating this server, I finally finished it so the KH Mobile universe is now all connected and alive like it was back then. You play the mini games to earn money, so you can use that money to spend inside of Avatar Kingdom or even KH Coded. <br>Lastly was making sure this game worked correctly inside of OpenDoja, an open-source emulator for everything Doja and Star Games do. Because the official SDK emulator was developed back in the early days and performed really badly for this game, like 2–3 fps bad. <br>So I spent some time fine-tuning OpenDoja to ensure it ran a nice, crisp 15 FPS (which is the max this game runs at) and that all features of it worked as intended.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*luAHVY1IDMWuaU6Ok0VZkg.png" /><figcaption>Nice 15 FPS</figcaption></figure><p>And with all that said and done, that it. Kingdom Hearts Coded for Keitai is now <strong>preserved and available</strong> for everyone to finally enjoy in this world.</p><p>All said and done, this project cost me well over <strong>2,000 USD</strong> in server costs to crack the keys to everything here. But again, it was well worth it to preserve history. I would do this again if I had to if such an important game needed saving.</p><p>Special thanks to the couple of folks who lent their GPUs out for brute-forcing. <br>Then finally Aid1043 (who translated the demo and is a trusted member in the community) is in the process of working on the English translation for this, so expect that sometime in the future. Hopefully wont be too long!</p><p>Thanks again for reading such a long post!</p><p>You can find me over on these platforms if you like what I do.<br>Twitter: <a href="https://x.com/YuviApp">https://x.com/YuviApp</a> <br>BlueSky: <a href="https://bsky.app/profile/yuvi.app">https://bsky.app/profile/yuvi.app</a>|<br>YouTube: <a href="https://www.youtube.com/@YuviApp">https://www.youtube.com/@YuviApp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ff715e4ea18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Story to Save a Couple of Lost Keitai Games.]]></title>
            <link>https://medium.com/@yuviapp/the-story-to-save-a-couple-of-lost-keitai-games-1be4ede27c75?source=rss-dbecd3b5c1fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/1be4ede27c75</guid>
            <dc:creator><![CDATA[Yuvi]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 01:13:09 GMT</pubDate>
            <atom:updated>2026-08-03T01:13:09.858Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iUUi_pPWAv1xlVw_.jpg" /></figure><p>Here I was back in 2024 browsing the Twitter like I normally do, and I saw this post from someone called RockmanCosmo (which I had followed previously) asking if anyone would be willing to join the team to help on recently recovered Before Crisis Final Fantasy VII. Me being me, I jumped in headfirst, and well, that game is doing okay, and we are making progress all the time. However, something else occurred during this same time: we were given the full version of Dirge of Cerberus: Lost Episode. Naoya Shinota had been in talk with a person who had the full version for many years before they were nice enough to dump their SD card. The only issue is that these SD cards are encrypted. “No problem,” we said; we had a solution for this. However, the issue we had was that we needed a special partition from the SD card to start the brute-force process to find the keys.</p><p>This was the first time we have encountered such an issue, because normally we are the ones who have possession of the SD card, so we could get the secret key needed. And well, unfortunately, even two years later we never got that. So this past week I said enough is enough; I’m going to solve this issue. We have the data; we just need to unencrypt it. Let&#39;s figure out how.</p><p>We had only two ways to accomplish this.</p><p>One was to find out how the encryption worked and then do it in reverse. Unfortunately, that’s not very easy; we have tried to find this for many years now and have had no luck doing so, because, unfortunately, the phone held the kinds to kingdom, and we are sure that the simcard and many other steps were taken to generate the master key to the SD Card.</p><p>Option two… Manually brute-force each file on ourself and figure it out. So this sounds easy in premise, right? Just brute force the key. Well, that’s not how this really works, unfortunately. In order for us to brute force something, we have to know what a known-good looks like. Which allows us to test a small handful of bytes against the known good so we can see if we decrypted it. Testing to many bytes, though, would slow the performance of this attack to be way too slow to be feasible.</p><p>The problem is these keitai games had no standard system for storing data; they could just be blobs of random data, and we have no idea what to do. Thankfully we can do one thing, which is inspect the game and see what it does with this SD card data, which loads after it’s decrypted. Thankfully I got lucky that DoC was only partially obfuscated, which made this process significantly easier. We could see it had a file called &quot;MountSdFileSystem.&quot; After some investigating, Dirge of Cerberus was pretty clear about what it did, which was it took every file it downloaded and saved to the SD card, encrypted it, and then when it was time to load it, it was decrypted and then processed as a zip file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D4VKRFVVj1mWOL88MXzYAw.png" /></figure><p>“Eurica!” That’s the simple key to Dirge of Cerberus; we simply just need to test a couple of bytes against known good PKZIP headers. Simple enough. Well, that’s where the next issue comes from. You see, the TKURE (the encryption key) in this case was big, like 0xFFFFFFFFFFFFFF or 72,057,594,037,927,935 but remember we needed to do this for every file which is well that very big number multiplied by 16. If you look at that number and give it to an RTX 5090 and ask it to crack it, you would be looking at roughly 130 GKeys/sec for 7 days of non-stop cracking to solve just 1 file. Not even knowing if you had the right variables set for it to find it. So I did what any sane person would do and just went crazy at figuring this out. So I started out with my 3 machines that were doing roughly 100 G-Keys a sec and let that run until I finally cracked the first key. “Perfect,” I said, thinking about how it was done for the SD cards. I was like, “Now we can assume the keys might be next to this one.” But alas, no avail. No matter how long and hard you search nearby, the first key you would find would be nothing. So that meant one thing. I needed to brute force all TKURES 1 by 1.</p><p>The process and program I was using could only decrypt via one computer at a time. I set out to make my own distributed brute-force program that would allow me to send jobs to machines over the internet to start mining for the right key. I did just that; I made my own optimized brute-force software that used OpenCL as a base. For every machine I could join to my software, it would send out 100 blocks to have that machine attempt the decrypt, and if it found it, it would send it back to my server and then automatically move onto the next one. There became one issue here. I felt like I couldn’t just ask people to install my software and trust me that I was not mining bitcoin, while also telling them, “I am working on a secret project; trust me, bro.” Thankfully I am quite trusted in the community, so I was able to get a few people to help, like Naoya and Tofu, who were gracious enough to lend out 3 GPUs to help with the task. But even with all those and mine, we will still be looking at maybe 3 months to get this done. So I did want any engineer of my caliber to do it. I made a GPU farm, and no, I am not joking. I spun up well over 90 GPU Servers to crunch these numbers so fast, spanning from RTX 4090s, A4000s, A4500s, A5000s, RTX 6000s H200, and more. To the point I had over 125 active clients crunching away. All of these combined, I was putting out nearly 5,500 GKeys/s. That’s well over 70x as fast as my single 7900XTX could put out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*keJ3NZUySgQncK7aJL55eQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*19Rj0dkIe9G-NueozC-G7g.png" /></figure><p>Seriously, for all 1 million blocks, it could crunch through those in less than 4 hours.<br>The next biggest problem was, well, these cost a lot of money to run. Well, you would be right, but thankfully I made some really good optimizations in my code to help “get lucky” and solve the key faster. You see, for every machine that would join, we would perform a round-robin on the blocks we would mine. The pattern would be the first 100 blocks from the very start, the next 100 from the end going backwards, the next 100 from the middle going to the end, and the next 100 from the middle going to the start. Because patterns started to develop that a lot of these keys were near the end, start, or the middle. So this had saved me a significant amount of time with decrypting. All said and done, this cluster and software I made had chomped through and found all the decryption keys in roughly 72 hours. I loved to see the next time I have to use this go even faster!</p><p>Now, I’m not going to lie and say it was still cheap; in total, this endeavor to save one game cost me well over $900 dollars, all said and done. But in my books it was well worth something we may have never had the opportunity of getting again.</p><p>I am going to wrap this up and say that Dirge of Cerberus: Lost Episodes—the full game—has now been officially preserved and is playable for everyone.</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUfpwhMTwMgM&amp;type=text%2Fhtml&amp;schema=youtube&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUfpwhMTwMgM" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a94fcb90e3909f7d587c6d47fb9a8d7b/href">https://medium.com/media/a94fcb90e3909f7d587c6d47fb9a8d7b/href</a></iframe><p>This is not where the story ends, though; some of you might know of another game that was preserved around this same time, and we struggled with the same issue. All I can say is stay tuned… It&#39;s being worked on, while it is a little bit more complicated than DoC, I&#39;ve already figured it out, and it will be getting released when it&#39;s done. Expect another story from me when that happens. I have a lot more to say.</p><ul><li>Yuvi</li></ul><p><a href="https://x.com/YuviApp">https://x.com/YuviApp<br></a><a href="https://bsky.app/profile/yuvi.app">https://bsky.app/profile/yuvi.app</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/0*ipnrei8jYvhIYJ0t" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1be4ede27c75" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>