; Simple General Purpose Winamp Plugin
; By Torrey Betts
;
; Use it, abuse it...
format PE GUI 4.0 DLL
entry DllEntryPoint
include 'win32a.inc'
section '.data' data readable writeable
struct winampGeneralPurposePlugin
.version dd 0x10
.description dd txtDescription
.lpInit dd init
.lpConfig dd config
.lpQuit dd quit
.WinAmpHwnd dd ?
.hDllInstance dd ?
ends
winamptitle db 'Winamp v1.x',0
text2 rb 46
status rb 46
ymwindow db 'YahooBuddyMain',0
regHandle dd ?
regKeySub db 'Software\Yahoo\Pager',0
regItem db 'Yahoo! User ID',0
textfloating db '\Custom Msgs',0
regstatus db '5',0
regItemValue: times 30 db 0
valueType dd ?
bufferSize dd 30
fixed db 'Software\Yahoo\Pager\profiles\'
RegValue2 : times 256 db 0
txtDescription db 'Yahoo Messenger Status create by Senolc_eht base on Torray tutorial', 0
plugin winampGeneralPurposePlugin
txtInitialize db 'The FASM Simple Plugin has initialized',0
txtConfigure db 'This is where you would place code for the configuration dialog to be displayed and edited',0
txtTitle db 'Simple Winamp Plugin',0
txtQuit db 'Plugin uninitialized',0
section '.code' code readable executable
proc DllEntryPoint,hinstDLL,fdwReason,lpvReserved
xor eax,eax
inc eax
ret
endp
proc winampGetGeneralPurposePlugin
mov eax, plugin
ret
endp
proc init
invoke SetTimer, HWND_DESKTOP, 100, 1000, Timer_proc
xor eax,eax
ret
endp
proc config
push 0
push txtTitle
push txtConfigure
push 0
call [MessageBox]
ret
endp
proc quit
invoke KillTimer, HWND_DESKTOP, 100
ret
endp
proc Timer_proc, hwnd, uMsg, idEvent, dwTime
invoke FindWindow, winamptitle, NULL
invoke GetWindowText, eax, status, 46
invoke lstrcmp, status, text2
cmp eax,0
je lewat
invoke RegOpenKey,HKEY_CURRENT_USER,regKeySub,regHandle
invoke RegQueryValueEx,[regHandle],regItem,NULL,valueType,regItemValue,bufferSize
invoke RegCloseKey, [regHandle]
;invoke MessageBoxEx,[hwnd], fixed, "hue", MB_OK
invoke lstrcpy, RegValue2, regItemValue
invoke lstrlen, fixed
add eax, fixed
invoke lstrcpy, eax, textfloating
invoke RegOpenKey,HKEY_CURRENT_USER,fixed,regHandle
invoke lstrlen, status
invoke RegSetValueEx, [regHandle], regstatus, 0, REG_SZ, status, eax
invoke RegCloseKey, [regHandle]
invoke lstrcpy, text2, status
invoke FindWindow,ymwindow, NULL
invoke PostMessage,eax, 273,392,0
;invoke MessageBoxEx,HWND_DESKTOP, fixed, "hue", MB_OK
lewat:
ret
endp
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL',\
gdi32,'GDI32.DLL',\
advapi32,'ADVAPI32.DLL',\
comctl32,'COMCTL32.DLL',\
comdlg32,'COMDLG32.DLL',\
shell32,'SHELL32.DLL',\
wsock32,'WSOCK32.DLL'
include 'apia/kernel32.inc'
include 'apia/user32.inc'
include 'apia/gdi32.inc'
include 'apia/advapi32.inc'
include 'apia/comctl32.inc'
include 'apia/comdlg32.inc'
include 'apia/shell32.inc'
include 'apia/wsock32.inc'
section '.edata' export data readable
export 'gen_plug.dll',\
winampGetGeneralPurposePlugin, 'winampGetGeneralPurposePlugin'
section '.reloc' fixups data discardable