Project Decompilator qb script

Discuss thaw modding, post your own, share your ideas, ask questions.
b4k3r.dll
Posts: 6
Joined: Mon Nov 26, 2012 8:18 pm
Location: localhost
Contact:

Project Decompilator qb script

Postby b4k3r.dll » Sun Sep 21, 2014 7:05 pm

Hello guys, i make qb decompilator, because i found only compilator from skejt23.
In the bottom i add my project in c++ with .exe and example .qb code. I define all codes from http://thmods.com/forum/viewtopic.php?f=6&t=26
I'm doing right? I have problem with test qb script ( you must download file and to test yourself ) i don't know what it ts -> 10 00 39 16, so program return error. You can update source file.

Now program haven't compilator, only parser. When parser will work, i create compilator function in class CDecompiler.

I use Code::Blocks but in DevC++ it's too working.

== EDIT
okey 39 is NOT and 16 is NEW_ADRESS, but what it is in code? : 10 00 , 0f 00 , 4b 00
code:

Code: Select all

01 16 07 63  7d 4c 01 47
39 16 4b 6b  da 94 01 16
55 2c 3c 09  01 28 01 47
0f 00 16 60  7e b8 9c 01
16 3d 21 6e  0a 01 28 01
47 4b 00 16  31 21 7b 43
4a 18 00 00  00 00 00 00
01 00 08 00  00 00 00 1b
00 00 af 98  c6 40 8b 2d
58 47 00 00  00 00 01 16
b6 e9 15 3c  4a 18 00 00
00 00 00 00  01 00 08 00
00 00 00 1b  00 00 af 98
c6 40 8b 2d  58 47 00 00
00 00 01 28  01 24

Code: Select all

01 - NEW_INSTRUCT = :i
16 - NEW_ADDRES = $[value]$
07 63 7d 4c - ADDRESS - push to stack

01 - NEW_INSTRUCT = :i
47 - I_IF = IF
10 00 - ??
39 - E_NOT = NOT
16 - NEW_ADDRES = $[value]$
4b 6b da 94 - ADDRESS - push to stack

01 - NEW_INSTRUCT = :i
16 - NEW_ADDRES = $[value]$
55 2c 3c 09 - ADDRESS - push to stack

01 - NEW_INSTRUCT = :i
28 - I_ENDIF = endif

01 - NEW_INSTRUCT = :i
47 - I_IF = IF
0f 00 - ??
16 - NEW_ADDRES = $[value]$
60 7e  b8 9c - ADDRESS - push to stack

01 - NEW_INSTRUCT = :i
16 - NEW_ADDRES = $[value]$
3d 21 6e 0a - ADDRESS - push to stack

01 - NEW_INSTRUCT = :i
28 - I_ENDIF = endif

01 - NEW_INSTRUCT = :i
47 - I_IF = IF
4b 00 - ??
16 - NEW_ADDRES = $[value]$
31 21 7b 43 - ADDRESS - push to stack

4a - SCRIPT_STRUCT_ITEAM = ?
18 00 - (byte count/pointer to the next instruction) = ?
00 00 00 - null bytes = ?
00 00 01 00 - start of the byte count = ?
08 00 00 00 - pointer to byte 8 = ?
.... i don't know what now:

1b 00
00 af 98 c6  40 8b 2d 58
47 00 00 00  00 01 16 b6
e9 15 3c 4a  18 00 00 00
00 00 00 01  00 08 00 00
00 00 1b 00  00 af 98 c6
40 8b 2d 58  47 00 00 00
00 01 28 01  24

Code: Select all

:i $[07637d4c]$
:i if NOT $[4b6bda94]$
   :i $[552c3c09]$
:i endif
:i if $[607eb89c]$
   :i $[3d216e0a]$
:i endif
:i if $[31217b43] I DON'T KNOW WHAT'S NOW
Attachments
Decompilator THAW.rar
(395.86 KiB) Downloaded 457 times
Image You never know who’s on the other side.";
„Imagination is more important than knowledge” ~Einstein
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Project Decompilator qb script

Postby WhoElseButMe » Sun Sep 21, 2014 9:52 pm

ifs elses have a 2 byte value that represents the size of the if block or else block
1000 is that value
preceding it was a 0147 or if NOT whatever
07 is equals youre wrong about so much its not even funny

oh and instruction 4A do a search for it on the forums to better understand what they are and how to handle them
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.

Return to “THAW modding”

Who is online

Users browsing this forum: No registered users and 36 guests