Advertisement
Tannenfels

Untitled

Sep 27th, 2022
1,089
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _DATA   SEGMENT
  2. COMM    hInstance:QWORD
  3. _DATA   ENDS
  4. _DATA   SEGMENT
  5. szClassName DQ  FLAT:$SG96290
  6. _DATA   ENDS
  7. $SG96332 DB     01H DUP (?)
  8. $SG96333 DB     01H DUP (?)
  9. _DATA   SEGMENT
  10. $SG96331 DB     'Error', 00H
  11. _DATA   ENDS
  12.  
  13. hwnd$ = 96
  14. wnd$ = 112
  15. msg$ = 192
  16. hInst$ = 256
  17. hPrevInstance$ = 264
  18. szCmdLine$ = 272
  19. iCmdShow$ = 280
  20. WinMain PROC
  21. $LN6:
  22.         mov     DWORD PTR [rsp+32], r9d
  23.         mov     QWORD PTR [rsp+24], r8
  24.         mov     QWORD PTR [rsp+16], rdx
  25.         mov     QWORD PTR [rsp+8], rcx
  26.         sub     rsp, 248                      ; 000000f8H
  27.         mov     rax, QWORD PTR hInst$[rsp]
  28.         mov     QWORD PTR hInstance, rax
  29.         mov     DWORD PTR wnd$[rsp], 3
  30.         lea     rax, OFFSET FLAT:MyWndProc
  31.         mov     QWORD PTR wnd$[rsp+8], rax
  32.         mov     DWORD PTR wnd$[rsp+16], 0
  33.         mov     DWORD PTR wnd$[rsp+20], 0
  34.         mov     rax, QWORD PTR hInstance
  35.         mov     QWORD PTR wnd$[rsp+24], rax
  36.         mov     edx, 32512                                ; 00007f00H
  37.         xor     ecx, ecx
  38.         call    QWORD PTR __imp_LoadIconA
  39.         mov     QWORD PTR wnd$[rsp+32], rax
  40.         mov     edx, 32512                                ; 00007f00H
  41.         xor     ecx, ecx
  42.         call    QWORD PTR __imp_LoadCursorA
  43.         mov     QWORD PTR wnd$[rsp+40], rax
  44.         mov     QWORD PTR wnd$[rsp+48], 2
  45.         mov     QWORD PTR wnd$[rsp+56], 0
  46.         mov     rax, QWORD PTR szClassName
  47.         mov     QWORD PTR wnd$[rsp+64], rax
  48.         lea     rcx, QWORD PTR wnd$[rsp]
  49.         call    QWORD PTR __imp_RegisterClassA
  50.         movzx   eax, ax
  51.         test    eax, eax
  52.         jne     SHORT $LN4@WinMain
  53.         xor     r9d, r9d
  54.         lea     r8, OFFSET FLAT:$SG96331
  55.         lea     rdx, OFFSET FLAT:$SG96332
  56.         xor     ecx, ecx
  57.         call    QWORD PTR __imp_MessageBoxA
  58.         xor     eax, eax
  59.         jmp     $LN1@WinMain
  60. $LN4@WinMain:
  61.         mov     QWORD PTR [rsp+88], 0
  62.         mov     rax, QWORD PTR hInstance
  63.         mov     QWORD PTR [rsp+80], rax
  64.         mov     QWORD PTR [rsp+72], 0
  65.         mov     QWORD PTR [rsp+64], 0
  66.         mov     DWORD PTR [rsp+56], -2147483648         ; ffffffff80000000H
  67.         mov     DWORD PTR [rsp+48], -2147483648         ; ffffffff80000000H
  68.         mov     DWORD PTR [rsp+40], -2147483648         ; ffffffff80000000H
  69.         mov     DWORD PTR [rsp+32], -2147483648         ; ffffffff80000000H
  70.         mov     r9d, 13565952                   ; 00cf0000H
  71.         lea     r8, OFFSET FLAT:$SG96333
  72.         mov     rdx, QWORD PTR szClassName
  73.         xor     ecx, ecx
  74.         call    QWORD PTR __imp_CreateWindowExA
  75.         mov     QWORD PTR hwnd$[rsp], rax
  76.         mov     edx, DWORD PTR iCmdShow$[rsp]
  77.         mov     rcx, QWORD PTR hwnd$[rsp]
  78.         call    QWORD PTR __imp_ShowWindow
  79.         mov     rcx, QWORD PTR hwnd$[rsp]
  80.         call    QWORD PTR __imp_UpdateWindow
  81. $LN2@WinMain:
  82.         xor     r9d, r9d
  83.         xor     r8d, r8d
  84.         xor     edx, edx
  85.         lea     rcx, QWORD PTR msg$[rsp]
  86.         call    QWORD PTR __imp_GetMessageA
  87.         test    eax, eax
  88.         je      SHORT $LN3@WinMain
  89.         lea     rcx, QWORD PTR msg$[rsp]
  90.         call    QWORD PTR __imp_TranslateMessage
  91.         lea     rcx, QWORD PTR msg$[rsp]
  92.         call    QWORD PTR __imp_DispatchMessageA
  93.         jmp     SHORT $LN2@WinMain
  94. $LN3@WinMain:
  95.         mov     eax, DWORD PTR msg$[rsp+16]
  96. $LN1@WinMain:
  97.         add     rsp, 248                      ; 000000f8H
  98.         ret     0
  99. WinMain ENDP
  100.  
  101. hwnd$ = 48
  102. msg$ = 56
  103. wParam$ = 64
  104. lParam$ = 72
  105. MyWndProc PROC
  106. $LN4:
  107.         mov     DWORD PTR [rsp+32], r9d
  108.         mov     DWORD PTR [rsp+24], r8d
  109.         mov     DWORD PTR [rsp+16], edx
  110.         mov     QWORD PTR [rsp+8], rcx
  111.         sub     rsp, 40                             ; 00000028H
  112.         cmp     DWORD PTR msg$[rsp], 2
  113.         jne     SHORT $LN2@MyWndProc
  114.         xor     ecx, ecx
  115.         call    QWORD PTR __imp_PostQuitMessage
  116.         xor     eax, eax
  117.         jmp     SHORT $LN1@MyWndProc
  118. $LN2@MyWndProc:
  119.         movsxd  rax, DWORD PTR lParam$[rsp]
  120.         mov     ecx, DWORD PTR wParam$[rsp]
  121.         mov     r9, rax
  122.         mov     r8d, ecx
  123.         mov     edx, DWORD PTR msg$[rsp]
  124.         mov     rcx, QWORD PTR hwnd$[rsp]
  125.         call    QWORD PTR __imp_DefWindowProcA
  126. $LN1@MyWndProc:
  127.         add     rsp, 40                             ; 00000028H
  128.         ret     0
  129. MyWndProc ENDP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement