Nibiru GRP: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>WATTO
No edit summary
imported>Ikskoks
No edit summary
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== GRP ==
{{GRAFPageHeader}}


* ''' Format Type ''':    Archive <br>
== GRP ==
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>
{{GRAFPageMisc}}


=== Format Specifications ===
{{GRAFPageFormat|1=
char {16}&nbsp;&nbsp;&nbsp; - ID {{Constant|("AGDS group file" 1a)}} {{InlineComment|(encrypted)}}<br>
uint32 {4}&nbsp;&nbsp; - Header length {{Constant|(44)}}<br>
uint32 {4}&nbsp;&nbsp; - Signature {{Constant|(0x1a03c9e6)}}<br>
uint32 {4}&nbsp;&nbsp; - Version {{Constant|(2)}}<br>
uint32 {4}&nbsp;&nbsp; - Number of used entries<br>
uint32 {4}&nbsp;&nbsp; - Number of entries<br>
uint32 {4}&nbsp;&nbsp; - Archive time 1 {{InlineComment|(time_t, seconds since 1970-01-01 00:00:00.000)}}<br>
uint32 {4}&nbsp;&nbsp; - Archive time 2 {{InlineComment|(time_t, seconds since 1970-01-01 00:00:00.000)}}<br>
{{BlockDescription|// for each used file entry}}<br>
:char {33}&nbsp;&nbsp;&nbsp; - File name {{InlineComment|(zero-terminated, encrypted)}}<br>
:uint32 {4}&nbsp;&nbsp; - Offset<br>
:uint32 {4}&nbsp;&nbsp; - Size<br>
:uint32 {4}&nbsp;&nbsp; - File time {{InlineComment|(time_t, seconds since 1970-01-01 00:00:00.000)}}<br>
:uint32 {4}&nbsp;&nbsp; - {{Unknown}}<br>
byte {x}&nbsp;&nbsp;&nbsp;&nbsp; - Padding until first file offset {{InlineComment|(empty file entries)}}<br>
byte {x}&nbsp;&nbsp;&nbsp;&nbsp; - File data<br>
}}


=== Format Specifications ===  
=== Notes and Comments ===


<tt><b>
The encryption scheme is based on a XOR-system and the 52-character key phrase <tt>"Vyvojovy tym AGDS varuje: Hackerovani skodi obchodu!".</tt> (Probable rough translation: "AGDS development team warns: Hacking does harm to business!".)
byte {16}&nbsp;&nbsp;&nbsp; - Header <font color="purple">(<font color="purple">(bytes)</font> 232,193,205,195,181,247,251,233,170,251,166,244,182,210,221,161)</font> <br>
uint32 {4}&nbsp;&nbsp; - Length Of Archive Header <font color="purple">(44)</font> <br>
uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown: Archive Length? '' </font> <br>
uint32 {4}&nbsp;&nbsp; - Version <font color="purple">(2)</font> <br>
uint32 {4}&nbsp;&nbsp; - Number Of Files <font color="purple">(NOT including the padding entries at the end of the directory)</font> <br>
uint32 {4}&nbsp;&nbsp; - Number Of Files <font color="purple">(including padding entries at the end of the directory)</font> <br>
uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>
uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>
<br>
<font color="blue"> ''' // for each file (49 bytes per entry) ''' </font> <br>
: char {33}&nbsp;&nbsp;&nbsp; -  Encrypted Filename (see notes) <font color="purple">(null)</font> <br>
: uint32 {4}&nbsp;&nbsp; - File Offset <br>
: uint32 {4}&nbsp;&nbsp; - File Length <br>
: uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>
: uint32 {4}&nbsp;&nbsp; - null <br>
<br>
byte {X}&nbsp;&nbsp;&nbsp;&nbsp; - null padding to first file offset <br>
byte {X}&nbsp;&nbsp;&nbsp;&nbsp; - File Data <br>
</b></tt>


=== Notes and Comments ===
<tt>
<b>for</b> i := 0 <b>to</b> Length(Buffer) - 1 <b>do</b><br>
: <b>if</b> Encrypted[i] = 0 <b>then</b><br>
:: Break<br>
: <b>else</b><br>
:: Decrypted[i] := Encrypted[i] <b>xor</b> KeyPhrase[i <b>mod</b> 52] <b>xor</b> 0xff;<br>
</tt><br>
 
=== MultiEx BMS Script ===
{{NoBMSScript}}


* The original filename of each entry can be obtained by XORing the char array with the following values:
=== Supported by Programs ===
<tt>
* {{ProgramSupportGameExtracter}}
&nbsp;&nbsp;&nbsp;137, 134, 137, 144, 149, 144, 137, 134,<br>
* [http://oezmen.eu/gameresources/ GRPExt]
&nbsp;&nbsp;&nbsp;223, 139, 134, 146, 223, 190, 184, 187,<br>
&nbsp;&nbsp;&nbsp;172, 223, 137, 158, 141, 138, 149, 154,<br>
&nbsp;&nbsp;&nbsp;197, 223, 183, 158, 156, 148, ???, ???,<br>
&nbsp;&nbsp;&nbsp;???
</tt>
* Be careful to apply the decryption only up to the char before the zero terminator.
* The last three bytes are currently unknown since no observed file name reaches this particular length. The 33rd one probably does not exist at all as the last byte might be reserved for the zero terminator.
* Furthermore, the file name may start with one unprintable character. This is most probably a reference to a game engine internal numbering and can be ignored.
<br>


=== MultiEx BMS Script ===  
=== Links ===
None


Not written yet<br><br>
=== Games ===
* [[Nibiru]] [[Black Mirror]] [[GRP|*.grp]]
<br><br>


=== Compatible Programs ===


* [[Game Extractor|Game Extractor]]<br><br>
[[Category:Platform PC|Nibiru GRP]]
[[Category:Complete Almost Done|Nibiru GRP]]
[[Category:CE Encrypted|Nibiru GRP]]
[[Category:XOR encryption]]
[[Category:File Format]]

Latest revision as of 08:54, 23 April 2021

Back to index | Edit this page

GRP

Format Specifications

char {16}    - ID ("AGDS group file" 1a) (encrypted)

uint32 {4}   - Header length (44)
uint32 {4}   - Signature (0x1a03c9e6)
uint32 {4}   - Version (2)
uint32 {4}   - Number of used entries
uint32 {4}   - Number of entries
uint32 {4}   - Archive time 1 (time_t, seconds since 1970-01-01 00:00:00.000)
uint32 {4}   - Archive time 2 (time_t, seconds since 1970-01-01 00:00:00.000)
// for each used file entry

char {33}    - File name (zero-terminated, encrypted)
uint32 {4}   - Offset
uint32 {4}   - Size
uint32 {4}   - File time (time_t, seconds since 1970-01-01 00:00:00.000)
uint32 {4}   - Unknown

byte {x}     - Padding until first file offset (empty file entries)

byte {x}     - File data

Notes and Comments

The encryption scheme is based on a XOR-system and the 52-character key phrase "Vyvojovy tym AGDS varuje: Hackerovani skodi obchodu!". (Probable rough translation: "AGDS development team warns: Hacking does harm to business!".)

for i := 0 to Length(Buffer) - 1 do

if Encrypted[i] = 0 then
Break
else
Decrypted[i] := Encrypted[i] xor KeyPhrase[i mod 52] xor 0xff;


MultiEx BMS Script

None written yet.

Supported by Programs

Links

None

Games