Skip to content

Instantly share code, notes, and snippets.

@hktechn0
Created August 25, 2010 10:01
Show Gist options
  • Save hktechn0/549218 to your computer and use it in GitHub Desktop.
Save hktechn0/549218 to your computer and use it in GitHub Desktop.
win7_mbr: file format binary
Disassembly of section .data:
00000000 <.data>:
0: 33 c0 xor %ax,%ax
2: 8e d0 mov %ax,%ss
4: bc 00 7c mov $0x7c00,%sp
7: 8e c0 mov %ax,%es
9: 8e d8 mov %ax,%ds
b: be 00 7c mov $0x7c00,%si
e: bf 00 06 mov $0x600,%di
11: b9 00 02 mov $0x200,%cx
14: fc cld
15: f3 a4 rep movsb %ds:(%si),%es:(%di)
17: 50 push %ax
18: 68 1c 06 push $0x61c
1b: cb lret
1c: fb sti
1d: b9 04 00 mov $0x4,%cx
20: bd be 07 mov $0x7be,%bp
23: 80 7e 00 00 cmpb $0x0,0x0(%bp)
27: 7c 0b jl 0x34
29: 0f 85 0e 01 jne 0x13b
2d: 83 c5 10 add $0x10,%bp
30: e2 f1 loop 0x23
32: cd 18 int $0x18
34: 88 56 00 mov %dl,0x0(%bp)
37: 55 push %bp
38: c6 46 11 05 movb $0x5,0x11(%bp)
3c: c6 46 10 00 movb $0x0,0x10(%bp)
40: b4 41 mov $0x41,%ah
42: bb aa 55 mov $0x55aa,%bx
45: cd 13 int $0x13
47: 5d pop %bp
48: 72 0f jb 0x59
4a: 81 fb 55 aa cmp $0xaa55,%bx
4e: 75 09 jne 0x59
50: f7 c1 01 00 test $0x1,%cx
54: 74 03 je 0x59
56: fe 46 10 incb 0x10(%bp)
59: 66 60 pushal
5b: 80 7e 10 00 cmpb $0x0,0x10(%bp)
5f: 74 26 je 0x87
61: 66 68 00 00 00 00 pushl $0x0
67: 66 ff 76 08 pushl 0x8(%bp)
6b: 68 00 00 push $0x0
6e: 68 00 7c push $0x7c00
71: 68 01 00 push $0x1
74: 68 10 00 push $0x10
77: b4 42 mov $0x42,%ah
79: 8a 56 00 mov 0x0(%bp),%dl
7c: 8b f4 mov %sp,%si
7e: cd 13 int $0x13
80: 9f lahf
81: 83 c4 10 add $0x10,%sp
84: 9e sahf
85: eb 14 jmp 0x9b
87: b8 01 02 mov $0x201,%ax
8a: bb 00 7c mov $0x7c00,%bx
8d: 8a 56 00 mov 0x0(%bp),%dl
90: 8a 76 01 mov 0x1(%bp),%dh
93: 8a 4e 02 mov 0x2(%bp),%cl
96: 8a 6e 03 mov 0x3(%bp),%ch
99: cd 13 int $0x13
9b: 66 61 popal
9d: 73 1c jae 0xbb
9f: fe 4e 11 decb 0x11(%bp)
a2: 75 0c jne 0xb0
a4: 80 7e 00 80 cmpb $0x80,0x0(%bp)
a8: 0f 84 8a 00 je 0x136
ac: b2 80 mov $0x80,%dl
ae: eb 84 jmp 0x34
b0: 55 push %bp
b1: 32 e4 xor %ah,%ah
b3: 8a 56 00 mov 0x0(%bp),%dl
b6: cd 13 int $0x13
b8: 5d pop %bp
b9: eb 9e jmp 0x59
bb: 81 3e fe 7d 55 aa cmpw $0xaa55,0x7dfe
c1: 75 6e jne 0x131
c3: ff 76 00 pushw 0x0(%bp)
c6: e8 8d 00 call 0x156
c9: 75 17 jne 0xe2
cb: fa cli
cc: b0 d1 mov $0xd1,%al
ce: e6 64 out %al,$0x64
d0: e8 83 00 call 0x156
d3: b0 df mov $0xdf,%al
d5: e6 60 out %al,$0x60
d7: e8 7c 00 call 0x156
da: b0 ff mov $0xff,%al
dc: e6 64 out %al,$0x64
de: e8 75 00 call 0x156
e1: fb sti
e2: b8 00 bb mov $0xbb00,%ax
e5: cd 1a int $0x1a
e7: 66 23 c0 and %eax,%eax
ea: 75 3b jne 0x127
ec: 66 81 fb 54 43 50 41 cmp $0x41504354,%ebx
f3: 75 32 jne 0x127
f5: 81 f9 02 01 cmp $0x102,%cx
f9: 72 2c jb 0x127
fb: 66 68 07 bb 00 00 pushl $0xbb07
101: 66 68 00 02 00 00 pushl $0x200
107: 66 68 08 00 00 00 pushl $0x8
10d: 66 53 push %ebx
10f: 66 53 push %ebx
111: 66 55 push %ebp
113: 66 68 00 00 00 00 pushl $0x0
119: 66 68 00 7c 00 00 pushl $0x7c00
11f: 66 61 popal
121: 68 00 00 push $0x0
124: 07 pop %es
125: cd 1a int $0x1a
127: 5a pop %dx
128: 32 f6 xor %dh,%dh
12a: ea 00 7c 00 00 ljmp $0x0,$0x7c00
12f: cd 18 int $0x18
131: a0 b7 07 mov 0x7b7,%al
134: eb 08 jmp 0x13e
136: a0 b6 07 mov 0x7b6,%al
139: eb 03 jmp 0x13e
13b: a0 b5 07 mov 0x7b5,%al
13e: 32 e4 xor %ah,%ah
140: 05 00 07 add $0x700,%ax
143: 8b f0 mov %ax,%si
145: ac lods %ds:(%si),%al
146: 3c 00 cmp $0x0,%al
148: 74 09 je 0x153
14a: bb 07 00 mov $0x7,%bx
14d: b4 0e mov $0xe,%ah
14f: cd 10 int $0x10
151: eb f2 jmp 0x145
153: f4 hlt
154: eb fd jmp 0x153
156: 2b c9 sub %cx,%cx
158: e4 64 in $0x64,%al
15a: eb 00 jmp 0x15c
15c: 24 02 and $0x2,%al
15e: e0 f8 loopne 0x158
160: 24 02 and $0x2,%al
162: c3 ret
163: 49 dec %cx
164: 6e outsb %ds:(%si),(%dx)
165: 76 61 jbe 0x1c8
167: 6c insb (%dx),%es:(%di)
168: 69 64 20 70 61 imul $0x6170,0x20(%si),%sp
16d: 72 74 jb 0x1e3
16f: 69 74 69 6f 6e imul $0x6e6f,0x69(%si),%si
174: 20 74 61 and %dh,0x61(%si)
177: 62 6c 65 bound %bp,0x65(%si)
17a: 00 45 72 add %al,0x72(%di)
17d: 72 6f jb 0x1ee
17f: 72 20 jb 0x1a1
181: 6c insb (%dx),%es:(%di)
182: 6f outsw %ds:(%si),(%dx)
183: 61 popa
184: 64 69 6e 67 20 6f imul $0x6f20,%fs:0x67(%bp),%bp
18a: 70 65 jo 0x1f1
18c: 72 61 jb 0x1ef
18e: 74 69 je 0x1f9
190: 6e outsb %ds:(%si),(%dx)
191: 67 20 73 79 addr32 and %dh,0x79(%ebx)
195: 73 74 jae 0x20b
197: 65 gs
198: 6d insw (%dx),%es:(%di)
199: 00 4d 69 add %cl,0x69(%di)
19c: 73 73 jae 0x211
19e: 69 6e 67 20 6f imul $0x6f20,0x67(%bp),%bp
1a3: 70 65 jo 0x20a
1a5: 72 61 jb 0x208
1a7: 74 69 je 0x212
1a9: 6e outsb %ds:(%si),(%dx)
1aa: 67 20 73 79 addr32 and %dh,0x79(%ebx)
1ae: 73 74 jae 0x224
1b0: 65 gs
1b1: 6d insw (%dx),%es:(%di)
1b2: 00 00 add %al,(%bx,%si)
1b4: 00 63 7b add %ah,0x7b(%bp,%di)
1b7: 9a 44 7a 04 e8 lcall $0xe804,$0x7a44
1bc: 00 00 add %al,(%bx,%si)
1be: 80 20 21 andb $0x21,(%bx,%si)
1c1: 00 07 add %al,(%bx)
1c3: df 13 fist (%bp,%di)
1c5: 0c 00 or $0x0,%al
1c7: 08 00 or %al,(%bx,%si)
1c9: 00 00 add %al,(%bx,%si)
1cb: 20 03 and %al,(%bp,%di)
1cd: 00 00 add %al,(%bx,%si)
1cf: df 14 fist (%si)
1d1: 0c 07 or $0x7,%al
1d3: fe (bad)
1d4: ff (bad)
1d5: ff 00 incw (%bx,%si)
1d7: 28 03 sub %al,(%bp,%di)
1d9: 00 00 add %al,(%bx,%si)
1db: 28 35 sub %dh,(%di)
1dd: 3a 00 cmp (%bx,%si),%al
...
1fb: 00 00 add %al,(%bx,%si)
1fd: 00 55 aa add %dl,-0x56(%di)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment