fir
2017-08-19 15:39:44 UTC
i got such piece of code
char code[32] = {
0x6a, 0x00, //push 0
0x68, 0x00, 0x30, 0x40, 0x00, // push title
0x68, 0x1a, 0x30, 0x40, 0x00, // push caption
0x6a, 0x00, // push 0
0xff, 0x15, 0x70, 0x20, 0x40, 0x00, // call massageboxa
0x6a, 0x00, //push 0
0xff, 0x15, 0x68, 0x20, 0x40, 0x00, // call exit process
0x00,
0x00,
0x00,
0x00};
it would be much more handy to write something like that instead
char code[32] = {
0x6a, 0x00, //push 0
0x68, 0x00403000, // push title
0x68, 0x0040301a, // push caption
0x6a, 0x00, // push 0
0xff, 0x15, 0x00402070, // call massageboxa
0x6a, 0x00, //push 0
0xff, 0x15, 0x00402068, // call exit process
0x00,
0x00,
0x00,
0x00};
can i get something like that in c?
(yet better it woul be to have
int title = 0x00403000;
int caption = 0x0040301a;
int messageboxa = 0x00402070;
int exitprocess = 0x00402068;
char code[32] = {
0x6a, 0x00, //push 0
0x68, title , // push title
0x68, caption, // push caption
0x6a, 0x00, // push 0
0xff, 0x15, messagebox , // call massageboxa
0x6a, 0x00, //push 0
0xff, 0x15, exitprocess , // call exit process
0x00,
0x00,
0x00,
0x00};
xan i get comething like that?
if no maybe some other option? (it could be assigment even copy (some vsprintf syntax?) though assignment better yet it could be initialiser too, whats important is short syntax)
char code[32] = {
0x6a, 0x00, //push 0
0x68, 0x00, 0x30, 0x40, 0x00, // push title
0x68, 0x1a, 0x30, 0x40, 0x00, // push caption
0x6a, 0x00, // push 0
0xff, 0x15, 0x70, 0x20, 0x40, 0x00, // call massageboxa
0x6a, 0x00, //push 0
0xff, 0x15, 0x68, 0x20, 0x40, 0x00, // call exit process
0x00,
0x00,
0x00,
0x00};
it would be much more handy to write something like that instead
char code[32] = {
0x6a, 0x00, //push 0
0x68, 0x00403000, // push title
0x68, 0x0040301a, // push caption
0x6a, 0x00, // push 0
0xff, 0x15, 0x00402070, // call massageboxa
0x6a, 0x00, //push 0
0xff, 0x15, 0x00402068, // call exit process
0x00,
0x00,
0x00,
0x00};
can i get something like that in c?
(yet better it woul be to have
int title = 0x00403000;
int caption = 0x0040301a;
int messageboxa = 0x00402070;
int exitprocess = 0x00402068;
char code[32] = {
0x6a, 0x00, //push 0
0x68, title , // push title
0x68, caption, // push caption
0x6a, 0x00, // push 0
0xff, 0x15, messagebox , // call massageboxa
0x6a, 0x00, //push 0
0xff, 0x15, exitprocess , // call exit process
0x00,
0x00,
0x00,
0x00};
xan i get comething like that?
if no maybe some other option? (it could be assigment even copy (some vsprintf syntax?) though assignment better yet it could be initialiser too, whats important is short syntax)