我目前正在努力化解炸彈,並在第四階段的炸彈,但我遇到了一個問題。我不確定這部分代碼的含義。試圖瞭解這個程序集的x86代碼
0x08048f64 <phase_4+81>: mov 0x804a20c(,%edx,4),%eax
0x08048f6b <phase_4+88>: jmp *%eax
我認爲,這行代碼是指輸入一些行代碼放到$ EAX並跳轉到它,但不敢肯定,雖然,因爲我不知道在什麼0x804a20c值s。我對裝配有點新。到目前爲止,我知道輸入必須包含兩個數字,第二個數字必須是126.我不確定第一個數字是什麼。每次我運行帶有數字x和126的代碼.X是我到達最後一步的任何數字,但是在該步驟中,它將-0x8(ebp)中的0值與字符串的長度進行比較。由於在線56上它輸入0到-0×8(ebp)。我想知道上面的代碼是否與此有關。
例如,如果我輸入「100 126」,那麼該計劃將7比較值0,而不是讓我跳線191
下面是完整的代碼的最後爆炸。
0x08048f13 <phase_4+0>: push %ebp
0x08048f14 <phase_4+1>: mov %esp,%ebp
0x08048f16 <phase_4+3>: push %ebx
0x08048f17 <phase_4+4>: sub $0x24,%esp
0x08048f1a <phase_4+7>: lea -0x14(%ebp),%eax
0x08048f1d <phase_4+10>: mov %eax,0xc(%esp)
0x08048f21 <phase_4+14>: lea -0x10(%ebp),%eax
0x08048f24 <phase_4+17>: mov %eax,0x8(%esp)
0x08048f28 <phase_4+21>: movl $0x804a206,0x4(%esp)
0x08048f30 <phase_4+29>: mov 0x8(%ebp),%eax
0x08048f33 <phase_4+32>: mov %eax,(%esp)
0x08048f36 <phase_4+35>: call 0x8048b10 <[email protected]>
0x08048f3b <phase_4+40>: cmp $0x2,%eax
0x08048f3e <phase_4+43>: je 0x8048f45 <phase_4+50>
0x08048f40 <phase_4+45>: call 0x8049e74 <explosion>
0x08048f45 <phase_4+50>: mov -0x10(%ebp),%eax
0x08048f48 <phase_4+53>: mov %eax,-0xc(%ebp)
0x08048f4b <phase_4+56>: movl $0x0,-0x8(%ebp)
0x08048f52 <phase_4+63>: mov -0x14(%ebp),%eax
0x08048f55 <phase_4+66>: sub $0x74,%eax
0x08048f58 <phase_4+69>: mov %eax,-0x18(%ebp)
0x08048f5b <phase_4+72>: cmpl $0xa,-0x18(%ebp)
0x08048f5f <phase_4+76>: ja 0x8048fb5 <phase_4+162>
0x08048f61 <phase_4+78>: mov -0x18(%ebp),%edx
0x08048f64 <phase_4+81>: mov 0x804a20c(,%edx,4),%eax
0x08048f6b <phase_4+88>: jmp *%eax
0x08048f6d <phase_4+90>: addl $0x1,-0x8(%ebp)
0x08048f71 <phase_4+94>: movl $0x72,-0xc(%ebp)
0x08048f78 <phase_4+101>: shll -0x8(%ebp)
0x08048f7b <phase_4+104>: jmp 0x8048fba <phase_4+167>
0x08048f7d <phase_4+106>: addl $0x38,-0xc(%ebp)
0x08048f81 <phase_4+110>: addl $0x1,-0xc(%ebp)
0x08048f85 <phase_4+114>: movl $0x7a,-0x8(%ebp)
0x08048f8c <phase_4+121>: jmp 0x8048fba <phase_4+167>
0x08048f8e <phase_4+123>: movl $0x44,-0xc(%ebp)
0x08048f95 <phase_4+130>: subl $0x1,-0xc(%ebp)
0x08048f99 <phase_4+134>: shll -0x8(%ebp)
0x08048f9c <phase_4+137>: jmp 0x8048fba <phase_4+167>
0x08048f9e <phase_4+139>: subl $0x1,-0x8(%ebp)
0x08048fa2 <phase_4+143>: subl $0x7a,-0xc(%ebp)
0x08048fa6 <phase_4+147>: jmp 0x8048fba <phase_4+167>
0x08048fa8 <phase_4+149>: movl $0x3,-0xc(%ebp)
0x08048faf <phase_4+156>: addl $0x1,-0x8(%ebp)
0x08048fb3 <phase_4+160>: jmp 0x8048fba <phase_4+167>
0x08048fb5 <phase_4+162>: call 0x8049e74 <explosion>
0x08048fba <phase_4+167>: mov -0xc(%ebp),%eax
0x08048fbd <phase_4+170>: imul -0x8(%ebp),%eax
0x08048fc1 <phase_4+174>: mov %eax,%ebx
0x08048fc3 <phase_4+176>: mov 0x8(%ebp),%eax
0x08048fc6 <phase_4+179>: mov %eax,(%esp)
0x08048fc9 <phase_4+182>: call 0x8048a20 <[email protected]>
0x08048fce <phase_4+187>: cmp %eax,%ebx
0x08048fd0 <phase_4+189>: je 0x8048fd7 <phase_4+196>
0x08048fd2 <phase_4+191>: call 0x8049e74 <explosion>
0x08048fd7 <phase_4+196>: add $0x24,%esp
0x08048fda <phase_4+199>: pop %ebx
0x08048fdb <phase_4+200>: pop %ebp
0x08048fdc <phase_4+201>: ret
任何幫助表示讚賞。謝謝。
看起來不像'x86' –
@Roman R .:爲什麼不呢? – BlackBear
windows dude detected :-) – horsh