Assembly Language for Beginners
3.26 Other weird stack hacks It just restores (almost) all registers, takesRAfrom structure and jumps there. This effectively wo ...
3.26. OTHER WEIRD STACK HACKS 0xb7634590 0xb779eddc 0xb77e4918 0xbfd8aba8 0x8048547 return address into the middle of main() 0x6 ...
3.26. OTHER WEIRD STACK HACKS 3.26.2 Returning string This is classic bug from Brian W. Kernighan, Rob Pike,Practice of Programm ...
3.27 OpenMP. (lower addresses) [amsg(): 100 bytes] [RA] <- current SP [two amsg() arguments] [interim() stuff, incl. 8000 byt ...
3.27. OPENMP int32_t* __max; time_t start; ifdef GNUC define min(X,Y) ((X) < (Y)? (X) : (Y)) define max(X,Y) ((X) > (Y)? ( ...
3.27. OPENMP free(min); free(max); }; Thecheck_nonce()function just adds a number to the string, hashes it with the SHA512 algor ...
3.27. OPENMP pop ecx inc esi $LN6@main$omp$1: cmp esi, DWORD PTR $T2[ebp] jle SHORT $LL2@main$omp$1 call __vcomp_for_static_end ...
3.27. OPENMP add esp, 12 ; Line 56 mov ecx, DWORD PTR _checked mov eax, ecx cdq mov esi, 100000 ; 000186a0H idiv esi test edx, e ...
3.28 Another heisenbug. .L18: imul esi, ecx mov edx, esi add eax, edx lea ebx, [rax+rcx] cmp eax, ebx jge .L14 mov DWORD PTR [rb ...
3.29 Windows 16-bit include <stdio.h> int array1[128]; int important_var1; int important_var2; int important_var3; int imp ...
3.29. WINDOWS 16-BIT All examples considered here were compiled by the OpenWatcom 1.9 compiler, using these switches: wcl.exe -i ...
3.29. WINDOWS 16-BIT Couple important things here: thePASCALcalling convention dictates passing the first argument first (MB_YES ...
3.29. WINDOWS 16-BIT push ds mov ax, offset aCaption ; "caption" push ax xor ax, ax push ax call MESSAGEBOX loc_57: xor ax, ax p ...
3.29. WINDOWS 16-BIT push bp mov bp, sp mov ax, [bp+arg_8] mov dx, [bp+arg_A] mov bx, [bp+arg_4] mov cx, [bp+arg_6] call sub_B2 ...
3.29. WINDOWS 16-BIT mov ax, 27C0h ; low part of 600000 push ax mov ax, 0Ah ; high part of 700000 push ax mov ax, 0AE60h ; low p ...
3.29. WINDOWS 16-BIT void PASCAL remove_digits (char s) { while (s) { if (s>='0' && s<='9') *s='-'; s++; }; }; cha ...
3.29. WINDOWS 16-BIT arg_2 = word ptr 6 arg_4 = word ptr 8 arg_6 = word ptr 0Ah push bp mov bp, sp push si mov si, [bp+arg_0] mo ...
3.29. WINDOWS 16-BIT loc_86: ; CODE XREF: remove_digits+Aj pop bp retn 2 remove_digits endp WinMain proc near ; CODE XREF: start ...
3.29. WINDOWS 16-BIT 3.29.6 Example #6. include <windows.h> include <time.h> include <stdio.h> char strbuf[256 ...
3.29. WINDOWS 16-BIT call MESSAGEBOX xor ax, ax mov sp, bp pop bp retn 0Ah WinMain endp UNIX time is a 32-bit value, so it is re ...
«
29
30
31
32
33
34
35
36
37
38
»
Free download pdf