1. #include <stdio.h>
  2. void if1(int n){ //if else语句
  3. if(n < 10){
  4. printf("the number less than 10\n");
  5. } else {
  6. printf("the number greater than or equal to 10\n");
  7. }
  8. }
  9. void if2(int n){ //多重if else语句
  10. if(n < 16){
  11. printf("he is a boy\n");
  12. } else if(n < 30){
  13. printf("he is a young man\n");
  14. } else if(n < 45){
  15. printf("he is a strong man\n");
  16. } else{
  17. printf("he is an old man\n");
  18. }
  19. }
  20. int main(int argc, char* argv[]){
  21. if1(5);
  22. if2(35);
  23. return 0;
  24. }
  1. .text:00008570
  2. .text:00008570
  3. .text:00008570
  4. .text:00008570 if2 ; CODE XREF: main+10p
  5. .text:00008570 ; __unwind {
  6. .text:00008570 CMP R0, #0xF
  7. .text:00008574 BLE loc_85A0 ; if arg0 <= 15 跳转
  8. .text:00008578 CMP R0, #0x1D
  9. .text:0000857C BLE loc_85AC ; if arg0 <= 16+13 =29
  10. .text:00008580 CMP R0, #0x2C ; ','
  11. .text:00008584 BLE loc_8594 ; if arg0 <= 44
  12. .text:00008588 LDR R0, =(aHeIsAnOldMan - 0x8594) ; "he is an old man"
  13. .text:0000858C ADD R0, PC, R0 ; "he is an old man"
  14. .text:00008590 B puts
  15. .text:00008594 ; ---------------------------------------------------------------------------
  16. .text:00008594
  17. .text:00008594 loc_8594 ; CODE XREF: if2+14j
  18. .text:00008594 LDR R0, =(aHeIsAStrongMan - 0x85A0) ; "he is a strong man"
  19. .text:00008598 ADD R0, PC, R0 ; "he is a strong man"
  20. .text:0000859C B puts
  21. .text:000085A0 ; ---------------------------------------------------------------------------
  22. .text:000085A0
  23. .text:000085A0 loc_85A0 ; CODE XREF: if2+4j
  24. .text:000085A0 LDR R0, =(aHeIsABoy - 0x85AC) ; "he is a boy"
  25. .text:000085A4 ADD R0, PC, R0 ; "he is a boy"
  26. .text:000085A8 B puts
  27. .text:000085AC ; ---------------------------------------------------------------------------
  28. .text:000085AC
  29. .text:000085AC loc_85AC ; CODE XREF: if2+Cj
  30. .text:000085AC LDR R0, =(aHeIsAYoungMan - 0x85B8) ; "he is a young man"
  31. .text:000085B0 ADD R0, PC, R0 ; "he is a young man"
  32. .text:000085B4 B puts
  33. .text:000085B4 ; End of function if2
  34. .text:000085B4
  35. .text:000085B4 ; ---------------------------------------------------------------------------
  36. .text:000085B8 off_85B8 DCD aHeIsAnOldMan - 0x8594
  37. .text:000085B8 ; DATA XREF: if2+18r
  38. .text:000085B8 ; "he is an old man"
  39. .text:000085BC off_85BC DCD aHeIsAStrongMan - 0x85A0
  40. .text:000085BC ; DATA XREF: if2:loc_8594r
  41. .text:000085BC ; "he is a strong man"
  42. .text:000085C0 off_85C0 DCD aHeIsABoy - 0x85AC ; DATA XREF: if2:loc_85A0r
  43. .text:000085C0 ; "he is a boy"
  44. .text:000085C4 off_85C4 DCD aHeIsAYoungMan - 0x85B8
  45. .text:000085C4 ; DATA XREF: if2:loc_85ACr
  46. .text:000085C4 ; } // starts at 8570 ; "he is a young man"
  47. .text:000085C8
  48. .text:000085C8 ; =============== S U B R O U T I N E =======================================
  49. .text:000085C8
  50. .text:000085C8
  51. .text:000085C8 if1 ; CODE XREF: main+8p
  52. .text:000085C8 ; __unwind {
  53. .text:000085C8 CMP R0, #9
  54. .text:000085CC BLE loc_85DC ; if arg0 <= 9 跳转
  55. .text:000085D0 LDR R0, =(aTheNumberGreat - 0x85DC) ; "the number greater than or equal to 10"
  56. .text:000085D4 ADD R0, PC, R0 ; "the number greater than or equal to 10"
  57. .text:000085D8 B puts
  58. .text:000085DC ; ---------------------------------------------------------------------------
  59. .text:000085DC
  60. .text:000085DC loc_85DC ; CODE XREF: if1+4j
  61. .text:000085DC LDR R0, =(aTheNumberLessT - 0x85E8) ; "the number less than 10"
  62. .text:000085E0 ADD R0, PC, R0 ; "the number less than 10"
  63. .text:000085E4 B puts
  64. .text:000085E4 ; End of function if1
  65. .text:000085E4
  66. .text:000085E4 ; ---------------------------------------------------------------------------
  67. .text:000085E8 off_85E8 DCD aTheNumberGreat - 0x85DC
  68. .text:000085E8 ; DATA XREF: if1+8r
  69. .text:000085E8 ; "the number greater than or equal to 10"
  70. .text:000085EC off_85EC DCD aTheNumberLessT - 0x85E8
  71. .text:000085EC ; DATA XREF: if1:loc_85DCr
  72. .text:000085EC ; } // starts at 85C8 ; "the number less than 10"
  73. .text:000085F0
  74. .text:000085F0 ; =============== S U B R O U T I N E =======================================
  75. .text:000085F0
  76. .text:000085F0
  77. .text:000085F0 ; int __cdecl main(int argc, const char **argv, const char **envp)
  78. .text:000085F0 main ; CODE XREF: j_mainj
  79. .text:000085F0 ; __unwind {
  80. .text:000085F0 PUSH {R4,LR}
  81. .text:000085F4 MOV R0, #5
  82. .text:000085F8 BL if1 ; if1
  83. .text:000085FC MOV R0, #0x23 ; '#' ; 35
  84. .text:00008600 BL if2 ; if2
  85. .text:00008604 MOV R0, #0
  86. .text:00008608 POP {R4,PC}
  87. .text:00008608 ; } // starts at 85F0
  88. .text:00008608 ; End of function main

【android 逆向】arm if的更多相关文章

  1. android逆向学习小结--CrackMe_1

    断断续续的总算的把android开发和逆向的这两本书看完了,虽然没有java,和android开发的基础,但总体感觉起来还是比较能接收的,毕竟都是触类旁通的.当然要深入的话还需要对这门语言的细节特性和 ...

  2. Android逆向之旅---动态方式破解apk进阶篇(IDA调试so源码)

    Android逆向之旅---动态方式破解apk进阶篇(IDA调试so源码) 来源 https://blog.csdn.net/jiangwei0910410003/article/details/51 ...

  3. 【基于Android的ARM汇编语言系列】之五:ARM指令集与Thumb指令集

    作者:郭嘉 邮箱:allenwells@163.com 博客:http://blog.csdn.net/allenwells github:https://github.com/AllenWell [ ...

  4. 2021年正确的Android逆向开发学习之路

    2021年正确的Android逆向开发学习之路 说明 文章首发于HURUWO的博客小站,本平台做同步备份发布.如有浏览或访问异常或者相关疑问可前往原博客下评论浏览. 原文链接 2021年正确的Andr ...

  5. [转]Android逆向之动态调试总结

    一.在SO中关键函数上下断点 刚学逆向调试时.大多都满足于在SO中某关键函数上下断点.然后通过操作应用程序,去触发这个断点,然后进行调试 详细的步骤可以参见非虫大大的<Android软件安全与逆 ...

  6. Android逆向之so的半自动化逆向

    因为工作需要,转型干android逆向,有几个月了.不过对于so的逆向,任然停留在,难难难的阶段,虽然上次自己还是逆向了一个15k左右的小so文件,但是,那个基本是靠,一步一步跟代码,查看堆栈信息来自 ...

  7. Android逆向破解表单注册程序

    Android逆向破解表单注册程序 Android开发 ADT: android studio(as) 程序界面如下,注册码为6位随机数字,注册成功时弹出通知注册成功,注册失败时弹出通知注册失败. 布 ...

  8. Android逆向破解表单登录程序

    Android逆向破解表单登录程序 Android开发 ADT: android studio(as) 程序界面如下,登录成功时弹出通知登录成功,登录失败时弹出通知登录失败. 布局代码 <?xm ...

  9. Android逆向之静态分析

    想必打过CTF的小伙伴多多少少都触过Android逆向,所以斗哥将给大家整一期关于Android逆向的静态分析与动态分析.本期先带来Android逆向的静态分析,包括逆向工具使用.文件说明.例题解析等 ...

  10. Android 逆向实战篇(加密数据包破解)

    1. 实战背景由于工作需要,要爬取某款App的数据,App的具体名称此处不便透露,避免他们发现并修改加密逻辑我就得重新破解了. 爬取这款App时发现,抓包抓到的数据是加密过的,如图1所示(原数据较长, ...

随机推荐

  1. django生成迁移文件和执行迁移的命令

    生成迁移文件: python manage.py makemigrations    #创建数据库迁移文件 执行迁移: python manage.py migrate    # 根据数据库迁移文件生 ...

  2. VisonPro · 视觉定位工具包示例

    一.概述 视觉定位工具包一般包含: 1.相机取像: 2.图像九点标定: 3.Mark点粗定位: 4.建立粗定位坐标系: 5.Mark点精定位 6.输出Mark点坐标,角度等信息. 二.分类 1.单特征 ...

  3. rhel修改系统语言

    修改系统语言的三种方式  1.yum install system-config-language //挂载本地源,然后安装         system-config-language     2. ...

  4. 记一次排查线上MySQL死锁过程,不能只会curd,还要知道加锁原理

    昨晚我正在床上睡得着着的,突然来了一条短信. 啥,线上MySQL死锁了,我赶紧登录线上系统,查看业务日志. 能清楚看到是这条insert语句发生了死锁. MySQL如果检测到两个事务发生了死锁,会回滚 ...

  5. java的类

    public class demo01 { public static void main(String[] args) { //类名可用中文也可用英文,但是不建议用中文 String 王者荣耀=&q ...

  6. flashplayer下载

    现在网上不好找,折磨了我好久.这有一个方法,或许能帮到你. 下载地址:https://gitee.com/urain39/adobe-flash_player_sa 官网已经停止更新维护了,连Debu ...

  7. kubernetes 调度

    pod 分配给特定的node节点 目的:在一般业务场景,有些pod需要运行在特定的物理节点上,可以通过kubernetes的nodeSelector.nodeName安排pod到指定的节点上运行. # ...

  8. NC20583 [SDOI2016]齿轮

    题目链接 题目 题目描述 现有一个传动系统,包含了N个组合齿轮和M个链条.每一个链条连接了两个组合齿轮u和v,并提供了一个传动比x : y. 即如果只考虑这两个组合齿轮,编号为u的齿轮转动x圈,编号为 ...

  9. Linux配置Oracle JAVA环境

    1.下载java jdk的安装包 #pwd /usr/local/src 2.解压二进制文件并设置软连接 # tar -xvf jdk-8u241-linux-x64.tar.gz # ln -sv ...

  10. 基础算法学习以及$STL$的使用

    1.优先队列 (1)大根堆(小顶堆) priority_queue<int,vector<int>,greater<int> >q; (2)小根堆(大顶堆) pri ...