以某个 Vxworks 系统的固件程序在 IDA 中的汇编结果为例,实际查看一下常见 PPC 汇编语句的作用:
ROM:001D3FE4ROM:001D3FE4# =============== S U B R O U T I N E =======================================ROM:001D3FE4ROM:001D3FE4ROM:001D3FE4loginUserVerify:# CODE XREF: FTP_User_Add+1EC↑pROM:001D3FE4# add_ftp_user+164↑p ...ROM:001D3FE4ROM:001D3FE4.setback_chain,-0x70ROM:001D3FE4.setvar_68,-0x68ROM:001D3FE4.setvar_10,-0x10ROM:001D3FE4.setvar_C,-0xCROM:001D3FE4.setvar_4,-4ROM:001D3FE4.setsender_lr,4ROM:001D3FE4ROM:001D3FE49421FF90stwur1,back_chain(r1)ROM:001D3FE87C0802A6mflrr0ROM:001D3FEC93E1006Cstwr31,0x70+var_4(r1)ROM:001D3FF090010074stwr0,0x70+sender_lr(r1)ROM:001D3FF47C7F1B78mrr31,r3ROM:001D3FF87C832378mrr3,r4ROM:001D3FFC38810008addir4,r1,0x70+var_68ROM:001D400048000691blsub_1D4690ROM:001D40042C83FFFFcmpwicr1,r3,-1ROM:001D40084086000Cbnecr1,loc_1D4014ROM:001D400C3860FFFFlir3,-1ROM:001D40104800005Cbloc_1D406CROM:001D4014# ---------------------------------------------------------------------------ROM:001D4014ROM:001D4014loc_1D4014:# CODE XREF: loginUserVerify+24↑jROM:001D40143D200033lisr9,dword_3297A4@haROM:001D4018806997A4lwzr3,dword_3297A4@l(r9)ROM:001D401C7FE4FB78mrr4,r31ROM:001D402038A10060addir5,r1,0x70+var_10ROM:001D402438C10064addir6,r1,0x70+var_CROM:001D40284BFCA8C5blsymFindByNameROM:001D402C2C83FFFFcmpwicr1,r3,-1ROM:001D403040860010bnecr1,loc_1D4040ROM:001D40343C600036lisr3,0x36ROM:001D403860630001orir3,r3,1# 0x360001ROM:001D403C48000020bloc_1D405CROM:001D4040# ---------------------------------------------------------------------------ROM:001D4040ROM:001D4040loc_1D4040:# CODE XREF: loginUserVerify+4C↑jROM:001D404080610060lwzr3,0x70+var_10(r1)ROM:001D404438810008addir4,r1,0x70+var_68ROM:001D40484BFA3339blstrcmpROM:001D404C2C830000cmpwicr1,r3,0ROM:001D405041860018beqcr1,loc_1D4068ROM:001D40543C600036lisr3,0x36ROM:001D405860630003orir3,r3,3# 0x360003ROM:001D405CROM:001D405Cloc_1D405C:# CODE XREF: loginUserVerify+58↑jROM:001D405C4BFC05CDblerrnoSetROM:001D40603860FFFFlir3,-1ROM:001D406448000008bloc_1D406CROM:001D4068# ---------------------------------------------------------------------------ROM:001D4068ROM:001D4068loc_1D4068:# CODE XREF: loginUserVerify+6C↑jROM:001D406838600000lir3,0ROM:001D406CROM:001D406Cloc_1D406C:# CODE XREF: loginUserVerify+2C↑jROM:001D406C# loginUserVerify+80↑jROM:001D406C80010074lwzr0,0x70+sender_lr(r1)ROM:001D40707C0803A6mtlrr0ROM:001D407483E1006Clwzr31,0x70+var_4(r1)ROM:001D407838210070addir1,r1,0x70ROM:001D407C4E800020blrROM:001D407C# End of function loginUserVerify