first files

This commit is contained in:
2025-03-29 18:17:41 +01:00
parent a0a4afce31
commit 2d70eb315c
10 changed files with 121 additions and 0 deletions

40
Practica_2/Ej1_main.txt Normal file
View File

@ -0,0 +1,40 @@
[0x08048390]> pdf @ main
;-- main:
/ (fcn) main 92
| main ();
| ; var int local_ch @ ebp-0xc
| ; var int local_4h_2 @ ebp-0x4
| ; var int local_4h @ esp+0x4
| ; DATA XREF from 0x080483a7 (entry0)
| 0x080484d7 8d4c2404 lea ecx, [local_4h] ; 4
| 0x080484db 83e4f0 and esp, 0xfffffff0
| 0x080484de ff71fc push dword [ecx - 4]
| 0x080484e1 55 push ebp
| 0x080484e2 89e5 mov ebp, esp
| 0x080484e4 51 push ecx
| 0x080484e5 83ec14 sub esp, 0x14
| 0x080484e8 83ec08 sub esp, 8
| 0x080484eb 6a64 push 0x64 ; 'd' ; 100
| 0x080484ed 6a00 push 0
| 0x080484ef e897ffffff call sym.read_valid_int
| 0x080484f4 83c410 add esp, 0x10
| 0x080484f7 8945f4 mov dword [local_ch], eax
| 0x080484fa 8b45f4 mov eax, dword [local_ch]
| 0x080484fd 83e001 and eax, 1
| 0x08048500 85c0 test eax, eax
| ,=< 0x08048502 7512 jne 0x8048516
| | 0x08048504 83ec0c sub esp, 0xc
| | 0x08048507 68ea850408 push str.x_is_even ; 0x80485ea ; "x is even"
| | 0x0804850c e83ffeffff call sym.imp.puts ; int puts(const char *s)
| | 0x08048511 83c410 add esp, 0x10
| ,==< 0x08048514 eb10 jmp 0x8048526
| |`-> 0x08048516 83ec0c sub esp, 0xc
| | 0x08048519 68f4850408 push str.x_is_odd ; 0x80485f4 ; "x is odd"
| | 0x0804851e e82dfeffff call sym.imp.puts ; int puts(const char *s)
| | 0x08048523 83c410 add esp, 0x10
| | ; JMP XREF from 0x08048514 (main)
| `--> 0x08048526 b800000000 mov eax, 0
| 0x0804852b 8b4dfc mov ecx, dword [local_4h_2]
| 0x0804852e c9 leave
| 0x0804852f 8d61fc lea esp, [ecx - 4]
\ 0x08048532 c3 ret