|
No, I was trying to show OP how to do the conversion. The brevity came about because a) I had no idea what all the extra code was there for, and b) that's all it takes.
|
|
|
|
|
Thanks so much! I need to study how that operator works
|
|
|
|
|
The left shift operator is equivalent to multiplying by a power of two. So left shifting the total by 1 bit, multiplies it by two. An alternative way of looking at it is that you are just putting the binary ones and zeros into a number in the same order as the characters in the string.
|
|
|
|
|
I wanted to add X button for each tab. The drawMode is OwnerDrawFixed. it works fine if it left to right. Once I allow RightToLeftLayout = true and RightToLeft = true, it does not look good because that he still adds the string from left to right, while that tab add from right to left.
How do I make it that string will also be right to left?
Thanks.
private void addCloseButton(object sender, DrawItemEventArgs e)
{
e.Graphics.DrawString("x", e.Font, Brushes.Black, e.Bounds.Right - 15 , e.Bounds.Top +4 );
e.Graphics.DrawString(this.tabControl1.TabPages[e.Index].Text, e.Font, Brushes.Black, e.Bounds.Left+4, e.Bounds.Top+4);
e.DrawFocusRectangle();
}
private void actionClose(object sender, MouseEventArgs e)
{
for (int i = 0; i < this.tabControl1.TabPages.Count; i++)
{
Rectangle r = tabControl1.GetTabRect(i);
Rectangle closeButton = new Rectangle(r.Right - 15, r.Top + 4, 12, 10);
if (closeButton.Contains(e.Location))
{
if (MessageBox.Show("?האם אתה רוצה לסגור טאב זה", "אישור", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
this.tabControl1.TabPages.RemoveAt(i);
break;
}
}
}
}
|
|
|
|
|
I want to open a form in an existing tab page by pressing on a button outside of the tabcontrol. If I opened a few tabs and to example the third tab is currently open and I click on a button to open a form, then the form will open in the current tab, that is third tab. Also the tab gets the name of the form that opens. The new form will replace the existing form in the current tab page.
How do I do this?
Thanks.
|
|
|
|
|
i found the answer.
NewForm childForm = new NewForm ();
childForm.TopLevel = false;
int curr = tabControl1.SelectedIndex;
TabPage tbp = tabControl1.TabPages[curr];
tabControl1.TabPages.Contains(tbp);
tabControl1.TabPages[curr].Text = "name of new form";
tbp.Controls.Add(childForm);
childForm.WindowState = FormWindowState.Maximized;
childForm.Show();
Refresh();
|
|
|
|
|
What is the purpose of this statement?
tabControl1.TabPages.Contains(tbp);
/ravi
|
|
|
|
|
hello hello sir i want to make a sms application in c# using AT command but while i plugged the GSM modem into the computer it doesnot work properly what should i do sir??
|
|
|
|
|
aawajaarughat wrote: doesnot work properly
It's not clear what do you mean by that! Do you have some error or wrong behavior? Pleas add more details...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
aawajaarughat wrote: it doesnot work properly
Well, you could start be explaining in a little more depth in what way it doesn't work properly.
Remember that we can't see your screen, access your HDD, or read your mind - so we only get to work with what you tell us. So the relevant code you used, any error messages, what it did that you didn't expect, or didn't do that you did: these are all important, and without them we really can't be much help at all...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
How would I go about making a program to convert this file
eg:
00000000 44 58 45 00 46 07 00 00 00 00 00 00 00 00 00 00 01 75 6E 69 74 73 2E DXE.F............units.
00000017 74 79 70 65 73 2E 42 61 73 65 00 01 75 6E 69 74 73 2E 65 78 74 65 6E types.Base..units.exten
0000002E 73 69 6F 6E 73 2E 44 61 6D 61 67 65 00 01 75 6E 69 74 73 2E 65 78 74 sions.Damage..units.ext
00000045 65 6E 73 69 6F 6E 73 2E 54 72 61 6E 73 70 6F 72 74 00 01 43 6F 6E 74 ensions.Transport..Cont
0000005C 61 69 6E 65 72 73 00 01 49 6E 70 75 74 00 01 57 6F 72 6C 64 00 01 41 ainers..Input..World..A
00000073 70 70 6C 69 63 61 74 69 6F 6E 00 01 4D 61 74 68 00 01 47 6C 6F 62 61 pplication..Math..Globa
0000008A 6C 00 01 53 6F 75 6E 64 00 01 4C 6F 63 61 6C 69 7A 65 72 00 01 4E 65 l..Sound..Localizer..Ne
000000A1 74 77 6F 72 6B 00 04 41 6D 6D 6F 53 75 70 70 6C 79 44 65 73 63 72 69 twork..AmmoSupplyDescri
000000B8 70 74 6F 72 00 03 EF 01 00 00 69 6E 69 74 00 03 F7 01 00 00 64 65 73 ptor......init......des
000000CF 74 72 6F 79 00 03 FB 01 00 00 63 72 65 61 74 65 5F 65 78 74 65 6E 73 troy......create_extens
000000E6 69 6F 6E 00 05 04 41 6D 6D 6F 53 75 70 70 6C 79 00 02 5F 62 61 73 65 ion...AmmoSupply.._base
000000FD 00 02 5F 65 78 74 00 02 5F 75 6E 69 74 00 02 5F 75 76 64 00 02 5F 73 .._ext.._unit.._uvd.._s
00000114 75 70 70 6C 79 5F 65 76 65 6E 74 00 02 5F 73 65 74 5F 74 6F 5F 73 75 upply_event.._set_to_su
0000012B 70 70 6C 79 00 02 5F 69 67 6E 6F 72 65 5F 77 65 61 70 6F 6E 00 03 1E pply.._ignore_weapon...
00000142 02 00 00 73 75 70 65 72 00 03 29 02 00 00 69 6E 69 74 00 03 85 02 00 ...super..)...init.....
00000159 00 75 70 64 61 74 65 00 03 8D 02 00 00 73 65 74 5F 74 6F 5F 73 75 70 .update......set_to_sup
00000170 70 6C 79 00 03 6D 03 00 00 75 73 65 00 00 03 2A 04 00 00 63 68 65 63 ply..m...use...*...chec
00000187 6B 5F 75 73 61 62 6C 65 5F 6D 65 73 73 61 67 65 00 03 D4 04 00 00 65 k_usable_message......e
0000019E 6D 70 74 79 5F 75 70 64 61 74 65 00 03 D8 04 00 00 64 61 6D 61 67 65 mpty_update......damage
000001B5 5F 65 78 70 6C 6F 73 69 6F 6E 00 03 E0 04 00 00 65 78 70 6C 6F 64 65 _explosion......explode
000001CC 00 03 E4 04 00 00 61 69 72 73 74 72 69 6B 65 00 03 ED 04 00 00 64 65 ......airstrike......de
000001E3 73 74 72 6F 79 00 03 1D 05 00 00 73 61 76 65 00 03 06 06 00 00 6C 6F stroy......save......lo
000001FA 61 64 00 05 00 27 02 27 02 27 02 0A 00 27 00 0A 00 27 02 27 02 0C 0D ad...'.'.'...'...'.'...
00000211 00 2D 00 2C 69 6E 69 74 00 10 00 2E 10 01 2E 0A 2E 2D 03 2F 29 1D 02 .-.,init.........-./)..
00000228 00 00 27 02 0A 00 27 00 0E 00 29 28 02 00 00 0A 00 27 02 27 02 0F 00 ..'...'...)(.....'.'...
0000023F 0C 00 00 2C 42 61 73 65 00 2D 00 2C 69 6E 69 74 00 10 01 2E 2D 01 2F ...,Base.-.,init....-./
00000256 28 0F 02 10 01 28 0F 01 10 00 28 0F 04 07 00 00 00 00 00 28 0F 05 09 (....(....(........(...
0000026D 28 0F 06 07 00 00 00 00 00 28 0F 03 0E 02 2C 76 65 68 69 63 6C 65 5F (........(....,vehicle_
00000284 64 61 74 61 00 2F 28 0B 29 84 02 00 00 27 02 0A 00 27 04 27 04 27 04 data./(.)....'...'.'.'.
0000029B 0A 00 27 03 27 03 0C 06 00 2C 64 65 62 75 67 00 07 41 6D 6D 6F 54 72 ..'.'....,debug..AmmoTr
000002B2 75 63 6B 3A 3A 73 65 74 5F 74 6F 5F 73 75 70 70 6C 79 28 29 00 2E 2D uck::set_to_supply()..-
000002C9 01 15 0F 05 10 00 28 10 00 2B 19 03 00 00 29 CC 02 00 00 0E 02 2C 62 ......(..+....)......,b
000002E0 61 73 65 5F 64 61 74 61 00 2C 75 73 61 62 6C 65 00 08 28 0E 02 2C 75 ase_data.,usable..(..,u
000002F7 73 61 62 6C 65 5F 64 61 74 61 00 2C 68 6F 76 65 72 5F 63 68 65 63 6B sable_data.,hover_check
0000030E 5F 66 75 6E 63 74 69 6F 6E 00 08 28 0F 04 10 01 28 0F 06 10 02 28 29 _function..(....(....()
00000325 69 03 00 00 0E 02 2C 62 61 73 65 5F 64 61 74 61 00 2C 75 73 61 62 6C i.....,base_data.,usabl
0000033C 65 00 09 28 0E 02 2C 75 73 61 62 6C 65 5F 64 61 74 61 00 2C 68 6F 76 e..(..,usable_data.,hov
00000353 65 72 5F 63 68 65 63 6B 5F 66 75 6E 63 74 69 6F 6E 00 09 28 0F 04 07 er_check_function..(...
0000036A 00 00 00 00 00 28 0F 06 07 00 00 00 00 00 28 27 03 0A 00 27 01 27 01 .....(........('...'.'.
00000381 0C 06 00 2C 64 65 62 75 67 00 07 4D 75 6C 65 3A 3A 75 73 65 28 29 2C ...,debug..Mule::use(),
00000398 20 5F 73 75 70 70 6C 79 5F 65 76 65 6E 74 3D 00 0E 04 16 07 20 5F 69 _supply_event=..... _i
000003AF 67 6E 6F 72 65 5F 77 65 61 70 6F 6E 3D 00 16 0E 06 16 2E 2D 01 15 0C gnore_weapon=......-...
000003C6 0B 00 2C 73 65 72 76 65 72 00 2D 00 2C 66 72 6F 6D 5F 63 6C 69 65 6E ..,server.-.,from_clien
000003DD 74 5F 61 73 6B 5F 66 6F 72 5F 69 6E 76 65 6E 74 6F 72 79 5F 75 6E 69 t_ask_for_inventory_uni
000003F4 74 00 08 2E 2D 01 15 0E 04 2B 26 04 00 00 29 F7 03 00 00 0C 0B 00 2C t...-....+&...).......,
0000040B 73 65 72 76 65 72 00 2D 00 2C 66 72 6F 6D 5F 63 6C 69 65 6E 74 5F 61 server.-.,from_client_a
00000422 63 74 69 76 61 74 65 5F 65 76 65 6E 74 00 0E 04 2E 2D 01 15 27 01 0A ctivate_event....-..'..
00000439 00 27 01 27 01 0C 06 00 2C 64 65 62 75 67 00 07 4D 75 6C 65 3A 3A 63 .'.'....,debug..Mule::c
00000450 68 65 63 6B 5F 75 73 61 62 6C 65 5F 6D 65 73 73 61 67 65 28 29 00 2E heck_usable_message()..
00000467 2D 01 15 0C 0A 00 2C 6C 6F 6F 6B 75 70 00 07 6D 65 73 73 61 67 65 5F -.....,lookup..message_
0000047E 74 6F 5F 72 65 73 75 70 70 6C 79 00 2E 2D 01 2C 72 65 70 6C 61 63 65 to_resupply..-.,replace
00000495 00 07 3C 2A 3E 00 00 2E 0C 08 00 2C 69 6E 70 75 74 5F 6D 61 6E 61 67 ..<*>......,input_manag
000004AC 65 72 00 2C 5F 62 69 6E 64 69 6E 67 73 00 2C 67 65 74 5F 62 75 74 74 er.,_bindings.,get_butt
000004C3 6F 6E 5F 74 72 61 6E 73 6C 61 74 65 64 5F 6E 61 6D 65 00 2F 2E 2D 02 on_translated_name./.-.
000004DA 2F 29 D3 04 00 00 27 01 0A 00 27 00 0A 00 27 02 27 02 27 02 0A 00 27 /)....'...'...'.'.'...'
000004F1 00 0A 00 27 00 0E 0F 2D 00 15 0A 00 27 00 27 01 11 00 0E 02 2C 76 65 ...'...-....'.'.....,ve
00000508 68 69 63 6C 65 5F 64 61 74 61 00 2F 28 0E 00 2C 64 65 73 74 72 6F 79 hicle_data./(..,destroy
0000051F 00 2D 00 15 0F 00 0A 28 0F 02 0A 28 0A 00 27 01 27 01 27 02 0C 06 00 .-.....(...(..'.'.'....
00000536 2C 64 65 62 75 67 00 07 4D 75 6C 65 3A 3A 73 61 76 65 28 29 00 2E 2D ,debug..Mule::save()..-
0000054D 01 15 11 01 0E 02 2C 76 65 68 69 63 6C 65 5F 64 61 74 61 00 2F 28 10 ......,vehicle_data./(.
00000564 00 2C 73 61 76 65 00 07 73 65 74 5F 74 6F 5F 73 75 70 70 6C 79 00 2E .,save..set_to_supply..
0000057B 0E 05 2E 2D 02 15 10 00 2C 73 61 76 65 00 07 73 75 70 70 6C 79 5F 65 ...-....,save..supply_e
00000592 76 65 6E 74 00 2E 0E 04 2E 2D 02 15 10 00 2C 73 61 76 65 00 07 75 73 vent.....-....,save..us
000005A9 61 62 6C 65 00 2E 0E 02 2C 62 61 73 65 5F 64 61 74 61 00 2C 75 73 61 able....,base_data.,usa
000005C0 62 6C 65 00 2F 2E 2D 02 15 10 00 2C 73 61 76 65 00 07 68 6F 76 65 72 ble./.-....,save..hover
000005D7 5F 63 68 65 63 6B 5F 66 75 6E 63 74 69 6F 6E 00 2E 0E 02 2C 75 73 61 _check_function....,usa
000005EE 62 6C 65 5F 64 61 74 61 00 2C 68 6F 76 65 72 5F 63 68 65 63 6B 5F 66 ble_data.,hover_check_f
00000605 75 6E 63 74 69 6F 6E 00 2F 2E 2D 02 15 27 01 0A 00 27 01 27 01 0C 06 unction./.-..'...'.'...
0000061C 00 2C 64 65 62 75 67 00 07 4D 75 6C 65 3A 3A 6C 6F 61 64 28 29 00 2E .,debug..Mule::load()..
00000633 2D 01 15 0E 0A 10 00 2C 6C 6F 61 64 00 07 73 65 74 5F 74 6F 5F 73 75 -......,load..set_to_su
0000064A 70 70 6C 79 00 2E 2D 01 2F 2E 10 00 2C 6C 6F 61 64 00 07 73 75 70 70 pply..-./...,load..supp
00000661 6C 79 5F 65 76 65 6E 74 00 2E 2D 01 2F 2E 10 00 2C 6C 6F 61 64 00 07 ly_event..-./...,load..
00000678 69 67 6E 6F 72 65 5F 77 65 61 70 6F 6E 00 2E 2D 01 2F 2E 2D 03 15 0E ignore_weapon..-./.-...
0000068F 02 2B 01 07 00 00 29 8A 06 00 00 0E 02 2C 62 61 73 65 5F 64 61 74 61 .+....)......,base_data
000006A6 00 2C 75 73 61 62 6C 65 00 10 00 2C 6C 6F 61 64 00 07 75 73 61 62 6C .,usable...,load..usabl
000006BD 65 00 2E 2D 01 2F 28 0E 02 2C 75 73 61 62 6C 65 5F 64 61 74 61 00 2C e..-./(..,usable_data.,
000006D4 68 6F 76 65 72 5F 63 68 65 63 6B 5F 66 75 6E 63 74 69 6F 6E 00 10 00 hover_check_function...
000006EB 2C 6C 6F 61 64 00 07 68 6F 76 65 72 5F 63 68 65 63 6B 5F 66 75 6E 63 ,load..hover_check_func
00000702 74 69 6F 6E 00 2E 2D 01 2F 28 29 42 07 00 00 0C 06 00 2C 65 72 72 6F tion..-./()B......,erro
00000719 72 00 07 54 68 65 20 41 6D 6D 6F 53 75 70 70 6C 79 20 64 69 64 20 6E r..The AmmoSupply did n
00000730 6F 74 20 6C 6F 61 64 20 69 74 73 20 75 73 61 62 6C 65 20 69 6E 66 6F ot load its usable info
00000747 20 72 69 67 68 74 00 2E 2D 01 15 27 01 0A 00 right..-..'...
to this file
eg:
import units.types.Base;
import units.extensions.Damage;
import units.extensions.Transport;
import Containers, Input;
import World, Application, Math, Global, Sound;
import Localizer;
import Network;
class AmmoSupplyDescriptor
{
init( node, c_desc ) {}
destroy() {}
create_extension( ext, unit )
{
return AmmoSupply().init( ext, unit, void );
}
}
class AmmoSupply
{
object _base;
object _ext;
object _unit;
object _uvd;
object _supply_event;
object _set_to_supply;
object _ignore_weapon;
super()
{
return _base;
}
init( ext, unit )
{
_base := Base.Base().init( unit );
_unit := unit;
_ext := ext;
_supply_event := "";
_set_to_supply := false;
_ignore_weapon := "";
_uvd := _unit.vehicle_data;
return this;
}
update( unit, ext, time, rel_time ) {}
set_to_supply( switch, event_name, ignore_weapon )
{
Application.debug("AmmoTruck::set_to_supply()");
_set_to_supply := switch;
if( switch )
{
_unit.base_data.usable := true;
_unit.usable_data.hover_check_function := true;
_supply_event := event_name;
_ignore_weapon := ignore_weapon;
} else {
_unit.base_data.usable := false;
_unit.usable_data.hover_check_function := false;
_supply_event := "";
_ignore_weapon := "";
}
}
use( unit )
{
Application.debug( "Mule::use(), _supply_event="+ _supply_event+ " _ignore_weapon="+_ignore_weapon );
Network.server().from_client_ask_for_inventory_unit( true );
if( _supply_event )
{
Network.server().from_client_activate_event( _supply_event );
}
}
check_usable_message( unit )
{
Application.debug( "Mule::check_usable_message()");
return Localizer.lookup( "message_to_resupply" ).replace( "<*>", Global.input_manager._bindings.get_button_translated_name );
}
empty_update() {}
damage_explosion( damage, position) {}
explode() {}
airstrike()
{
explode();
}
destroy()
{
object uvd := _unit.vehicle_data;
_base.destroy();
_base := void;
_unit := void;
}
save( data )
{
Application.debug( "Mule::save()" );
object uvd := _unit.vehicle_data;
data.save( "set_to_supply", _set_to_supply );
data.save( "supply_event", _supply_event );
data.save( "usable", _unit.base_data.usable );
data.save( "hover_check_function", _unit.usable_data.hover_check_function );
}
load( data )
{
Application.debug( "Mule::load()" );
set_to_supply( data.load( "set_to_supply" ), data.load( "supply_event" ), data.load( "ignore_weapon" ) );
if( _unit )
{
_unit.base_data.usable := data.load( "usable" );
_unit.usable_data.hover_check_function := data.load( "hover_check_function" );
} else {
Application.error("The AmmoSupply did not load its usable info right");
}
}
}
|
|
|
|
|
Your question is lacking some important detail. What format is the first file in? What is the purpose of this conversion?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I do believe it is what you see when opening a compiled DLL in notepad, so an ILL decompiler is what he is looking for I think!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It isn't, it doesn't have a PE header or anything like that, and I would be able to read it. It's some weird unknown format.
And of course he opened it with a hex editor
|
|
|
|
|
That looks interesting, but I couldn't find out what type of file it was. The closest I got was "maybe some type of Ghost Recon mission script", without any explanation as to how those things work.
Purely going by the contents, I guess that
1 introduces an import
2 introduces a field declaration
3 introduces a method declaration
4 "opens" a class declaration
5 "closes" a class declaration
It's a little tricky to read it like this, I'm used to being able to select the text and see the corresponding bytes highlighted.
|
|
|
|
|
You are exactly right, with your explenation it is a ghost recon Advanced warfighter 2
Deisel script file, I have a console aplication that compiles file extention *.dsf to *.dxe
that is what you see in hex is the dxe file.
What I am working on is decompileing them back to dsf
here is some of the c# code I have so far:
MainForm.cs
namespace DxeDasm
{
public partial class MainForm : System.Windows.Forms.Form
{
private System.Windows.Forms.TreeNode lastNode { get; set; }
private string file_path { get; set; }
private object new_node { get; set; }
[System.Flags]
public enum FileFlags
{
Import = 0x01,
Field = 0x02,
Class = 0x03,
Assembly = 0x04,
Script = 0x05
}
public MainForm()
{
InitializeComponent();
}
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private void Openfile(string file)
{
treeView1.Nodes.Clear();
lastNode = new System.Windows.Forms.TreeNode(System.IO.Path.GetFileName(file_path));
treeView1.Nodes.Add(lastNode);
var d = new dxe_dasm.Program.ScriptDecompiler();
d.FoundClassCallback = new dxe_dasm.Program.ScriptDecompiler();
d.FoundMethodCallback = new dxe_dasm.Program.ScriptDecompiler();
d.FoundMemberVarCallback = new dxe_dasm.Program.ScriptDecompiler();
d.FoundGlobalVarCallback = new dxe_dasm.Program.ScriptDecompiler();
d.FoundImportCallback = new dxe_dasm.Program.ScriptDecompiler();
d.FoundEndOfCassCallback = new dxe_dasm.Program.ScriptDecompiler();
d.DecompileHeader = file;
richTextBox1.Text = d.Decompile(new_node);
}
public void CallbackFoundClass(string file)
{
System.Windows.Forms.TreeNode new_node = null;
new_node = new System.Windows.Forms.TreeNode();
lastNode.Nodes.Add(new_node);
lastNode = new_node;
}
public void CallbackFoundMethod(string file)
{
}
public void CallbackFoundVarMember(string file)
{
}
public void CallbackFoundVarGlobal(string file)
{
}
public void CallbackFoundImport(string file)
{
}
public void CallbackFoundEndOfClass(string file)
{
}
}
}
Program.cs
namespace DxeDasm
{
static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
internal class ScriptDecompiler
{
public ScriptDecompiler FoundClassCallback;
public ScriptDecompiler FoundEndOfCassCallback;
public ScriptDecompiler FoundGlobalVarCallback;
public ScriptDecompiler FoundImportCallback;
public ScriptDecompiler FoundMemberVarCallback;
public ScriptDecompiler FoundMethodCallback;
}
internal object DecompileHeader
{
set
{
if (value == null)
{
throw new ArgumentNullException("file");
}
else
{
throw new NotImplementedException();
}
}
}
public string Decompile(object o)
{
throw new NotImplementedException();
}
}
}
}
some help with this would be great
my program will load a dxe file and decompile it bakk to dsf
I'm going to have to use some java code for the script enum though
I'm also studying up on decompilation_thesis Reverse Conpilation Techniques by Cristina Cifuentes
I will be applying alot of her techniques in the control flow graph
aswell as some techniques from Redgates .net decompiler
I hope some fellow programmers can help me with this task.
thank you
|
|
|
|
|
It would be easier to help if you had a specific problem that you needed help with, giving help at random harder.
But I can make a couple of remarks.
Making several instances of the decompiler to bind to the different callbacks is probably a bad thing. The decompiler object has to receive all those callbacks, otherwise it effectively only sees part of the script.
Also, this
[System.Flags]
public enum FileFlags
{
Import = 0x01,
Field = 0x02,
Class = 0x03,
Assembly = 0x04,
Script = 0x05
}
is weird. The flags attribute is meant to be used for enums that contains a bunch of power of two's that can be combined, and that's not what this enum is.
|
|
|
|
|
Well,
That's the problem I'm having. I need a better way to find the opcodes from the dxe file.
cause right now I'm just trying to guess what they are.
can you help with that?
|
|
|
|
|
You can just infer them, right? Compile some simple stuff and see what comes out.
I suppose I can take an other look though. It would be more convenient if I had an actual file.
|
|
|
|
|
Here is the same file Ammosupply.hex = Ammosupply.dxe
you can import it into a hex editor then save it as a .dxe
hence: Ammosupply.dxe
:020000040000FA
:1000000044584500460700000000000000000000C2
:1000100001756E6974732E74797065732E42617305
:10002000650001756E6974732E657874656E736909
:100030006F6E732E44616D6167650001756E697442
:10004000732E657874656E73696F6E732E5472616A
:100050006E73706F72740001436F6E7461696E65C8
:1000600072730001496E7075740001576F726C6491
:1000700000014170706C69636174696F6E00014DBD
:100080006174680001476C6F62616C0001536F75A9
:100090006E6400014C6F63616C697A657200014E99
:1000A0006574776F726B0004416D6D6F537570707E
:1000B0006C7944657363726970746F720003EF0149
:1000C0000000696E69740003F701000064657374D1
:1000D000726F790003FB0100006372656174655FF4
:1000E000657874656E73696F6E000504416D6D6FA0
:1000F000537570706C7900025F6261736500025F16
:1001000065787400025F756E697400025F757664CD
:1001100000025F737570706C795F6576656E740050
:10012000025F7365745F746F5F737570706C7900D4
:10013000025F69676E6F72655F776561706F6E00F1
:10014000031E02000073757065720003290200002F
:10015000696E6974000385020000757064617465DE
:1001600000038D0200007365745F746F5F737570B8
:10017000706C7900036D0300007573650000032A3D
:10018000040000636865636B5F757361626C655F33
:100190006D6573736167650003D4040000656D705D
:1001A00074795F7570646174650003D8040000643D
:1001B000616D6167655F6578706C6F73696F6E0004
:1001C00003E00400006578706C6F64650003E4046C
:1001D0000000616972737472696B650003ED04005D
:1001E0000064657374726F7900031D05000073610C
:1001F00076650003060600006C6F61640005002749
:1002000002270227020A0027000A00270227020C01
:100210000D002D002C696E69740010002E10012E47
:100220000A2E2D032F291D02000027020A00270095
:100230000E0029280200000A00270227020F000CE6
:1002400000002C42617365002D002C696E697400FA
:1002500010012E2D012F280F021001280F01100070
:10026000280F04070000000000280F0509280F06CA
:10027000070000000000280F030E022C7665686955
:10028000636C655F64617461002F280B2984020030
:100290000027020A002704270427040A002703274F
:1002A000030C06002C64656275670007416D6D6F75
:1002B000547275636B3A3A7365745F746F5F7375EC
:1002C00070706C792829002E2D01150F051000285B
:1002D00010002B1903000029CC0200000E022C6232
:1002E0006173655F64617461002C757361626C6534
:1002F0000008280E022C757361626C655F6461747E
:1003000061002C686F7665725F636865636B5F661A
:10031000756E6374696F6E0008280F041001280F52
:100320000610022829690300000E022C6261736521
:100330005F64617461002C757361626C65000928EB
:100340000E022C757361626C655F64617461002CD0
:10035000686F7665725F636865636B5F66756E6311
:1003600074696F6E0009280F040700000000002860
:100370000F060700000000002827030A00270127B6
:10038000010C06002C646562756700074D756C658D
:100390003A3A75736528292C205F737570706C79F3
:1003A0005F6576656E743D000E041607205F696711
:1003B0006E6F72655F776561706F6E3D00160E0639
:1003C000162E2D01150C0B002C73657276657200CC
:1003D0002D002C66726F6D5F636C69656E745F6172
:1003E000736B5F666F725F696E76656E746F72793C
:1003F0005F756E697400082E2D01150E042B2604FE
:10040000000029F70300000C0B002C736572766561
:1004100072002D002C66726F6D5F636C69656E747F
:100420005F61637469766174655F6576656E74009B
:100430000E042E2D011527010A00270127010C06A5
:10044000002C646562756700074D756C653A3A6308
:100450006865636B5F757361626C655F6D6573730F
:100460006167652829002E2D01150C0A002C6C6F80
:100470006F6B757000076D6573736167655F746F8F
:100480005F7265737570706C79002E2D012C72652A
:10049000706C61636500073C2A3E00002E0C08006A
:1004A0002C696E7075745F6D616E61676572002C8A
:1004B0005F62696E64696E6773002C6765745F6262
:1004C0007574746F6E5F7472616E736C6174656461
:1004D0005F6E616D65002F2E2D022F29D304000061
:1004E00027010A0027000A002702270227020A0024
:1004F00027000A0027000E0F2D00150A00270027ED
:100500000111000E022C76656869636C655F646199
:100510007461002F280E002C64657374726F79006B
:100520002D00150F000A280F020A280A00270127AC
:100530000127020C06002C646562756700074D7583
:100540006C653A3A736176652829002E2D011511E4
:10055000010E022C76656869636C655F6461746185
:10056000002F2810002C7361766500077365745F97
:10057000746F5F737570706C79002E0E052E2D02EE
:100580001510002C736176650007737570706C79B7
:100590005F6576656E74002E0E042E2D0215100018
:1005A0002C736176650007757361626C65002E0EB1
:1005B000022C626173655F64617461002C75736104
:1005C000626C65002F2E2D021510002C736176656C
:1005D0000007686F7665725F636865636B5F667559
:1005E0006E6374696F6E002E0E022C757361626CFF
:1005F000655F64617461002C686F7665725F636823
:1006000065636B5F66756E6374696F6E002F2E2D68
:10061000021527010A00270127010C06002C64653A
:1006200062756700074D756C653A3A6C6F616428B6
:1006300029002E2D01150E0A10002C6C6F6164002C
:10064000077365745F746F5F737570706C79002EDB
:100650002D012F2E10002C6C6F61640007737570D4
:10066000706C795F6576656E74002E2D012F2E10EB
:10067000002C6C6F6164000769676E6F72655F774D
:100680006561706F6E002E2D012F2E2D03150E0249
:100690002B01070000298A0600000E022C626173FC
:1006A000655F64617461002C757361626C65001034
:1006B000002C6C6F61640007757361626C65002EBD
:1006C0002D012F280E022C757361626C655F6461C9
:1006D0007461002C686F7665725F636865636B5F39
:1006E00066756E6374696F6E0010002C6C6F6164C8
:1006F0000007686F7665725F636865636B5F667538
:100700006E6374696F6E002E2D012F282942070039
:10071000000C06002C6572726F7200075468652029
:10072000416D6D6F537570706C7920646964206ED3
:100730006F74206C6F6164206974732075736162DB
:100740006C6520696E666F207269676874002E2D73
:06075000011527010A005B
:00000001FF
modified 18-Feb-14 10:20am.
|
|
|
|
|
Well, not with the hexeditor I'm using, apparently. Why not just post a link to the raw file?
|
|
|
|
|
I'm using BreakPoint Software Hex Workshop v6.7
you can import:
Hex Code(*.hex) 8 bit 16 bit 32 bit
Motorola S-Records(*.S19,*.S28,*S.37,*.mot)
you can export:
ANSI Text(*.txt)
UTF-8 Text(*.txt)
Unicode Text(*.txt)
HTML (*.htm,*.html)
RTF (*.rtf)
C Source (*.c,*.cpp)
Java Source (*.java)
Hex String (*.txt)
Hex Code(*.hex) 8 bit 16 bit 32 bit
Motorola S-Records(*.S19,*.S28,*S.37)
Base 64 Encoding (*.b64)
UUEncode (*.uue)
An awesome program
on the last reply I hit email
didn't that email you?
|
|
|
|
|
daddy356 wrote: on the last reply I hit email
didn't that email you? Maybe, you did email me and I emailed back.
Seriously though, just post the file. There are like a million file lockers that you could use, and dropbox. Or email it to me, that's fine too.
|
|
|
|
|
All right, here are a couple of findings.
07 makes a string
2C seems to access named fields/functions
0E XX loads a field of a this object? XX is index of field?
06 starts the body of a function?
0A ends the body of a function?
29 4A has something to do with returning?
29 5B has something to do with branching?
I'm not sure about anything any more. Especially not what happens to integers. I've tried many forms of "return 12345" and the results are just .. weird.
|
|
|
|
|
I have no Idea how you got that info
but it will be real usefull
I know that the code is within the console application
it just needs to be reversed
thank you
|
|
|
|
|