
BV1pV411y7co 中提到的软件,脚本,以及扩展阅读和之前的专栏纠错

软件:
quickbms: https://aluigi.altervista.org/quickbms.htm
assetstudio:https://github.com/Perfare/AssetStudio
或 https://www.perfare.net/1194.html
hcadecoder:https://github.com/Nyagamon/HCADecoder/releases/tag/v1.21
(非必要)推荐软件:
免费,开源,跨平台的声音录制编辑软件 audacity:
https://www.audacityteam.org/
功能强大,插件丰富的免费音频播放器 foobar2000
https://www.foobar2000.org/

脚本:
链接: https://pan.baidu.com/s/1bwYef1O6L_fQUpk_iuz8gw 提取码: 2543
粘贴后保存为.txt或.bms即用:
PJSK.TXT

get FNAME FILENAME
get SIZE ASIZE
log MEMORY_FILE 0 SIZE
math SIZE - 4
set TEMP byte 0
goto 4
savepos MEMORY
for i = 1 < 128
goto MEMORY
if TEMP <= 4
get TEMPB byte
goto MEMORY
set TEMPBB byte 255
math TEMPBB - TEMPB
putvarchr MEMORY_FILE MEMORY TEMPBB
endif
math TEMP + 1
if TEMP == 8
set TEMP byte 0
endif
math MEMORY + 1
next i
goto 0
log FNAME 4 SIZE -1

PJS_ACB.txt

set HCA binary \x2E\x68\x63\x61
set V binary \x5f
math COUNT = 0
get BNAME basename
string BNAME > 4
string BNAME + V
do
math COUNT + 1
findloc MEMORYA binary \x48\x43\x41\x00
math TEMP = MEMORYA
math TEMP + 4
goto TEMP
findloc MEMORYB binary \x48\x43\x41\x00 0 -1
if MEMORYB == -1
get MEMORYB asize
endif
findloc MEMORYUTF binary \x40\x55\x54\x46 0 -1
if MEMORYUTF != -1
if MEMORYUTF < MEMORYB
math MEMORYB = MEMORYUTF
endif
endif
math SIZE = MEMORYB
math SIZE - MEMORYA
string FNAME = BNAME
string FNAME + COUNT
string FNAME + HCA
log FNAME MEMORYA SIZE
while MEMORYB != -1


扩展阅读:
邦邦的拆包教学,我在这里知道了pjs和邦邦的hca文件用的是同一个密钥
https://home.gamer.com.tw/creationDetail.php?sn=4389201
有详尽推理思路的cgss反向笔记
https://blog.mottomo.moe/categories/Tech/RE/zh/2016-03-10-Reversing-CGSS-1/
对hca文件的研究
https://subdiox.github.io/deresute/resource/criware.html (日文)
https://blog.mottomo.moe/categories/Tech/RE/zh/2018-10-12-New-HCA-Encryption/

对之前两篇专栏(cv7962019、cv7921411)的纠错:
之前提到动作文件分类为MonoBehavior,但查到的一些资料上提到动作文件属于Animation Clip,我尝试用assetstudio提取Animation Clip,但assetstudio报错了。究竟动作文件属于哪一种,我还没能确定,它的使用方式也还没研究。