<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>Lowyat.NET: Latest topics by Mat Quasar</title>
        <description></description>
        <link>http://forum.lowyat.net/</link>
        <lastBuildDate>Fri, 05 Jun 2026 19:25:08 +0800</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>Which one do you need today?</title>
            <link>http://forum.lowyat.net/topic/5510381</link>
            <description>&lt;b&gt;Sensory Rest:&lt;/b&gt; Unplug or &amp;quot;digital detox&amp;quot;, sit in silence.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Social Rest:&lt;/b&gt; Balance time alone and time with others, assess relationships that aren&amp;#39;t supportive or meaningful.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Emotional Rest:&lt;/b&gt; Talk to a friend, journal, self-reflection and self-care.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Physical Rest:&lt;/b&gt; &lt;br /&gt;Passive- napping, deep breathing, sitting.&lt;br /&gt;Active- yoga, stretching, walking, massage, baths.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mental Rest:&lt;/b&gt; Meditation, affirmations, scheduling breaks in workday.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Spiritual Rest:&lt;/b&gt; Prayer, scripture, journaling, time in nature.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Creative Rest:&lt;/b&gt; Poetry, play, dance, paint, write.&lt;br /&gt;&lt;br /&gt;&lt;img src='https://pictr.com/images/2025/02/22/xLcc4A.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;Photo taken inside an apartment&amp;#39;s lift.</description>
            <author>Mat Quasar</author>
            <category>Mental Health &amp;amp; Counselling</category>
            <pubDate>Sat, 22 Feb 2025 22:30:32 +0800</pubDate>
        </item>
        <item>
            <title>My first Win32 game prototype</title>
            <link>http://forum.lowyat.net/topic/5507764</link>
            <description>Hi, this Win32 game prototype took me about 9 months from start to finish.&lt;br /&gt;&lt;br /&gt;I started with console interface first, then finalized with GUI version.&lt;br /&gt;&lt;br /&gt;It is written purely in FASM, using raw Win32 API.&lt;br /&gt;Although it is in GUI, I use TextOutA function in GDI32.dll, which is just displaying text in GUI window, no graphics at the moment.&lt;br /&gt;&lt;br /&gt;There is no collision detection yet, no scoring. What you can do with this program is:&lt;br /&gt;1) Move the caret (gun) to the left or to the right&lt;br /&gt;2) Shoot one bullet at one time&lt;br /&gt;3) Watch the enemies moving around&lt;br /&gt;&lt;br /&gt;&lt;img src='https://pictr.com/images/2025/02/06/xGMvBu.gif' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;For the enemies to move around, I use random number generator to predict the direction of movement.&lt;br /&gt;&lt;br /&gt;I have included the source code here (EXE is not included as it is falsely detected as virus).&lt;br /&gt;If you are interested to run the program, you can....&lt;br /&gt;1) Download SHOOT.txt&lt;br /&gt;2) Rename SHOOT.txt to SHOOT.asm&lt;br /&gt;3) Download Flat Assembler for Windows&lt;br /&gt;4) Run FASMW.EXE and open SHOOT.asm&lt;br /&gt;5) Click Compile&lt;br /&gt;6) Go to the File Explorer, and you&amp;#39;ll see SHOOT.EXE along with SHOOT.asm.&lt;br /&gt;&lt;br /&gt;Note: If you compile yourself, Windows Security won&amp;#39;t detect this as virus. Of course, my code does nothing malicious.&lt;br /&gt;&lt;br /&gt;But my game is still very crude, I might consider using GDI+ or SDL2 to develop my graphical version of 2D game.</description>
            <author>Mat Quasar</author>
            <category>Codemasters</category>
            <pubDate>Thu, 06 Feb 2025 15:49:33 +0800</pubDate>
        </item>
        <item>
            <title>It is challenging to read technical documentation</title>
            <link>http://forum.lowyat.net/topic/5498012</link>
            <description>What do you understand in comprehending this section of technical documentation in Intel Software Developer&amp;#39;s Manual?&lt;br /&gt;&lt;br /&gt;&lt;img src='https://pictr.com/images/2024/12/04/xSR1xB.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;</description>
            <author>Mat Quasar</author>
            <category>Education Essentials</category>
            <pubDate>Wed, 04 Dec 2024 22:29:42 +0800</pubDate>
        </item>
        <item>
            <title>Console App Development Service</title>
            <link>http://forum.lowyat.net/topic/5497752</link>
            <description>I can help writing command-line program in Windows and Linux.&lt;br /&gt;&lt;br /&gt;💎 It can be a simple database program using SQLite3.&lt;br /&gt;💎 It can be a simple networking program.&lt;br /&gt;💎 It can be a system or file utility.&lt;br /&gt;&lt;br /&gt;The target architecture can be 32-bit or 64-bit.&lt;br /&gt;&lt;br /&gt;My primary programming language is FASM, but I can also write C# console app.&lt;br /&gt;&lt;br /&gt;A command-line program is a computer program that can work under terminal, for example, under Windows, it is CMD and PowerShell.&lt;br /&gt;&lt;br /&gt;I uploaded some of my programs to this forum, you can try search for all topics in Codemaster and Linux &amp;amp; Open Source Software by FlierMate, FlierMate1, MatQuasar.</description>
            <author>Mat Quasar</author>
            <category>Services Noticeboard</category>
            <pubDate>Tue, 03 Dec 2024 15:15:13 +0800</pubDate>
        </item>
        <item>
            <title>The difference in using timer in VB6 and Win32 API</title>
            <link>http://forum.lowyat.net/topic/5496967</link>
            <description>For those who did Visual Basic 6, you must be familiar with using timer control in your application. Just drag and drop the Timer from the Toolbox:&lt;br /&gt;&lt;img src='https://pictr.com/images/2024/11/28/xSMZJq.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;Then start writing code, just set the Interval of the timer in design time or run time.&lt;br /&gt;For this example, the timer is set during run time:&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;Private Sub Form_Load&amp;#40;&amp;#41;&lt;br /&gt;	Timer0.Interval= 3000&lt;br /&gt;	Timer0.Enabled=True&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Public Sub Timer0_Timer&amp;#40;&amp;#41;&lt;br /&gt;	Beep&lt;br /&gt;End Sub&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;And you will get this Form1 application running: (It is best if set Timer control to Visible=False)&lt;br /&gt;&lt;img src='https://pictr.com/images/2024/11/28/xSM5SQ.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;But how about using timer in other programming language? For example, in native Windows, C++ code can directly access the Win32 API to set and kill timer with callback.&lt;br /&gt;&lt;br /&gt;Below are some example code taken from: https :// learn.microsoft.com/en-us/windows/win32/winmsg/using-timers&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Creating a Timer:&lt;/b&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;// Set two timers. &lt;br /&gt; &lt;br /&gt;SetTimer&amp;#40;hwnd, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // handle to main window &lt;br /&gt; &amp;nbsp; &amp;nbsp;IDT_TIMER1, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// timer identifier &lt;br /&gt; &amp;nbsp; &amp;nbsp;10000, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 10-second interval &lt;br /&gt; &amp;nbsp; &amp;nbsp;&amp;#40;TIMERPROC&amp;#41; NULL&amp;#41;; &amp;nbsp; &amp;nbsp; // no timer callback &lt;br /&gt; &lt;br /&gt;SetTimer&amp;#40;hwnd, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // handle to main window &lt;br /&gt; &amp;nbsp; &amp;nbsp;IDT_TIMER2, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// timer identifier &lt;br /&gt; &amp;nbsp; &amp;nbsp;300000, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// five-minute interval &lt;br /&gt; &amp;nbsp; &amp;nbsp;&amp;#40;TIMERPROC&amp;#41; NULL&amp;#41;; &amp;nbsp; &amp;nbsp; // no timer callback &lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;The callback to the GUI window is through WM_TIMER message in the window procedure.&lt;br /&gt;(We have to familiar ourselves with window class, window procedure, message loop, message queue while working with GUI window in Windows)&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;case WM_TIMER&amp;#58; &lt;br /&gt; &lt;br /&gt; &amp;nbsp; &amp;nbsp;switch &amp;#40;wParam&amp;#41; &lt;br /&gt; &amp;nbsp; &amp;nbsp;{ &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case IDT_TIMER1&amp;#58; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// process the 10-second timer &lt;br /&gt; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0; &lt;br /&gt; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case IDT_TIMER2&amp;#58; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// process the five-minute timer &lt;br /&gt;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 0; &lt;br /&gt; &amp;nbsp; &amp;nbsp;} &lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;Or if initializing the timer with callback to your own TimerProc procedure, the parameters to pass are a little different:&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;// Set the timer. &lt;br /&gt; &lt;br /&gt;SetTimer&amp;#40;hwnd, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// handle to main window &lt;br /&gt; &amp;nbsp; &amp;nbsp;IDT_TIMER3, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // timer identifier &lt;br /&gt; &amp;nbsp; &amp;nbsp;5000, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 5-second interval &lt;br /&gt; &amp;nbsp; &amp;nbsp;&amp;#40;TIMERPROC&amp;#41; MyTimerProc&amp;#41;; // timer callback&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Destroying a Timer&lt;/b&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;// Destroy the timers. &lt;br /&gt; &lt;br /&gt;KillTimer&amp;#40;hwnd, IDT_TIMER1&amp;#41;; &lt;br /&gt;KillTimer&amp;#40;hwnd, IDT_TIMER2&amp;#41;; &lt;br /&gt;KillTimer&amp;#40;hwnd, IDT_TIMER3&amp;#41;; &lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;This is the screenshot of the GUI window with timer I created in FASM:&lt;br /&gt;&lt;img src='https://pictr.com/images/2024/11/28/xSM7f1.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;(It will beep every 3 seconds, but I am not posting the code on here anyway)&lt;br /&gt;&lt;br /&gt;WM_TIMER is a low-priority message among window messages like WM_PAINT.&lt;br /&gt;Make sure messages like WM_PAINT does not block the message queue, or else WM_TIMER message cannot be read.&lt;br /&gt;&lt;br /&gt;Do you have other example of programming language to share, as to how to use timer in your software project?&lt;br /&gt;</description>
            <author>Mat Quasar</author>
            <category>Codemasters</category>
            <pubDate>Thu, 28 Nov 2024 18:21:42 +0800</pubDate>
        </item>
        <item>
            <title>Avalonia Visual Basic 6</title>
            <link>http://forum.lowyat.net/topic/5495562</link>
            <description>(This was first discovered by flashang)&lt;br /&gt;&lt;br /&gt;&lt;a href='https://github.com/BAndysc/AvaloniaVisualBasic6' target='_blank'&gt;https://github.com/BAndysc/AvaloniaVisualBasic6&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--QuoteBegin--&gt;&lt;div class='quotetop'&gt;QUOTE&lt;/div&gt;&lt;div class='quotemain'&gt;&lt;!--QuoteEBegin--&gt;A recreation of the classic Visual Basic 6 IDE and language in C# with Avalonia&lt;!--QuoteEnd--&gt;&lt;/div&gt;&lt;!--QuoteEEnd--&gt;&lt;br /&gt;&lt;br /&gt;For web version, go to &lt;a href='https://bandysc.github.io/AvaloniaVisualBasic6/' target='_blank'&gt;https://bandysc.github.io/AvaloniaVisualBasic6/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For desktop version, download from: &lt;a href='https://github.com/BAndysc/AvaloniaVisualBasic6/releases' target='_blank'&gt;https://github.com/BAndysc/AvaloniaVisualBasic6/releases&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you build yourself from source,  requires .NET 9.&lt;br /&gt;&lt;br /&gt;&lt;img src='https://pictr.com/images/2024/11/20/x6ksr1.png' border='0' alt='user posted image' /&gt;</description>
            <author>Mat Quasar</author>
            <category>Codemasters</category>
            <pubDate>Wed, 20 Nov 2024 17:39:02 +0800</pubDate>
        </item>
        <item>
            <title>Memory patch variable value of another program&amp;#33;</title>
            <link>http://forum.lowyat.net/topic/5495362</link>
            <description>I posted this on somewhere before, but it was console version. The following is GUI (a message box) version.&lt;br /&gt;&lt;br /&gt;So, this short article is going to demonstrate how to overwrite a variable value in memory of another program.&lt;br /&gt;I have this gui.exe, which is popping up message box with default caption. But after I run hackmem.exe, the caption in the message box.... CHANGED! How this is even possible?&lt;br /&gt;&lt;br /&gt;Well, with the help of such a dangerous API, &lt;b&gt;WriteProcessMemory&lt;/b&gt;, this is possible, but the memory area to be written must be accessible.&lt;br /&gt;&lt;br /&gt;Microsoft explains 'WriteProcessMemory' Win32 API function as:&lt;br /&gt;&lt;!--QuoteBegin--&gt;&lt;div class='quotetop'&gt;QUOTE&lt;/div&gt;&lt;div class='quotemain'&gt;&lt;!--QuoteEBegin--&gt;Writes data to an area of memory in a specified process.&lt;!--QuoteEnd--&gt;&lt;/div&gt;&lt;!--QuoteEEnd--&gt;&lt;br /&gt;&lt;br /&gt;This is also called Process Injection, part of Offensive Security. I like to call it 'memory patch'.&lt;br /&gt;&lt;br /&gt;So, let's see how it looks like:&lt;br /&gt;&lt;br /&gt;Before:&lt;br /&gt;&lt;img src='https://pictr.com/images/2024/11/19/x6JjX8.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;After:&lt;br /&gt;&lt;img src='https://pictr.com/images/2024/11/19/x6JQHx.png' border='0' alt='user posted image' /&gt;&lt;br /&gt;&lt;br /&gt;How to play:&lt;br /&gt;1. Run gui.exe&lt;br /&gt;2. Click Retry to repeat, or Cancel to quit, but don't click Cancel yet.&lt;br /&gt;3. Run hackmem.exe&lt;br /&gt;4. Now click Retry in gui.exe to see &quot;new&quot; message&lt;br /&gt;5. Have fun!&lt;br /&gt;&lt;br /&gt;In summary, the code flow of hackmem.exe is as below:&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;&lt;br /&gt;call &amp;#91;FindWindow&amp;#93;&lt;br /&gt;&lt;br /&gt;call &amp;#91;GetWindowThreadProcessId&amp;#93;&lt;br /&gt;&lt;br /&gt;call &amp;#91;OpenProcess&amp;#93;&lt;br /&gt;&lt;br /&gt;call &amp;#91;WriteProcessMemory&amp;#93;&lt;br /&gt;&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;It will find a window by looking for its title called &quot;gui&quot; (the program to be hacked), then get process identifier from window handle, then open the process with PROCESS_ALL_ACCESS permission, and overwrite the beginning of data section of the EXE. &lt;br /&gt;&lt;br /&gt;Let say my gui.exe gets loaded at 0x400000 (image base), and I put the data section (with variables) in the first section, the first section is going to be referenced at 0x401000, since memory alignment is 4KB (0x1000). If I put my data section after code section, then the memory area to overwrite is 0x402000, and so forth.&lt;br /&gt;&lt;br /&gt;This is how WriteProcessMemory work, the function parameters:&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;&lt;br /&gt;BOOL WriteProcessMemory&amp;#40;&lt;br /&gt;&lt;br /&gt; &amp;nbsp;&amp;#91;in&amp;#93; &amp;nbsp;HANDLE &amp;nbsp;hProcess,&lt;br /&gt;&lt;br /&gt; &amp;nbsp;&amp;#91;in&amp;#93; &amp;nbsp;LPVOID &amp;nbsp;lpBaseAddress,&lt;br /&gt;&lt;br /&gt; &amp;nbsp;&amp;#91;in&amp;#93; &amp;nbsp;LPCVOID lpBuffer,&lt;br /&gt;&lt;br /&gt; &amp;nbsp;&amp;#91;in&amp;#93; &amp;nbsp;SIZE_T &amp;nbsp;nSize,&lt;br /&gt;&lt;br /&gt; &amp;nbsp;&amp;#91;out&amp;#93; SIZE_T &amp;nbsp;*lpNumberOfBytesWritten&lt;br /&gt;&lt;br /&gt;&amp;#41;;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;I will need to put 0x401000 as 2nd parameter, or lpBaseAddress, with lpBuffer being the new data for the variable value of program running as hProcess.&lt;br /&gt;&lt;br /&gt;I am not going to show the code, as you can find plenty of examples and tutorials online.&lt;br /&gt;&lt;br /&gt;Shoot out to junyian, angch and flashang for keeping me in touch with IT.  &lt;!--emo&amp;:thumbs:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/thumbup.gif' border='0' style='vertical-align:middle' alt='thumbup.gif' /&gt;&lt;!--endemo--&gt; &lt;br /&gt;</description>
            <author>Mat Quasar</author>
            <category>Codemasters</category>
            <pubDate>Tue, 19 Nov 2024 17:38:19 +0800</pubDate>
        </item>
    </channel>
</rss>
