Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
BeaEngine committed Aug 5, 2019
1 parent b14efa0 commit 1592e39
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doc/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ void DisassembleCode(char *start_offset, char *end_offset, int (*virtual_address
while (!infos.Error){
infos.SecurityBlock = (int) end_offset - infos.EIP;
if (infos.SecurityBlock <= 0 ){
(void) printf("buffer end reached \n");
break;
}
len = Disasm(&infos);
switch(infos.Error)
{
Expand Down Expand Up @@ -272,9 +276,10 @@ int main(void)
pBuffer = malloc(300);
(void) memcpy (pBuffer, main, 300);
(void) printf("Display only Instructions modifying RAX. \n");
DisassembleCode (pBuffer, (char*) pBuffer + 299, main);
DisassembleCode (pBuffer, (char*) pBuffer + 300, main);
return 0;
}
```

# 6. How to decode instructions and 'follow' unconditional branch instructions
Expand Down

0 comments on commit 1592e39

Please sign in to comment.