Compiled nasm 0.98.39 in MS VC++ successfully.(on jul 19 ,2005)
Had to add the lines
#define snprintf _snprintf
and
#define vsnprintf _vsnprintf
In order to get it compiled.
_____________________________________________________________________________________________ |Entry Point Alert X | |____________________________________________________________________________________________| | . | | / \ ModuleSolution:has entry point outside the code(as specified in the PE header). | | /_!_\ Maybe this file is self-extracting or self-modifying. | | Please keep it in mind when setting breakpoints! | | _____________ | | | OK | | | ~~~~~~~~~~~~~~~ | |____________________________________________________________________________________________|
Add "class=code" to the segment declaration.
segment .code USE32 class=code
This way Olly will find the correct entry point.
call GetDesktopWindow call SendMessageA,eax,WM_SYSCOMMAND,SC_MONITORPOWER ,2
%macro GCD 2 push edx mov eax,%1 mov edx,%2 neg eax je %%gcdloop3 %%gcdloop1: neg eax xchg eax,edx %%gcdloop2: sub eax,edx jg %%gcdloop2 jne %%gcdloop1 %%gcdloop3: add eax,edx jne %%gcdloop4 inc eax %%gcdloop4: pop edx %endmacro
%macro popcount1 1 push esi mov esi,%1 mov eax,esi shr eax,1 and eax,055555555h ; (n >> 1) & 0x55555555 sub esi,eax ; n - ((n >> 1) & 0x55555555) mov eax,esi shr eax,2 ; n >> 2 and esi,033333333h ; n & 0x33333333 and eax,033333333h ; (n >> 2) & 0x33333333 add esi,eax ; n = (n & 0x33333333) + ((n >> 2) & 0x33333333) mov eax,esi shr eax,4 ; n >> 4 add eax,esi ; n + (n >> 4) and eax,00F0F0F0Fh ; n = (n + (n >> 4) & 0x0F0F0F0F) imul eax,001010101h ; add by multiplying with a "magic number" shr eax,24 ; shift result into place pop esi %endmacro
IDB_BITMAP equ 2000 ; Our BITMAP as in .RC file segment .data USE32 hBitmap dd 0 ; handle for bitmap hBrush dd 0 ; handle for brush segment .code USE32 ; Load the bitmap from the Resource file (.RC) push IDB_BITMAP ; Our BMP file push [hInst] ; hInstance (from GetModuleHandleA(0); ) call LoadBitmapA ; load the bitmap mov [hBitmap], eax ; save handle push [hBitmap] call CreatePatternBrush ; create our PatternBrush mov [hBrush], eax ; save handle ; Now when you initialize your window class, (before you register it) mov eax,[hBrush] mov [wc+WNDCLASSEX.clsHrBackground], eax ; here we use it. call RegisterClass, wc ; And when you finish your program, before you call ExitProcess, ; you have to destroy the objects. call DeleteObject, [hBrush] call DeleteObject, [hBitmap]
%define WS_EX_LAYERED 0x080000 ;not defined in nagoa+.inc segment .data USE32 opacity dd 200 ; opacity can range from 0 to 255 segment .code USE32 ;Create a window with WS_EX_LAYERED in Extended window style in the CreateWindowExA function (very important) ;When handling WM_CREATE message code the following. call SetLayeredWindowAttributes,[@hwnd],0,[opacity],LWA_ALPHA
Got FileSplitter 1.05 reviewed by Softpedia.(Nice score).
Click here to read the review.