Skip to Content
Learning Malware Analysis
book

Learning Malware Analysis

by Monnappa K A
June 2018
Beginner
510 pages
13h 7m
English
Packt Publishing
Content preview from Learning Malware Analysis

10. Structures

A structure groups different types of data together; each element of the structure is called a member. The structure members are accessed using constant offsets. To understand the concept, take a look at the following C program. The simpleStruct definition contains three member variables (ab, and c) of different data types. The main function defines the structure variable (test_stru) at ➊, and the address of the structure variable (&test_stru) is passed as the first argument at ➋ to the update function. Inside of the update function, the member variables are assigned values:

struct simpleStruct{  int a;  short int b;  char c;};void update(struct simpleStruct *test_stru_ptr) { test_stru_ptr->a = 6; test_stru_ptr->b = 7; test_stru_ptr->c ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Malware Analysis

Practical Malware Analysis

Michael Sikorski, Andrew Honig
Mastering Malware Analysis

Mastering Malware Analysis

Alexey Kleymenov, Amr Thabet
Evasive Malware

Evasive Malware

Kyle Cucci

Publisher Resources

ISBN: 9781788392501Other