as you know , with asm language you can make some tricks to preform something.
so i used goto to put some data after it , then when trying to use this data , we get NULL.
for Example:
imports('msvcrt.dll')
{
function printf(char* format[]): Int32; cdecl;
}
goto @end
char* str1 = 'this well not seen by ziron';
............
............
@end:
ebx=@str1;
printf('%s',[Ebx]);
this will print null , but this of course work
imports('msvcrt.dll')
{
function printf(char* format[]): Int32; cdecl;
}
char* str1 = 'this well not seen by ziron';
goto @end
........
........
@end:
ebx=@str1;
printf('%s',[Ebx]);
program WIN32CUI 'Test';
#include 'ch.zir';
imports('msvcrt.dll')
{
function printf(char* format[]): Int32; cdecl;
}
ebx = @str;
printf('%s\r\n', ebx);
wait_key();
ExitProcess(0);
// we put data here for erasing goto statment.
@str:
emit byte "t","e","s","t",0;
so the big trick here , can we use a label as a variable ?
ok , but how to put the address of another labels to make array of pointer.
for Example
@Str2:
emit byte "t","e","s","t","2",13,10,0;
@Str3:
emit byte "t","e","s","t","3",13,10,0;
@Str4:
emit byte "t","e","s","t","4",13,10,0;
@addr:
emit dword @Str2,@Str3,@Str4,0; // how can we make that