Reverse Engineering for Beginners
CHAPTER 38. NETWORK ADDRESS CALCULATION EXAMPLE CHAPTER 38. NETWORK ADDRESS CALCULATION EXAMPLE xor ecx, ecx xor bl, bl test esi ...
CHAPTER 39. LOOPS: SEVERAL ITERATORS CHAPTER 39. LOOPS: SEVERAL ITERATORS Chapter 39 Loops: several iterators In most cases loop ...
CHAPTER 39. LOOPS: SEVERAL ITERATORS CHAPTER 39. LOOPS: SEVERAL ITERATORS for (i=0; i<cnt; i++) { a1[idx1]=a2[idx2]; idx1+=3; ...
CHAPTER 39. LOOPS: SEVERAL ITERATORS CHAPTER 39. LOOPS: SEVERAL ITERATORS GCC (Linaro) 4.9 for ARM64 does the same, but it preca ...
CHAPTER 39. LOOPS: SEVERAL ITERATORS CHAPTER 39. LOOPS: SEVERAL ITERATORS test r8, r8 ;8.14 jbe exit ; Prob 50% ;8.14 ; LOE rdx ...
CHAPTER 39. LOOPS: SEVERAL ITERATORS CHAPTER 39. LOOPS: SEVERAL ITERATORS inc r10 ;8.2 mov DWORD PTR [r9+rcx], r11d ;3.6 add r9, ...
CHAPTER 40. DUFF’S DEVICE CHAPTER 40. DUFF’S DEVICE Chapter 40 Duff’s device Duff’s device^1 is an unrolled loop with the possib ...
CHAPTER 40. DUFF’S DEVICE 7 6 5 4 3 2 1 0 CHAPTER 40. DUFF’S DEVICE ... B B B B B S S S ( “B” is number of 8-byte blocks and “S” ...
CHAPTER 40. DUFF’S DEVICE CHAPTER 40. DUFF’S DEVICE $LN5@bzero: mov BYTE PTR [rcx], 0 inc rcx $LN4@bzero: mov BYTE PTR [rcx], 0 ...
CHAPTER 41. DIVISION BY 9 CHAPTER 41. DIVISION BY 9 Chapter 41 Division by 9 A very simple function: int f(int a) { return a/9; ...
CHAPTER 41. DIVISION BY 9 CHAPTER 41. DIVISION BY 9 This is also called “strength reduction” in compiler optimizations. GCC 4.4. ...
CHAPTER 41. DIVISION BY 9 CHAPTER 41. DIVISION BY 9 instructions. The first instruction loads0x8E39into the low 16 bits of regis ...
CHAPTER 41. DIVISION BY 9 CHAPTER 41. DIVISION BY 9 41.4 How it works That’s how division can be replaced by multiplication and ...
CHAPTER 41. DIVISION BY 9 CHAPTER 41. DIVISION BY 9 41.4.1 More theory It works, because that is how it’s possible to replace di ...
CHAPTER 41. DIVISION BY 9 CHAPTER 41. DIVISION BY 9 Listing 41.8: Optimizing MSVC 2012 x64 f1234 PROC mov rax, 76537544292862969 ...
CHAPTER 42. STRING TO NUMBER CONVERSION (ATOI()) CHAPTER 42. STRING TO NUMBER CONVERSION (ATOI()) Chapter 42 String to number co ...
CHAPTER 42. STRING TO NUMBER CONVERSION (ATOI()) CHAPTER 42. STRING TO NUMBER CONVERSION (ATOI()) ; exit then. test r8b, r8b je ...
CHAPTER 42. STRING TO NUMBER CONVERSION (ATOI()) CHAPTER 42. STRING TO NUMBER CONVERSION (ATOI()) MOV r0,#0 B |L0.28| |L0.12| AD ...
CHAPTER 42. STRING TO NUMBER CONVERSION (ATOI()) CHAPTER 42. STRING TO NUMBER CONVERSION (ATOI()) mov x2, x0 ; X2=address of inp ...
CHAPTER 42. STRING TO NUMBER CONVERSION (ATOI()) CHAPTER 42. STRING TO NUMBER CONVERSION (ATOI()) printf ("%d\n", my_atoi ("-a12 ...
«
20
21
22
23
24
25
26
27
28
29
»
Free download pdf