Chinaunix首页 | 论坛 | 博客
  • 博客访问: 22311
  • 博文数量: 12
  • 博客积分: 287
  • 博客等级: 二等列兵
  • 技术积分: 115
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-26 00:05
文章分类

全部博文(12)

文章存档

2011年(12)

我的朋友
最近访客

分类: Delphi

2011-05-05 00:00:58

;※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
;   Random Icons.exe
;※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
; Author: Goly
; Email: 
; QQ: 402295354
; Site:
;★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
; Core Code:
;  1.random随机数生成算法,直观感受随机数的魅力
;★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

.386
.model flat, stdcall
option casemap:none

include windows.inc
include user32.inc
include kernel32.inc
include gdi32.inc
includelib user32.lib
includelib kernel32.lib
includelib gdi32.lib

.const
.data
  res_x dd  800
  res_y dd  600
  rnd_seed  dd  ?
  h_icon  dd  ?
  dc_screen dd  ?
.code
rand proc
  push ecx
  push edx
  mov eax,rnd_seed
  mov ecx,eax
  imul eax,41C64E6Dh
  add eax,03039h
  mov rnd_seed,eax
  xor eax,ecx
  pop edx
  pop ecx
  ret
rand endp
get_rnd_range proc
  push ecx
  push edx
  mov ecx,eax
  call rand
  xor edx,edx
  div ecx
  mov eax,edx
  pop edx
  pop ecx
  ret
get_rnd_range endp
start:
  dw 310fh;rdtsc
  mov rnd_seed,eax
  push IDI_WARNING
  xor eax,eax
  push eax
  call LoadIconA
  or eax,eax
  jz  _exit
  mov h_icon,eax
  xor eax,eax
  push eax
  call GetDC
  or eax,eax
  jz _exit
  mov dc_screen,eax
  mov ecx,100h
  _loop:
  push eax
  push ecx
  mov edx,eax
 
  push h_icon
  mov eax,res_y
  call get_rnd_range
  push eax
  mov eax,res_x
  call get_rnd_range
  push eax
  push dc_screen
  call DrawIcon
  pop ecx
  pop eax
  loop _loop
  _exit:
  push 0
  call ExitProcess
end start

修改自《Billy Belcebu Virus Writing Guide 1.00 for Win32》

Written by GodSpy -
阅读(416) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~