Bit-O-Asm-4
2025年1月15日小于 1 分钟
5,050 users solved
Description
Can you figure out what is in the eax
register? Put your answer in the picoCTF flag format: picoCTF{n}
where n
is the contents of the eax
register in the decimal number base. If the answer was 0x11
your flag would be picoCTF{17}
.Download the assembly dump here.
Hints
- Don't tell anyone I told you this, but you can solve this problem without understanding the compare/jump relationship.
- Of course, if you're really good, you'll only need one attempt to solve this problem.
01. 解题过程
<+0>: endbr64
<+4>: push rbp
<+5>: mov rbp,rsp
<+8>: mov DWORD PTR [rbp-0x14],edi
<+11>: mov QWORD PTR [rbp-0x20],rsi
<+15>: mov DWORD PTR [rbp-0x4],0x9fe1a ;654,874
<+22>: cmp DWORD PTR [rbp-0x4],0x2710 ; 654,874 > 10,000
<+29>: jle 0x55555555514e <main+37>
<+31>: sub DWORD PTR [rbp-0x4],0x65 ; 9 FDB5> 654,773
<+35>: jmp 0x555555555152 <main+41>
<+37>: add DWORD PTR [rbp-0x4],0x65
<+41>: mov eax,DWORD PTR [rbp-0x4]
<+44>: pop rbp
<+45>: ret
解题过程在注释里,不难啊这题,cmp,具体知识点在汇编手册里