项目急需,盼高手解惑!简单的加密函数反汇编

vcbeginner_2007 2009-03-17 11:52:19
项目需要反汇编一动态链接库的Encode和Decode函数,现将Decode汇编代码贴出(IDA Pro5反汇编),请高手解惑,写成c++的函数,谢谢!
.text:10001390 ; Exported entry 56. ?Decode@Net
.text:10001390 ; Exported entry 58. ?Encode@Net
.text:10001390
.text:10001390 public void __cdecl Net::Decode(unsigned char *, int, unsigned char &)
.text:10001390 void __cdecl Net::Decode(unsigned char *, int, unsigned char &) proc near
.text:10001390
.text:10001390 arg_0 = dword ptr 4
.text:10001390 arg_4 = dword ptr 8
.text:10001390 arg_8 = dword ptr 0Ch
.text:10001390
.text:10001390 mov ecx, [esp+arg_4] ; void __cdecl Net::Decode(unsigned char *, int, unsigned char &)
.text:10001394 test ecx, ecx
.text:10001396 jle short locret_100013B0
.text:10001396
.text:10001398 mov eax, [esp+arg_0]
.text:1000139C push ebx
.text:1000139D push esi
.text:1000139E mov esi, [esp+8+arg_8]
.text:1000139E
.text:100013A2
.text:100013A2 loc_100013A2:
.text:100013A2 mov bl, [eax]
.text:100013A4 mov dl, [esi]
.text:100013A6 xor bl, dl
.text:100013A8 mov [eax], bl
.text:100013AA inc eax
.text:100013AB dec ecx
.text:100013AC jnz short loc_100013A2
.text:100013AC
.text:100013AE pop esi
.text:100013AF pop ebx
.text:100013AF
.text:100013B0
.text:100013B0 locret_100013B0:
.text:100013B0 retn
.text:100013B0
.text:100013B0 void __cdecl Net::Decode(unsigned char *, int, unsigned char &) endp
.text:100013B0
...全文
144 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
goodider 2009-05-11
  • 打赏
  • 举报
回复
xor bl, dl
关键一句。
  • 打赏
  • 举报
回复
就是的啊。。。
jesterjy 2009-04-30
  • 打赏
  • 举报
回复
xor bl, dl

只是一个异或运算而已吧?
bobzhu2002 2009-03-18
  • 打赏
  • 举报
回复
不长的程序啊,容易写的

vcbeginner_2007 2009-03-18
  • 打赏
  • 举报
回复
可是不会啊,求救!

21,500

社区成员

发帖
与我相关
我的任务
社区描述
汇编语言(Assembly Language)是任何一种用于电子计算机、微处理器、微控制器或其他可编程器件的低级语言,亦称为符号语言。
社区管理员
  • 汇编语言
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧