Jump to content

Recommended Posts

Posted (edited)

Hi everyone, i have posted this topic on Xentax before it got shut down but nobody answered so i thought i will upload it here, far as i know a .dante file before its compiled is a moddified (Terminal Reality made there own launguage called DANTE Scripting so its kinda moddified) C# .script file. So my question is, is it possible to decompile the dante files and recompile .script files

 

Here is a sample (Contains and .dante file and .script)

https://www.mediafire.com/file/ksg0txmmh95e8l0/.DANTE_AND_.SCRIPT.rar/file

Edited by sakis720
  • 1 month later...
  • 3 months later...
  • 1 year later...
Posted
Dante is custom script based virtual machine, it compiles down to assembly but down to a custom bytecode that a virtual machine runs.

Here is some of my discoveries: 

The functions that are in the script file they start in the dante file in BEGIN EXPORTS

(abyss.dante)
C 00000000 "void setupLevel()"
C 0000020F "void checkpoint_BeginLevel()"
C 00000212 "void checkpoint_Architect()"
C 00000226 "void main()"
...

If you take for example 20F from "C 0000020F "void checkpoint_BeginLevel()"" it will take you in the start of the function.

20F: 101 20
211: 0
212: 101 20
214: 686 0 0
217: 686 0 0
21A: 1186 C 0 0
21E: 186 10
220: 4A3D 0 0 14 8
225: 0

They are a lot of op codes that I haven't understand yet but I know 2 of them.

101 20 //ENTER 32
0 //RET

Also I believe 4A3D is call function. Here is a example:

If you go to BEGIN FIXUPS you will see a lot of function and some strange numbers like @1D09, it means at 1D08 what I mean.

N "void displayMessage(EHudMessage,String,float)"
	@1D09
	@1EB8
	@3099

//C 00001A2B "void ShandorIntro()"
1D08: 4A3D 0 0 18 C

//C 00001A2B "void ShandorIntro()"
1EB7: 4A3D 0 0 150 144

//C 00001A2B "void ShandorIntro()"
3098: 4A3D 0 0 14 8

Here is another example:

N "void awardAchievement(int)"
	@3D64
	@3E10

//C 00003B7C "void warpAllToBeginning()"
3D63: 4A3D 0 0 C 8

//C 00003DC4 "void EndLevel()"
3E0F: 4A3D 0 0 C 8

Also I opened the game in IDA and the 8 is the achievement number named eAchievementWeCameWeSaw and its awarded when you beat the game so it would match the level abyss.dante which is the last level.

Found this in the multiplayer portion of the game on xbox 360 pdb, I don't if its any useful:
enum EDanteOpcode : __int32
{
  eDanteOpcode_RET = 0x0,
  eDanteOpcode_ENTER = 0x1,
  eDanteOpcode_BEGINTHREAD = 0x2,
  eDanteOpcode_DTR = 0x3,
  eDanteOpcode_DTR_S = 0x4,
  eDanteOpcode_TRY = 0x5,
  eDanteOpcode_MOV_4 = 0x6,
  eDanteOpcode_MOV_V = 0x7,
  eDanteOpcode_MOV_S = 0x8,
  eDanteOpcode_CVT_I_F = 0x9,
  eDanteOpcode_CVT_F_I = 0xA,
  eDanteOpcode_CVT_S_I = 0xB,
  eDanteOpcode_CVT_S_F = 0xC,
  eDanteOpcode_CVT_S_B = 0xD,
  eDanteOpcode_CVT_S_V = 0xE,
  eDanteOpcode_LEA = 0xF,
  eDanteOpcode_ENDTRY = 0x10,
  eDanteOpcode_ADD_I = 0x11,
  eDanteOpcode_ADD_F = 0x12,
  eDanteOpcode_ADD_V = 0x13,
  eDanteOpcode_ADD_S = 0x14,
  eDanteOpcode_SUB_I = 0x15,
  eDanteOpcode_SUB_F = 0x16,
  eDanteOpcode_SUB_V = 0x17,
  eDanteOpcode_MUL_I = 0x18,
  eDanteOpcode_MUL_F = 0x19,
  eDanteOpcode_MUL_VF = 0x1A,
  eDanteOpcode_DOT_V = 0x1B,
  eDanteOpcode_DIV_I = 0x1C,
  eDanteOpcode_DIV_F = 0x1D,
  eDanteOpcode_DIV_VF = 0x1E,
  eDanteOpcode_MOD_I = 0x1F,
  eDanteOpcode_MOD_F = 0x20,
  eDanteOpcode_JL_I = 0x21,
  eDanteOpcode_JL_F = 0x22,
  eDanteOpcode_JLE_I = 0x23,
  eDanteOpcode_JLE_F = 0x24,
  eDanteOpcode_JEQ_I = 0x25,
  eDanteOpcode_JEQ_F = 0x26,
  eDanteOpcode_JEQ_V = 0x27,
  eDanteOpcode_JEQ_S = 0x28,
  eDanteOpcode_JEQ_B = 0x29,
  eDanteOpcode_JNE_I = 0x2A,
  eDanteOpcode_JNE_F = 0x2B,
  eDanteOpcode_JNE_V = 0x2C,
  eDanteOpcode_JNE_S = 0x2D,
  eDanteOpcode_JNE_B = 0x2E,
  eDanteOpcode_SL_I = 0x2F,
  eDanteOpcode_SL_F = 0x30,
  eDanteOpcode_SLE_I = 0x31,
  eDanteOpcode_SLE_F = 0x32,
  eDanteOpcode_SEQ_I = 0x33,
  eDanteOpcode_SEQ_F = 0x34,
  eDanteOpcode_SEQ_V = 0x35,
  eDanteOpcode_SEQ_S = 0x36,
  eDanteOpcode_SEQ_B = 0x37,
  eDanteOpcode_SNE_I = 0x38,
  eDanteOpcode_SNE_F = 0x39,
  eDanteOpcode_SNE_V = 0x3A,
  eDanteOpcode_SNE_S = 0x3B,
  eDanteOpcode_SNE_B = 0x3C,
  eDanteOpcode_CALL = 0x3D,
  eDanteOpcode_CTR = 0x3E,
  eDanteOpcode_CTR_S = 0x3F,
  eDanteOpcode_CAST = 0x40,
  eDanteOpcode_ALLOCTHREAD = 0x41,
};


I currently don't know how BEGIN ASSUMPTIONS or BEGIN STRINGS work.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...