首页
社区
课程
招聘
[求助]汇编程序里怎么调用Dbgprint?
发表于: 2009-5-29 12:48 5262

[求助]汇编程序里怎么调用Dbgprint?

2009-5-29 12:48
5262
那位有类似的代码啊,就是调用Dbgprint,那些参数什么的怎么设置啊?谢谢,最好能给点提示性的语言…………

[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 202
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
没人理………………
2009-5-29 21:17
0
雪    币: 419
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
  01 .386
  02 .model flat, stdcall
  03 option casemap :none
  04 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  05 ; Include 文件定义
  06 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  07 include \masm32\include\windows.inc
  08 include \masm32\include\kernel32.inc
  09 include \masm32\include\user32.inc
  10 include \masm32\include\masm32.inc
  11
  12 includelib \masm32\lib\kernel32.lib
  13 includelib \masm32\lib\user32.lib
  14 includelib \masm32\lib\masm32.lib
  15 include \masm32\macros\macros.asm
  16 include \masm32\macros\strings.mac
  17 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  18 ; Equ 等值定义
  19 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  20 EbNetBuffer_s struct
  21
  22 next dd ?
  23 char dd ?
  24 buffer dd ?
  25 alength dd ?
  26
  27 EbNetBuffer_s ends
  28
  29 .data?
  30 EbNetBuffer EbNetBuffer_s <?>
  31 hInstance dd ?
  32 szbuffer db 1024 dup (?)
  33
  34 .code
  35 DbgPrint proc uses ebx edi esi debugcommon:dword,debugvalue:dword
  36 local @buffer[256]:BYTE
  37 local @addr[64]:BYTE
  38
  39 mov eax, ebp
  40 add eax, 4h
  41 mov eax, [eax]
  42 sub eax, 5h
  43 invoke wsprintf, addr @addr, $CTA0("addr:00%lXh || "), eax
  44 invoke wsprintf, addr @buffer, debugcommon, debugvalue
  45 invoke lstrcat, addr @addr, addr @buffer
  46 invoke OutputDebugString, addr @addr
  47 ret
  48 DbgPrint endp
  49
  50 start:
  51 invoke GetModuleHandle,NULL
  52 mov hInstance,eax
  53 invoke RtlZeroMemory, addr EbNetBuffer, sizeof EbNetBuffer
  54 mov [EbNetBuffer.next],31323334h
  55 mov [EbNetBuffer.char], 'abcd'
  56 invoke DbgPrint, $CTA0("values is :%s"), addr EbNetBuffer
  57 invoke ExitProcess,NULL
  58 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  59 end start
  60
2009-5-29 21:23
0
游客
登录 | 注册 方可回帖
返回
//