无法从反汇编中解码简单的 ARM 函数原型?

发布于 2024-09-14 03:32:22 字数 543 浏览 1 评论 0原文

我无法弄清楚这个简单函数的原型:

在堆栈中: 堆栈截图

函数调用:

函数调用屏幕截图

这就是我到目前为止得到的,它会导致错误。

//No idea
void CameraDeviceCreate(int one,int two,int* three);

使用了三个寄存器(R0、R1、R2),因此应该有三个参数。第三个指的是堆栈变量(我仍然不明白它是如何工作的)。 #0x28 (var_28) 仅在 ADD 调用中提及,不确定它可能是什么。 我在哪里犯了错误?

如果我遗漏了一些信息,请告诉我,我会添加它。顺便说一下,这是来自Camera.framework

I can't figure out the prototype for this simple function:

In stack:
stack screenshot

Function call:

function call screenshot

That's what I got so far, and it causes an error.

//No idea
void CameraDeviceCreate(int one,int two,int* three);

There are three registers used (R0,R1,R2) so there should be three arguments. Third one refers to a stack variable (I still don't get how that works). #0x28 (var_28) is only mentioned in the ADD call, not sure what it could be. Where did I make a mistake?

If I missed some info out tell me and I'll add it. This is from Camera.framework by the way.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

み青杉依旧 2024-09-21 03:32:22

为什么你认为你做错了?

请注意,不能保证第三个参数是“int*”——您需要查看当时 R4 中的内容——我猜它实际上是指向某种结构,而不是 int。

Why do you think you have it wrong?

Note, there is no guarantee that the third parameter is 'int*' - you need to look at what is in R4 at that point - I would guess its actually some sort of structure being pointed at, rather than an int.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文