Crc32

Doubts, help and support about QuickBMS and other game research tools
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Crc32

Post by chrrox »

How do I use the crc table from Apple
https://opensource.apple.com/source/xnu ... rn/crc32.c

I am trying to get this result

Character/cc0001_b01a.apk 00000000000000000000003566186470

The initialize value should be the string length oF Character/cc0001_b01a.apk then convert the hex to dec to get the number

https://estertion.win/2019/04/%E6%98%9F ... %E6%B3%95/
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Crc32

Post by aluigi »

I guess the crc scanning script can help without spending time about what values to use:
http://aluigi.org/bms/crc_scan.bms

Let's do it simple :)
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: Crc32

Post by chrrox »

This worked is there a cleaner way to make this OPTIONS string?

Code: Select all

set NAME string "Character/cc0001_b01a.apk"
Strlen SIZE NAME
set OPTIONS string " 32 "
string OPTIONS += SIZE
string OPTIONS += " 0 0 0 1"
encryption crc 0xedb88320 OPTIONS
string DUMMY E= NAME
print "%QUICKBMS_CRC|x%"
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Crc32

Post by aluigi »

So basically the initial value of the crc isn't 0 or -1 like all the algorithms but it's the same size of the string... interesting.

The only way to make it shorter would be using String 'p':

Code: Select all

set NAME string "Character/cc0001_b01a.apk"
string OPTIONS p " 32 %d 0 0 0 1" SIZE
encryption crc 0xedb88320 OPTIONS
string DUMMY E= NAME
print "%QUICKBMS_CRC|x%"