-1

I'm new to this type of programming, but proficient in web development... looking to expand my palette a little.

I have this file. In Windows 7 the file properties window claims its a 'system file', my assumption is that this is a generic description and isn't particularly useful, no file extention. This file resides on a usb drive which Windows machines can boot to to run various scripts and applications.

How can I determine what type of file this is and is it possible to de-compile it to view its code or even if that's possible? Sorry for two separate questions, a point in the right direction would be very helpful!

Thanks!

Joe
  • 103
  • 3
  • Reverse compiling executable gives you a mountain of borderline meaningless garbage. Unless you're a very experienced programmer, making sense of this is nearly impossible - you end up with lines like `float_37 = function_22(int_13, int_5, char_27)`. You mention that this process runs scripts - you might just have text-based scripts that are sitting on the device. If you tried manually opening them in a text editor, you might find that they're just text files you can work with normally. – Sean McSomething Oct 10 '13 at 16:58
  • I would advise like everbody else, don't bother. It's not worth the effort. You can always try googling to find more information. – Joe McCay Oct 11 '13 at 04:20

1 Answers1

3
  1. File extensions normally tell the end user and the operating system what type of file it is. In your case, maybe the file extension was hidden by windows(in this case, it is a SYS file), or maybe it was flagged with a "System" File Attribute(Thanks to Hellion for the added info). If your case was the former, Here is a description for the SYS File Format for windows devices. Although to be fair, There are also cases where the file type doesn't necessarily speak the truth of the file's file type as mentioned by FrustratedWithFormsDesigner. i.e. You can change the file extension of an XML file and fool the computer and probably other users, but it does little to hide that its still an XML file when you open it with a text editor nor does it magically turn your XML file into an executable or C file etc. (Thanks to FrustratedWithFormsDesigner for the example.) This isn't always the case, but it does happen.

  2. Decompiling executables and binaries are normally ill advised as they don't produce a 100% copy of the original source code. It might give you a hint on what the code does if documen1tation doesn't already exist but there also lies a chance that the output will just confuse you especially if you are not proficient in the source language you are decompiling the binary to.

So in case you wanted to study system programming, I would suggest looking for opensource applications and binaries instead of trying to decompile the internals of your flash drive's driver files. Probably try using linux as well, being an opensource OS, you can take a look at how everything was built from the source instead of trying to pull your hair out trying to figure out how to get a decompiler to give you more readable code. Not to mention that linux is also well documented so that should save you a lot of time trying to understand what a line of code means and/or does.

Maru
  • 1,402
  • 10
  • 19
  • 2
    You're forgetting about the "System" file attribute flag that can be set (along with Hidden, Archived, Read-Only, etc.); that causes the file to show up as a "System file" regardless of file extension, if the "show hidden files, folders, and drives" option is set. – Hellion Oct 10 '13 at 16:39
  • @Hellion, Thanks for the information. I totally didn't know about that. Edited my answer to include File Attributes – Maru Oct 10 '13 at 16:54
  • 1
    File extensions are more of a hint to the operating system than a rigidly enforced rule. If I change a valid XML file to be "MyFile.java", it doesn't magically become a valid Java code file, it's still XML. – FrustratedWithFormsDesigner Oct 10 '13 at 18:37
  • @FrustratedWithFormsDesigner, thanks for the correction. I have updated my answer to include your comment – Maru Oct 11 '13 at 00:52