Skip to content

Commit c996779

Browse files
committed
Added some files for the workshop
1 parent 7a5adac commit c996779

File tree

2 files changed

+187
-0
lines changed

2 files changed

+187
-0
lines changed

binsworkshop/asm.txt

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
me080483a0 <foo1>:
2+
80483a0: 55 push %ebp
3+
80483a1: 31 c0 xor %eax,%eax
4+
80483a3: 89 e5 mov %esp,%ebp
5+
80483a5: 8b 55 08 mov 0x8(%ebp),%edx
6+
80483a8: 80 3a 00 cmpb $0x0,(%edx)
7+
80483ab: 74 0c je 80483b9 <foo1+0x19>
8+
80483ad: 8d 76 00 lea 0x0(%esi),%esi
9+
80483b0: 83 c0 01 add $0x1,%eax
10+
80483b3: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
11+
80483b7: 75 f7 jne 80483b0 <foo1+0x10>
12+
80483b9: 5d pop %ebp
13+
80483ba: c3 ret
14+
80483bb: 90 nop
15+
80483bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
16+
17+
18+
19+
mine080483a0 <foo2>:
20+
80483a0: 55 push %ebp
21+
80483a1: 89 e5 mov %esp,%ebp
22+
80483a3: 56 push %esi
23+
80483a4: 53 push %ebx
24+
80483a5: 8b 5d 08 mov 0x8(%ebp),%ebx
25+
80483a8: 8b 75 0c mov 0xc(%ebp),%esi
26+
80483ab: 0f b6 13 movzbl (%ebx),%edx
27+
80483ae: 0f b6 0e movzbl (%esi),%ecx
28+
80483b1: 38 ca cmp %cl,%dl
29+
80483b3: 75 1e jne 80483d3 <foo2+0x33>
30+
80483b5: 31 c0 xor %eax,%eax
31+
80483b7: 84 d2 test %dl,%dl
32+
80483b9: 75 09 jne 80483c4 <foo2+0x24>
33+
80483bb: eb 2b jmp 80483e8 <foo2+0x48>
34+
80483bd: 8d 76 00 lea 0x0(%esi),%esi
35+
80483c0: 84 d2 test %dl,%dl
36+
80483c2: 74 24 je 80483e8 <foo2+0x48>
37+
80483c4: 83 c0 01 add $0x1,%eax
38+
80483c7: 0f b6 14 03 movzbl (%ebx,%eax,1),%edx
39+
80483cb: 0f b6 0c 06 movzbl (%esi,%eax,1),%ecx
40+
80483cf: 38 ca cmp %cl,%dl
41+
80483d1: 74 ed je 80483c0 <foo2+0x20>
42+
80483d3: 31 c0 xor %eax,%eax
43+
80483d5: 38 ca cmp %cl,%dl
44+
80483d7: 0f 9d c0 setge %al
45+
80483da: 8d 44 00 ff lea -0x1(%eax,%eax,1),%eax
46+
80483de: 5b pop %ebx
47+
80483df: 5e pop %esi
48+
80483e0: 5d pop %ebp
49+
80483e1: c3 ret
50+
80483e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
51+
80483e8: 31 c0 xor %eax,%eax
52+
80483ea: 5b pop %ebx
53+
80483eb: 5e pop %esi
54+
80483ec: 5d pop %ebp
55+
80483ed: c3 ret
56+
80483ee: 66 90 xchg %ax,%ax
57+
58+
59+
60+
080484ab <foo3>:
61+
80484ab: 55 push %ebp
62+
80484ac: 89 e5 mov %esp,%ebp
63+
80484ae: 83 ec 04 sub $0x4,%esp
64+
80484b1: 8b 45 0c mov 0xc(%ebp),%eax
65+
80484b4: 88 45 fc mov %al,-0x4(%ebp)
66+
80484b7: eb 12 jmp 80484cb <foo3+0x20>
67+
80484b9: 8b 45 10 mov 0x10(%ebp),%eax
68+
80484bc: 8b 55 08 mov 0x8(%ebp),%edx
69+
80484bf: 01 c2 add %eax,%edx
70+
80484c1: 0f b6 45 fc movzbl -0x4(%ebp),%eax
71+
80484c5: 88 02 mov %al,(%edx)
72+
80484c7: 83 6d 10 01 subl $0x1,0x10(%ebp)
73+
80484cb: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
74+
80484cf: 75 e8 jne 80484b9 <foo3+0xe>
75+
80484d1: c9 leave
76+
80484d2: c3 ret
77+
78+
79+
libc00000040 <__foo_ia32>:
80+
40: 8b 4c 24 04 mov ecx,DWORD PTR [esp+0x4]
81+
44: 8b 54 24 08 mov edx,DWORD PTR [esp+0x8]
82+
48: 8a 01 mov al,BYTE PTR [ecx]
83+
4a: 3a 02 cmp al,BYTE PTR [edx]
84+
4c: 75 09 jne 57 <__foo_ia32+0x17>
85+
4e: 41 inc ecx
86+
4f: 42 inc edx
87+
50: 84 c0 test al,al
88+
52: 75 f4 jne 48 <__foo_ia32+0x8>
89+
54: 31 c0 xor eax,eax
90+
56: c3 ret
91+
57: b8 01 00 00 00 mov eax,0x1
92+
5c: b9 ff ff ff ff mov ecx,0xffffffff
93+
61: 0f 42 c1 cmovb eax,ecx
94+
64: c3 ret
95+

binsworkshop/struct.txt

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
2+
3+
080483c4 <bar1>:
4+
80483c4: 55 push %ebp
5+
80483c5: 89 e5 mov %esp,%ebp
6+
80483c7: 83 ec 18 sub $0x18,%esp
7+
80483ca: 8b 45 0c mov 0xc(%ebp),%eax
8+
80483cd: 89 04 24 mov %eax,(%esp)
9+
80483d0: e8 27 ff ff ff call 80482fc <malloc@plt>
10+
80483d5: 89 c2 mov %eax,%edx
11+
80483d7: 8b 45 08 mov 0x8(%ebp),%eax
12+
80483da: 89 50 0c mov %edx,0xc(%eax)
13+
80483dd: 8b 45 08 mov 0x8(%ebp),%eax
14+
80483e0: 8b 55 0c mov 0xc(%ebp),%edx
15+
80483e3: 89 50 08 mov %edx,0x8(%eax)
16+
80483e6: 8b 45 08 mov 0x8(%ebp),%eax
17+
80483e9: c7 00 00 00 00 00 movl $0x0,(%eax)
18+
80483ef: 8b 45 08 mov 0x8(%ebp),%eax
19+
80483f2: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
20+
80483f9: c9 leave
21+
80483fa: c3 ret
22+
23+
24+
080483fb <bar2>:
25+
80483fb: 55 push %ebp
26+
80483fc: 89 e5 mov %esp,%ebp
27+
80483fe: 83 ec 04 sub $0x4,%esp
28+
8048401: 8b 45 0c mov 0xc(%ebp),%eax
29+
8048404: 88 45 fc mov %al,-0x4(%ebp)
30+
8048407: 8b 45 08 mov 0x8(%ebp),%eax
31+
804840a: 8b 50 0c mov 0xc(%eax),%edx
32+
804840d: 8b 45 08 mov 0x8(%ebp),%eax
33+
8048410: 8b 40 04 mov 0x4(%eax),%eax
34+
8048413: 01 c2 add %eax,%edx
35+
8048415: 0f b6 45 fc movzbl -0x4(%ebp),%eax
36+
8048419: 88 02 mov %al,(%edx)
37+
804841b: 8b 45 08 mov 0x8(%ebp),%eax
38+
804841e: 8b 50 04 mov 0x4(%eax),%edx
39+
8048421: 8b 45 08 mov 0x8(%ebp),%eax
40+
8048424: 8b 40 08 mov 0x8(%eax),%eax
41+
8048427: 83 e8 01 sub $0x1,%eax
42+
804842a: 39 c2 cmp %eax,%edx
43+
804842c: 75 0c jne 804843a <bar2+0x3f>
44+
804842e: 8b 45 08 mov 0x8(%ebp),%eax
45+
8048431: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
46+
8048438: eb 0f jmp 8048449 <bar2+0x4e>
47+
804843a: 8b 45 08 mov 0x8(%ebp),%eax
48+
804843d: 8b 40 04 mov 0x4(%eax),%eax
49+
8048440: 8d 50 01 lea 0x1(%eax),%edx
50+
8048443: 8b 45 08 mov 0x8(%ebp),%eax
51+
8048446: 89 50 04 mov %edx,0x4(%eax)
52+
8048449: c9 leave
53+
804844a: c3 ret
54+
55+
56+
0804844b <bar3>:
57+
804844b: 55 push %ebp
58+
804844c: 89 e5 mov %esp,%ebp
59+
804844e: 83 ec 10 sub $0x10,%esp
60+
8048451: 8b 45 08 mov 0x8(%ebp),%eax
61+
8048454: 8b 50 04 mov 0x4(%eax),%edx
62+
8048457: 8b 45 08 mov 0x8(%ebp),%eax
63+
804845a: 8b 00 mov (%eax),%eax
64+
804845c: 39 c2 cmp %eax,%edx
65+
804845e: 75 07 jne 8048467 <bar3+0x1c>
66+
8048460: b8 ff ff ff ff mov $0xffffffff,%eax
67+
8048465: eb 42 jmp 80484a9 <bar3+0x5e>
68+
8048467: 8b 45 08 mov 0x8(%ebp),%eax
69+
804846a: 8b 50 0c mov 0xc(%eax),%edx
70+
804846d: 8b 45 08 mov 0x8(%ebp),%eax
71+
8048470: 8b 00 mov (%eax),%eax
72+
8048472: 8d 04 02 lea (%edx,%eax,1),%eax
73+
8048475: 0f b6 00 movzbl (%eax),%eax
74+
8048478: 88 45 ff mov %al,-0x1(%ebp)
75+
804847b: 8b 45 08 mov 0x8(%ebp),%eax
76+
804847e: 8b 10 mov (%eax),%edx
77+
8048480: 8b 45 08 mov 0x8(%ebp),%eax
78+
8048483: 8b 40 08 mov 0x8(%eax),%eax
79+
8048486: 83 e8 01 sub $0x1,%eax
80+
8048489: 39 c2 cmp %eax,%edx
81+
804848b: 75 0b jne 8048498 <bar3+0x4d>
82+
804848d: 8b 45 08 mov 0x8(%ebp),%eax
83+
8048490: c7 00 00 00 00 00 movl $0x0,(%eax)
84+
8048496: eb 0d jmp 80484a5 <bar3+0x5a>
85+
8048498: 8b 45 08 mov 0x8(%ebp),%eax
86+
804849b: 8b 00 mov (%eax),%eax
87+
804849d: 8d 50 01 lea 0x1(%eax),%edx
88+
80484a0: 8b 45 08 mov 0x8(%ebp),%eax
89+
80484a3: 89 10 mov %edx,(%eax)
90+
80484a5: 0f b6 45 ff movzbl -0x1(%ebp),%eax
91+
80484a9: c9 leave
92+
80484aa: c3 ret

0 commit comments

Comments
 (0)