gpt4 book ai didi

assembly 线困惑 $lea 0xffffffe8(%ebp)$

转载 作者:太空宇宙 更新时间:2023-11-04 08:48:43 25 4
gpt4 key购买 nike

Dump of assembler code for function ckpass:
0x0804851e <ckpass+0>: push %ebp
0x0804851f <ckpass+1>: mov %esp,%ebp
0x08048521 <ckpass+3>: sub $0x38,%esp
0x08048524 <ckpass+6>: movl $0x10,0x8(%esp)
0x0804852c <ckpass+14>: movl $0x0,0x4(%esp)
0x08048534 <ckpass+22>: lea 0xffffffe8(%ebp),%eax
0x08048537 <ckpass+25>: mov %eax,(%esp)
0x0804853a <ckpass+28>: call 0x80483dc <_init+136>
0x0804853f <ckpass+33>: lea 0xffffffe8(%ebp),%eax
0x08048542 <ckpass+36>: mov %eax,(%esp)
0x08048545 <ckpass+39>: call 0x804839c <_init+72>
*0x0804854a <ckpass+44>: lea 0xffffffe8(%ebp),%eax*
0x0804854d <ckpass+47>: mov %eax,0x4(%esp)
0x08048551 <ckpass+51>: lea 0xffffffd8(%ebp),%eax
0x08048554 <ckpass+54>: mov %eax,(%esp)
0x08048557 <ckpass+57>: call 0x8048571 <hashpass>
0x0804855c <ckpass+62>: lea 0xffffffd8(%ebp),%eax
0x0804855f <ckpass+65>: movl $0x80486e8,0x4(%esp)
0x08048567 <ckpass+73>: mov %eax,(%esp)
0x0804856a <ckpass+76>: call 0x804838c <_init+56>
0x0804856f <ckpass+81>: leave
0x08048570 <ckpass+82>: ret

这是对

的反汇编
int ckpass()
{
char a[____];
char b[____];
memset(_________, _____, _____);
gets(________);
hashpass(b, a);
return strcmp(________, good_hash);
}

lea 0xffffffe8(%ebp),%eax 到底是什么意思?

我以为lea s(%ebp), %eax等于eax = epb + s

我google了一下,说是buffer的意思。

但是我在这个例子中有buffer a和buffer b,我怎么区分它们呢?

最佳答案

这意味着 eax := ebp - 16。反汇编程序无法区分有符号常量和无符号常量。该命令将堆栈上某个变量的地址加载到 eax 中。

关于 assembly 线困惑 $lea 0xffffffe8(%ebp)$,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20501312/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com