CorTruck.cob

typedef struct tagCOBHeader
{
	long VersionSignature;
	long NumberOfScripts;
	long NumberOfPieces;
	long Unknown_0;
	long Unknown_1;
	long Unknown_2; /* Always seems to be 0 */
	long OffsetToScriptCodeIndexArray;
	long OffsetToScriptNameOffsetArray;
	long OffsetToPieceNameOffsetArray;
	long OffsetToScriptCode;
	long Unknown_3; /* Always seems to point to first script name */
} COBHeader;

From CorTruct.cob:

00000000 COBHeader
  00000004  VersionSignature;
  00000003	NumberOfScripts;
  00000001	NumberOfPieces;
  000000A5	Unknown_0;
  00000000	Unknown_1;
  00000000  Unknown_2; /* Always seems to be 0 */
  000002C0	OffsetToScriptCodeIndexArray;
  000002CC  OffsetToScriptNameOffsetArray;
  000002D8  OffsetToPieceNameOffsetArray;
  0000002C	OffsetToScriptCode;
  000002DC	Unknown_3; /* Always seems to point to first script name */

Offset to a script is calculated by: OffsetToScriptCode +
(ScriptCodeIndexArray[ScriptNumber] * 4)

000002C0 ScriptCodeIndexArray
  00 00 00 00  00000000 index to SmokeUnit code
  53 00 00 00  00000053 index to Create code
  56 00 00 00  00000056 index to Killed code

000002CC ScriptNameOffsetArray
  DC 02 00 00  000002DC "SmokeUnit"
  E6 02 00 00  000002E6 "Create"
  ED 02 00 00  000002ED "Killed"

000002D8 PieceNameOffsetArray
  F4 02 00 00  000002F4 "base"

commands:

format:

one dword commands:
value    name ( <stack_in> -- <stack_out> )

two dword commands:
value    name <constant> ( <stack_in> -- <stack_out> )

where:
value          is the value in hex
name           is the name of the command
constant       is the description of the constant use by the command (if any)
stack_in       is the description of the values on the stack used by this
command
stack_out      is the description of the valuse on the stack created by this
command

1000F000 emit_sfx_from_piece <piece> ( <flags> -- )
10013000 sleep ( <time> -- )
10021001 push_constant <constant> ( -- <constant> )
10021002 push_variable <variable> ( -- <value> )
10022000 stack_allocate ( -- )
10023002 pop_variable <variable> ( <value> -- )
10033000 multiply  ( <value> <value> -- <result> )
10036000 bitwise_or ( <value> <value> -- <result> )
10041000 rand  ( <value -- )
10042000 get_unit_value ( <value_id> -- <value> )
10051000 compare_less ( <value> <value> -- <result> )
10052000 compare_less_equal ( <value> <value> -- <result> )
10064000 jump_offset <offset> ( -- )
10065000 return ( <result> -- )
10066000 jump_if_false_offset <offset> ( -- )
10071000 explode_piece <piece> ( <flags> -- )

0000002C SmokeUnit
  00 20 02 10  10022000 stack_allocate
  00 20 02 10  10022000 stack_allocate
  00 20 02 10  10022000 stack_allocate
00000038 
  01 10 02 10  10021001 push_constant
  11 00 00 00  00000011 00000011
  00 20 04 10  10042000 get_unit_value
  00 60 06 10  10066000	jump_if_false_offset
00000048 
  0D 00 00 00  0000000D 0000000D
  01 10 02 10  10021001 push_constant
  90 01 00 00  00000190 00000190
  00 30 01 10  10013000 sleep
00000058 
  00 40 06 10  10064000 jump_offset 
0000005C 
  03 00 00 00  00000003 00000003
00000060
  01 10 02 10  10021001 push_constant
  01 00 00 00  00000001 00000001
00000068 
  00 60 06 10  10066000	jump_if_false_offset
  50 00 00 00  00000050 00000050
  01 10 02 10  10021001 push_constant
  04 00 00 00  00000004 00000004
00000078 
  00 20 04 10  10042000 get_unit_value
  02 30 02 10  10023002 pop_variable
  00 00 00 00  00000000 00000000
  02 10 02 10  10021002 push_variable
00000088 
  00 00 00 00  00000000 00000000
  01 10 02 10  10021001 push_constant
  42 00 00 00  00000042 00000042
  00 10 05 10  10051000 compare_less
00000098 
  00 60 06 10  10066000	jump_if_false_offset
  39 00 00 00  00000039 00000039
  01 10 02 10  10021001 push_constant
  00 01 00 00  00000100 00000100
000000A8 
  01 10 02 10  10021001 push_constant
  02 00 00 00  00000002 00000002
  00 60 03 10  10036000 bitwise_or
  02 30 02 10  10023002 pop_variable
000000B8 
  02 00 00 00  00000002 00000002
  01 10 02 10  10021001 push_constant
  01 00 00 00  00000001 00000001
  01 10 02 10  10021001 push_constant
000000C8 
  42 00 00 00  00000042 00000042
  00 10 04 10  10041000 rand 
  02 10 02 10  10021002 push_variable
  00 00 00 00  00000000 00000000
000000D8 
  00 10 05 10  10051000 compare_less 
  00 60 06 10  10066000	jump_if_false_offset
  35 00 00 00  00000035 00000035
  01 10 02 10  10021001 push_constant
000000E8 
  00 01 00 00  00000100 00000100
  01 10 02 10  10021001 push_constant
  01 00 00 00  00000001 0000001
  00 60 03 10  10036000 bitwise_or
000000F8 
  02 30 02 10  10023002 pop_variable
  02 00 00 00  00000002 00000002
  02 10 02 10  10021002 push_variable
  02 00 00 00  00000002 00000002
00000108 
  00 F0 00 10  1000F000 emit_sfx_from_piece  
  00 00 00 00  00000000 00000000
  02 10 02 10  10021002 push_variable
  00 00 00 00  00000000	00000000
00000118 
  01 10 02 10  10021001 push_constant
  32 00 00 00  00000032 00000032
  00 30 03 10  10033000 multiply 
  02 30 02 10  10023002 pop_variable
00000128 
  01 00 00 00  00000001 00000001
  02 10 02 10  10021002 push_variable
  01 00 00 00  00000001 00000001
  01 10 02 10  10021001 push_constant
00000138 
  C8 00 00 00  000000C8 000000C8
  00 10 05 10  10051000 compare_less
  00 60 06 10  10066000	jump_if_false_offset
  4B 00 00 00  0000004B 0000004B
00000148 
  01 10 02 10  10021001 push_constant
  C8 00 00 00  000000C8 000000C8
  02 30 02 10  10023002 pop_variable
  01 00 00 00  00000001 00000001
00000158 
  02 10 02 10  10021002 push_variable
  01 00 00 00  00000001 00000001
  00 30 01 10  10013000 sleep
  00 40 06 10  10064000 jump_offset
00000168 
  0D 00 00 00  0000000D 0000000D
  01 10 02 10  10021001 push_constant
  00 00 00 00  00000000 00000000
  00 50 06 10  10065000 return

00000178 Create
  01 10 02 10  10021001 push_constant
  00 00 00 00  00000000 00000000
  00 50 06 10  10065000 return

00000184 Killed 
  00 20 02 10  10022000 stack_allocate
00000188 
  00 20 02 10  10022000 stack_allocate
  02 10 02 10  10021002 push_variable
  00 00 00 00  00000000	0
  01 10 02 10  10021001 push_constant
00000198 
  19 00 00 00  00000019 00000019
  00 20 05 10  10052000 compare_less_equal
  00 60 06 10  10066000	jump_if_false_offset
  6D 00 00 00  0000006D 0000006D
000001A8 
  01 10 02 10  10021001 push_constant
  01 00 00 00  00000001	00000001
  02 30 02 10  10023002 pop_variable
  01 00 00 00  00000001	00000001
000001B8 
  01 10 02 10  10021001 push_constant
  20 00 00 00  00000020 00000020
  01 10 02 10  10021001 push_constant
  00 01 00 00  00000100 00000100
000001C8 
  00 60 03 10  10036000 bitwise_or
  00 10 07 10  10071000 explode_piece
  00 00 00 00  00000000 00000000
  01 10 02 10  10021001 push_constant
000001D8 
  00 00 00 00  00000000 00000000
  00 50 06 10  10065000 return
  02 10 02 10  10021002 push_variable 
  00 00 00 00  00000000 00000000
000001E8 
  01 10 02 10  10021001 push_constant
  32 00 00 00  00000032 severity <= 50
  00 20 05 10  10052000 compare_less_equal
  00 60 06 10  10066000	jump_if_false_offset
000001F8 
  82 00 00 00  00000082 00000082
  01 10 02 10  10021001 push_constant
  02 00 00 00  00000002	00000002	
  02 30 02 10  10023002 pop_variable
00000208 
  01 00 00 00  00000001 00000001
  01 10 02 10  10021001 push_constant
  20 00 00 00  00000020 00000020
  01 10 02 10  10021001 push_constant
00000218 
  00 01 00 00  00000100 00000100
  00 60 03 10  10036000 bitwise_or
  00 10 07 10  10071000 explode_piece 
  00 00 00 00  00000000 00000000
00000228 
  01 10 02 10  10021001 push_constant
  00 00 00 00  00000000 00000000
  00 50 06 10  10065000 return
  02 10 02 10  10021002 push_variable
00000238 
  00 00 00 00  00000000	00000000
  01 10 02 10  10021001 push_constant
  63 00 00 00  00000063 00000063
  00 20 05 10  10052000 compare_less_equal
00000248 
  00 60 06 10  10066000	jump_if_false_offset	
  97 00 00 00  00000097 00000097
  01 10 02 10  10021001 push_constant
  03 00 00 00  00000003	00000003
00000258 
  02 30 02 10  10023002 pop_variable
  01 00 00 00  00000001 00000001
  01 10 02 10  10021001 push_constant
  20 00 00 00  00000020 00000020
00000268 
  01 10 02 10  10021001 push_constant
  00 01 00 00  00000100 00000100
  00 60 03 10  10036000 bitwise_or
  00 10 07 10  10071000 explode_piece
00000278 
  00 00 00 00  00000000 00000000
  01 10 02 10  10021001 push_constant
  00 00 00 00  00000000 00000000
  00 50 06 10  10065000 return
00000288 
  01 10 02 10  10021001 push_constant
  03 00 00 00  00000003 00000003
  02 30 02 10  10023002 pop_variable
  01 00 00 00  00000001 00000001
00000298 
  01 10 02 10  10021001 push_constant
  20 00 00 00  00000020 00000020
  01 10 02 10  10021001 push_constant
  00 01 00 00  00000100 00000100
000002A8 
  00 60 03 10  10036000 bitwise_or
  00 10 07 10  10071000 explode_piece_piece
  00 00 00 00  00000000 00000000
  01 10 02 10  10021001 push_constant
000002B8 
  00 00 00 00  00000000 00000000
  00 50 06 10  10065000 return