
Someone tool to decrypt EN files or export_import for all?
Code: Select all
__int64 __fastcall sub_140510790(__int64 a1, signed int a2)
{
__int64 v3; // r10
signed int v4; // edi
signed int v5; // esi
signed int v6; // ebp
unsigned int v7; // ebx
char *v8; // r9
signed int v9; // er11
int v10; // ecx
__int64 v11; // rdx
__int64 v12; // rax
char v13; // cl
unsigned int v15; // [rsp+20h]
v3 = a1;
v4 = 357500045;
v5 = 45339085;
v6 = 1134809849;
v7 = 1635685890;
if ( a2 > 0 )
{
v8 = (char *)&v15 - a1;
do
{
v9 = a2;
v10 = v4 ^ (v4 << 11);
v4 = v5;
v5 = v6;
v6 = v7;
v7 ^= v10 ^ ((v10 ^ (v7 >> 11)) >> 8);
if ( a2 > 4 )
v9 = 4;
v15 = v7;
v11 = v9;
if ( v9 > 0 )
{
v12 = v3;
do
{
v13 = v8[v12++];
*(_BYTE *)(v12 - 1) ^= v13;
--v11;
}
while ( v11 );
}
a2 -= v9;
v3 += 4i64;
v8 -= 4;
}
while ( a2 > 0 );
}
return 0i64;
}
Code: Select all
Usage:
xfbin_test menu.xfbin menu.xfbin.dec
xfbin_test menu.xfbin.dec menu.xfbin
Code: Select all
<?xml version="1.0" ?>
<xflst>
<xfbin name="option_button.xfbin">
Z:\char\x\option\max\steam\option_button00.mdl.xfbin
Z:\char\x\option\tex\steam\option_button03_win.tex.xfbin
Z:\char\x\option\anm\steam\option_button00.anm.xfbin
</xfbin>
<xflst>
</xflst>
Code: Select all
# CyberConnect2 CPK archives
# NARUTO SHIPPUDEN: Ultimate Ninja STORM 1,2,3_HD,4
comtype cpk
idstring "CPK "
endian big
set POS long 0x818
goto POS
get ROFF long
get SOFF long
goto 0x82C
get FILES long
xmath TMP "POS + SOFF"
math POS + ROFF
goto POS
if ROFF == 0x3F
for i = 0 < FILES
get PATHOFF long
callfunction CC2_CPK_Encryption
next i
else
set PATHOFF long 0x1A
for i = 0 < FILES
callfunction CC2_CPK_Encryption
next i
endif
startfunction CC2_CPK_Encryption
get NAMEOFF long
get SIZE long
get ESIZE long
get OFFSET longlong
get DUMMY long
savepos POS
math OFFSET + 0x800
goto OFFSET
log MEMORY_FILE OFFSET SIZE
get HDR long
if HDR == 0x8FCF3140 || HDR == 0xF0A20061 || HDR == 0x45CD364B || HDR == 0x82C83B4F
endian little
set KEY1 long 0x617E9602
set KEY2 long 0x154F048D
set KEY3 long 0x154F048D
set KEY4 long 0x617E9602
set KEY5 long 0x02B3D1CD
set KEY6 long 0x43A3D2F9
math XSIZE = SIZE
for j = 0 < SIZE
math KEY1 u>> 0xB
math KEY2 u<< 0xB
math KEY2 & 0xFFFFFFFF
math KEY2 ^ KEY3
math KEY3 = KEY5
math KEY5 = KEY6
math KEY1 ^ KEY2
math KEY6 = KEY4
math KEY1 u>> 0x8
math KEY4 ^ KEY1
math KEY4 ^ KEY2
if XSIZE > 4
math XSIZE - 4
getvarchr KEYX MEMORY_FILE j long
math KEYX ^ KEY4
putvarchr MEMORY_FILE j KEYX long
else
for k = 0 < XSIZE
getvarchr KEYX MEMORY_FILE j byte
math TMPK = KEY4
math TMPK & 0xFF
math KEYX ^ TMPK
math KEYX & 0xFF
math KEY4 u>> 0x8
putvarchr MEMORY_FILE j KEYX byte
math j + 1
next k
endif
math KEY1 = KEY4
math KEY2 = KEY3
next j + 4
endif
math PATHOFF + TMP
goto PATHOFF
getct DirName string 0
math NAMEOFF + TMP
goto NAMEOFF
getct NAME string 0
string DirName += /
string DirName += NAME
if ESIZE > SIZE
clog DirName 0 SIZE ESIZE MEMORY_FILE
else
log DirName 0 SIZE MEMORY_FILE
endif
endian big
goto POS
endfunction
sigroon365 wrote:Here is my export Tools. (I already sent it to you through private message on ZoG)
I already made it 2 months ago and Storm 1 Korean translation is almost finished..
But these days I'm busy with my jobs so I don't have enough time to make import tools.
naruto1_export.au3 works on itemtext.bin.xfbin, message.bin.xfbin, message_btl.bin.xfbin
TelopBin_export.au3 works on dioramaTelopBin.xfbin, iaTelopBin.xfbin, movieTelopBin.xfbin, spSkillTelopBin.xfbin
By the way, MissionInfo.bin.xfbin is a mess. My tool only works on PS3 JPN. But it will reads on PC.
For make export tool for PC(MissionInfo.bin), one have to change my source code.