How to extract program code from ISO file - data-mining

In the Xbox 360 game Project Sylpheed: Arc of Deception. There are secret sub objectives for each level. On stage 11 "Flaming Clouds" there are 4, I have found two sources claiming they know each of them, but is actually untrue. One is still hidden. This is a very unpopular game, and no one has investigated it, and I want to know what it is. I have a disk image file of the game (ISO file). How would I go about finding the level trigger for the sub objective? I have already attempted to extract the 7gb iso using 7zip and Winrar, but each yielded the same 12mb files that contain nothing relevant what so ever. Obviously the core of the information is hidden and remains unextracted. Please advise.

https://wincdemu.sysprogs.org/ or linux/mac mount -o loop /path/to/my-iso-image.iso /mnt/iso
from there you're going to need a reverse compiler probabably but I don't know what your game is written in. You might luck out and find the levels coded in lua or something though.
Something else that can be happening is 7zip is actually opening the iso right, and the 12mb could be instructions to go download the actual game code from somewhere else. That sometimes happens with consoles.

Related

Program I just made is apparently a virus? C++

Okay so I just made a C++ program that is basically a notebook,
you write stuff in it and it saves it to a .dat file and then you can
read it later.
I compiled it with Microsoft Visual C++ and now I sent it to a friend and it's
saying that it is a virus? I scan it online and it also says that it's a virus.
I don't know why this is happening, as I literally just used some if/else statements, created some strings and used a couple getlines. (and fstream to create the .dat files).
This is the virus report: https://www.virustotal.com/en/file/a1b72280a32915429607fd5abeef1aad4f8310867df1feb7707ea0f7a404026e/analysis/1455735299/
Here is my code. (Its 400+ lines). And I'm almost certain there's nothing wrong
with it. http://pastebin.com/ZwJZrRSu
Any idea why this is happening?
Most probably your PC is already infected by a virus, which adds itself to any executable it can find on your machine. That would easily explain this behavior. Try to compile the same program on PC that is clean for sure and check your PC by antivirus.
I am not sure but I think it because you imported kernel32.dll
Again, it is hard to tell without the source
Also take a look at the file detail in the report

Allegro 5 ALLEGRO_BITMAP to text file

I'm currently working on a video game project in C++ using Allegro 5 as my graphics library. I store my graphic and font assets in subfolders within the root folder of the .exe. To use them in the program, I have an initGraphics() function that loads all the required assets through al_load_bitmap(), and then later free up the memory with al_destroy_bitmap(). This means however that when I eventually distribute my game, it'll be super easy for anyone to go into the install folder and just edit the graphics to be whatever, and I'm having trouble finding any kind of help regarding how to prevent this.
What I was thinking maybe is some kind of program that I'd run on my own computer before distribution that loads the appropriate graphical assets, and somehow converts them into a .txt file, then changing the main game executable's 'initGraphics()' function to load and use those instead of just the raw .png files, but I'm not sure if this is possible. Any information about this type of conversion would be hugely appreciated, or alternatively a more reliable tested method that achieves the same effect. Thank you very much in advance!
While researching the internet I've found interesting solution:
Allegro5 uses PhysicsFS library to handle file archives. It does not support password protected archives, but you can calculate md5 for your assets archive and hardcode it into your program and then compare it on runtime (source - see more here).
See this part of documentation of Allegro5.
Example explanation of md5 implementation is here

How do you code into an mp3 file?

I'm interested in creating a drm type program. I want to put code into an mp3 file that checks online to see if it is licensed out. The online aspect is not something I'm concerned with at the moment, but I've looked online for some resource on doing this, but I've found nothing really that useful. There are people talking about viruses, but I want this to be intentional and not malicious. Simply when you play the the mp3 it quickly checks online to see if the license is actually allowed to play. If it is it plays if it isn't it gives an error and says either you need to log on or buy the song.
I'm pretty sure this is impossible. mp3 files can't contain executable code. They could contain byte data that could represent code, but the mp3 player would need to interpret it as such and execute it instead of trying to play it as music, which no player does. You would have to program your own player to do this, but since there's no way to constrain an mp3 file to only one player (again, because they can't contain code), you'd have to create your own competing standard. Further, there would be nothing preventing someone from converting this mp3 to a normal non-constrained mp3 and sharing it.
From a less technical standpoint, as a user (who despises DRM) it would irk me to no end if an mp3 was checking up on whether I was "allowed" to have it, and even more so if I was required to be online in order to listen to it, to the point that I would just delete it and never buy/download/steal anything in that format again.
(Does this count as an answer? It was too long for a comment.)
Its surely possible but very difficult. Im not very experienced in coding but using discord i was able to turn an mp3 file into a txt file, But the problem is that it becomes strange characters

Following the flow of code

I'm trying to learn the level format in one of my favourite games, which is almost totally undocumented. Basically the only document that describes the level format is simply by saying things like First 12 bytes: header 4 following bytes: number of materials x next bytes: array of materials, and things like that.
I'm very inexperienced in hex and don't completely understand what they're saying. However, there is a level editor, and the source is freely available on google code. I was thinking of adding this in to my visual studio and trying to learn the level format by reading how the level editor opens the files.
However, another problem, I don't know c++ (I know python). This means I probably won't be able to locate which part of the code reads the bytes and whatnot.
What I'm looking for, is something that will allow me to follow the flow of the code, in its execution. Essentially something that acts similar to setting a breakpoint on every line, and having it show me what specific portion of code is executing when reading the file contents.
However, obviously setting breakpoints on every line is very messy and slow. I'm looking for something that will simply show me what code is being run when I open the file in the editor.
Does anyone know what I could do? Thanks.
You're looking for a feature to step from one statement to the next; every debugger I know has such a feature. You start by setting a single breakpoint at the beginning of the interesting region, and starting from there you "step" through your code.
E.g. in Visual C++ 2010, the key F10 does one step; you can also "step into" the next statement (e.g. a method call) with F11.
In your case, set the breakpoint to where the reading of the level file starts, and continue from there. To find the place where the file is read can be a hard problem as well - depending on the clearness of the code; but if it's well written code, there should be a method with "read" in the name or "load" or something similar - you'll figure it out!
You might have to know at least some basic C++ syntax to be able to follow what's going, though.
I would also recommend reading up on Debugging HowTo's (e.g this one).
The document wich you find so obscure, is just the level format specifications, in most cases the specifications are all you need. You need as well some little extra experience with file reading.
When reading a file you have to warry about few things.
1) When reading byte by byte (8 bits) order is no changed.
2) When reading 32bits at a time byte order can change according to endianness of machine.
(for example 0x12345678 becomes 0x78563412 when endiannes changes)
There was a very old tutorial that can help you loading 3D models that helped me to start working with files:
http://www.spacesimulator.net/wiki/index.php?title=Tutorials:3ds_Loader
this is usefull because you have part of the specifications (like in original documentation) and it shows how you can create a loader just starting from specifications. That's all you need. That's C but there is no big difference from C++ in this case.
If you need some other simple file format specification with related file loader for making things clearer to you, you can also look at libktx and ktx specifications:
http://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/
If I remember correctly there's also a unofficial C++ KTX loader you can look at if you itend to write C++ oop code rather than C.

SDL_Mixer sound problems

Basic Info:
Programming Language - C++
Platform - Windows
Audio Formats - wav and mid
I recently finished a game and was fooling around with figuring out the best way to upload it to a file hosting site. I eventually decided on using 7zip's self-extracting feature. However, I think the mistake I made was that instead of just copying what I needed to another folder and zipping that up for the distribution (i.e., not copying source files, etc.) I rearranged the actual folder that held all of my source files etc. and split it into 2 sub folders for the C++ files, and then everything else (that folder being the one that got zipped up.)
I tested downloading it and playing it and it worked fine. However, I went back because I decided to change the background music and that's when the problem started happening.
To sum the problem up, Mix_PlayMusic() is being called and is working correctly. However, for some reason no sound is playing (and neither are any of the sound effects called from Mix_PlayChannel()). The odd thing is that you can hear the music when Mix_FadeOutMusic() is called. I also have a sound toggling feature, but after thorough testing I've come to the conclusion that it isn't the problem.
I finally decided to create a completely new project and just bring all of the files I needed into that project in the same "organization" that they were in originally. However, the problem is still there.
I have no idea what's wrong. The files are being loaded in fine, it's just that when the music is supposed to be playing (and according to testing it is), it's not playing. This also applies to sound effects.
Edit: I actually wrote a test for each game loop for whether the music is playing and apparently the music is playing. It's just that for some reason it isn't being heard.
This could be a number of things. It could be an issue with the SDL_Mixer library you have, so you could try getting it again to rule that out. Your volume may have somehow got set to zero somewhere, so I would check the volume as a test. And the final thought would be that the source sound file you are playing is incompatible in some way (not likely if you can play it in another sound player, but possible). Besides those suggestions I don't believe I can help you any further with the data you have provided.