Function at 0x401000
Capabilities:
Accept command line arguments
Create thread
Get common file path
Get file size
Log keystrokes via polling
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push edi
push 0x10
call esi
movzx edi, ax
xor edi, 0x8000
push 0x11
shr edi, 7
mov dword [ebp - 0x24], edi
call esi
movsx eax, ax
push str.ExecSelect
xor ebx, ebx
push 1
push ebx
push ebx
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov dword [ebp - 0x34], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40185e
mov dword [ebp - 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov cl, byte [eax]
cmp cl, bl
je 0x40185e
inc eax
cmp cl, 0x2e
jne 0x401057
mov ecx, dword [eax]
and ecx, 0xdddfdfdf
cmp ecx, 0x455845
jne 0x401057
add eax, 3
mov dword [ebp - 0x10], eax
cmp byte [eax], 0x22
jne 0x401086
inc eax
mov dword [ebp - 0x10], eax
cmp byte [eax], 0x20
jne 0x40108f
inc eax
mov dword [ebp - 0x10], eax
mov esi, dword [ebp - 0x10]
xor ecx, ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ebx
cmp byte [esi], bl
je 0x40115d
mov al, byte [esi]
cmp al, 0x2f
jne 0x401103
mov eax, dword [esi]
and eax, 0xdfdfdfff
cmp eax, 0x434e4c2f
jne 0x4010bf
mov dword [ebp - 4], 0xb
jmp 0x4010cd
cmp eax, 0x554d532f
jne 0x4010d1
mov dword [ebp - 4], 0xe
mov ecx, esi
jmp 0x401123
cmp eax, 0x43494e2f
jne 0x4010e0
xor edi, 0x100
jmp 0x401123
cmp eax, 0x5954532f
jne 0x4010f3
mov dword [0x404278], 0x10
jmp 0x401123
cmp eax, 0x5442432f
jne 0x401123
mov dword [ebp - 0x28], 1
jmp 0x401123
cmp al, 0x5c
jne 0x401123
mov al, byte [esi - 1]
cmp al, 0x3a
jne 0x401116
lea eax, [esi - 2]
mov dword [ebp - 0xc], eax
jmp 0x401123
cmp al, bl
jle 0x401123
cmp byte [esi + 1], 0x5c
jne 0x401123
mov dword [ebp - 0xc], esi
inc esi
cmp byte [esi], bl
jne 0x4010a2
cmp dword [ebp - 4], ebx
mov dword [ebp - 0x24], edi
je 0x40115d
cmp dword [ebp - 0xc], ebx
je 0x401158
cmp dword [ebp - 0xc], ecx
jae 0x401142
mov esi, ecx
mov byte [ecx], bl
mov cl, byte [esi - 1]
lea eax, [esi - 1]
cmp cl, 0x20
je 0x401152
cmp cl, 0x22
jne 0x401158
mov esi, eax
mov byte [esi], bl
jmp 0x401142
mov dword [ebp - 0x10], esi
jmp 0x401160
mov dword [ebp - 0xc], ebx
test byte [ebp - 4], 1
jne 0x401207
mov eax, dword [ebp - 4]
lea eax, [eax + str.ExecSelect]
push eax
push str.ExecSelect
call dword [sym.imp.USER32.dll_FindWindowA]
cmp eax, ebx
je 0x4011fe
cmp dword [ebp - 0x1c], ebx
jge 0x401198
push ebx
push ebx
push 0x10
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x40185e
cmp dword [0x404278], ebx
jne 0x40185e
cmp dword [ebp - 0x28], ebx
je 0x4011b3
push ebx
push 1
push 0x8002
jmp 0x40118c
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x6c], ebx
cmp byte [ecx], bl
je 0x4011c8
sub esi, ecx
mov dword [ebp - 0x64], ecx
inc esi
mov dword [ebp - 0x68], esi
jmp 0x4011ce
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
lea ecx, [ebp - 0x20]
push ecx
push 0x7e
lea ecx, [ebp - 0x6c]
push 2
push ecx
push ebx
push 0x4a
push eax
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
test eax, eax
je 0x4011f1
cmp dword [ebp - 0x20], ebx
jne 0x40185e
push 0x30
call dword [sym.imp.USER32.dll_MessageBeep]
jmp 0x40185e
cmp dword [ebp - 0x1c], ebx
jl 0x40185e
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x401250
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetProcessDPIAware
push edi
call esi
cmp eax, ebx
je 0x40122c
call eax
push str.ChangeWindowMessageFilter
push edi
call esi
mov esi, eax
cmp esi, ebx
je 0x401249
push 1
push 0x8002
call esi
push 1
push 0x4a
call esi
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, 0x404114
mov eax, 0x154
push ebx
push edi
push eax
push 0x29
mov dword [0x404114], eax
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
test eax, eax
je 0x40185e
push 0x4041b4
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
cmp eax, ebx
mov dword [ebp - 0x30], eax
je 0x40185e
cmp dword [ebp - 0xc], ebx
mov esi, edi
jne 0x4012b2
push ebx
push 0x1a
push edi
push ebx
mov dword [ebp - 0xc], str.ExecSlctMu.txt
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x4012b2
cmp byte [0x404114], bl
je 0x4012b2
inc esi
cmp byte [esi], bl
jne 0x4012ad
mov ecx, dword [ebp - 0xc]
mov al, byte [ecx]
cmp al, bl
je 0x4012c1
mov byte [esi], al
inc esi
inc ecx
jmp 0x4012b5
lea eax, [esi + 4]
push ebx
and al, 0xfc
push 0x8000080
mov dword [0x404110], eax
mov eax, dword [ebp - 4]
sar eax, 1
push 4
and eax, 1
pop ecx
mov byte [esi], bl
sub ecx, eax
push ecx
push ebx
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x401328
mov al, byte [0x40403c]
mov ecx, 0x40403c
cmp al, bl
je 0x40130f
mov byte [esi], al
mov al, byte [ecx + 1]
inc esi
inc ecx
jmp 0x401302
push 0x1030
push str.ExecSelect
push edi
push ebx
mov byte [esi], bl
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x401855
push ebx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x2c], eax
add eax, 4
push eax
push ebx
call edi
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x1c], esi
jne 0x401359
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401436
lea eax, [ebp - 0x20]
push ebx
push eax
push dword [ebp - 0x2c]
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], 1
mov dword [esi + eax], ebx
mov dword [ebp - 0x3c], ebx
cmp word [esi], bx
mov eax, esi
je 0x4013d5
mov dl, byte [eax]
mov ecx, eax
cmp dl, bl
je 0x4013ab
cmp dl, 0xa
je 0x40139e
mov dl, byte [ecx + 1]
inc ecx
jmp 0x40138f
cmp byte [ecx - 1], 0xd
jne 0x4013a9
mov byte [ecx - 1], bl
jmp 0x4013ab
mov byte [ecx], bl
mov dl, byte [eax]
cmp dl, 9
je 0x4013b7
cmp dl, 0x20
jne 0x4013ba
inc eax
jmp 0x4013ab
mov al, byte [eax]
cmp al, 0x3e
jne 0x4013c5
inc dword [ebp - 0x18]
jmp 0x4013cc
cmp al, 0x41
jl 0x4013cc
inc dword [ebp - 0x3c]
cmp word [ecx + 1], bx
lea eax, [ecx + 1]
jne 0x40138b
mov eax, dword [ebp - 0x18]
shl eax, 3
push eax
push ebx
call edi
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x401422
mov eax, dword [ebp - 0x3c]
lea eax, [eax + eax*4]
shl eax, 2
push eax
push ebx
call edi
cmp eax, ebx
mov dword [0x40427c], eax
je 0x401419
call dword [sym.imp.USER32.dll_CreatePopupMenu]
cmp eax, ebx
mov dword [0x404274], eax
jne 0x40142e
push dword [0x40427c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x4013f3
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x401855
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 4], eax
mov dword [ecx], ebx
mov esi, dword [sym.imp.SHELL32.dll_ExtractIconA]
mov edi, str.explorer.exe
push 1
push edi
push ebx
call esi
push 0xc
push edi
push ebx
mov dword [0x4040a0], eax
call esi
mov esi, dword [sym.imp.USER32.dll_LoadIconA]
mov edi, 0x7f00
push edi
push ebx
mov dword [0x4040a4], eax
call esi
push 0x7f02
push ebx
mov dword [0x404098], eax
call esi
push 0xffffffffffffffff
mov dword [0x40409c], eax
call sub.IMM32.dll_ImmDisableIME
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
push edi
push ebx
mov dword [ebp - 0x6c], 0x30
mov dword [ebp - 0x68], 0x20
mov dword [ebp - 0x64], 0x401870
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x54], ebx
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x6c]
mov edi, str.ExecSelect
push eax
mov dword [ebp - 0x4c], 0x10
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], ebx
call dword [sym.imp.USER32.dll_RegisterClassExA]
mov eax, dword [ebp - 4]
push ebx
push esi
push ebx
push ebx
push 0x1c
push 0x70
push ebx
push ebx
lea eax, [eax + str.ExecSelect]
push 0xc00000
push eax
push edi
push 0x88
call dword [sym.imp.USER32.dll_CreateWindowExA]
cmp eax, ebx
mov dword [0x404284], eax
je 0x4017e2
push eax
call dword [sym.imp.USER32.dll_GetDC]
push dword [ebp - 0x30]
mov dword [0x404280], eax
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
push 6
push ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 0x1c]
or dword [0x404278], eax
or dword [ebp - 0x3c], 0xffffffff
xor edi, edi
cmp esi, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x401761
push 0x37
call dword [sym.imp.USER32.dll_GetSystemMetrics]
dec eax
dec eax
mov dword [0x404288], eax
mov eax, esi
cmp word [eax], bx
je 0x401722
cmp byte [esi], bl
mov dword [ebp - 0x14], esi
je 0x40156f
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp byte [eax], bl
jne 0x401565
mov al, byte [esi]
cmp al, 0x20
je 0x401579
cmp al, 9
jne 0x40157c
inc esi
jmp 0x40156f
mov al, byte [esi]
cmp al, bl
je 0x401592
cmp al, 0x21
jne 0x40159a
cmp dword [ebp - 0x3c], ebx
jle 0x401592
mov dword [ebp - 4], 0x20
mov dword [ebp - 8], ebx
jmp 0x40170c
cmp al, 0x24
jne 0x4015bc
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
jl 0x40170c
mov ecx, dword [0x40427c]
lea eax, [eax + eax*4]
inc esi
mov dword [ecx + eax*4 + 0xc], esi
jmp 0x40170c
cmp al, 0x2d
jne 0x4015d6
mov eax, dword [ebp - 0xc]
push ebx
push ebx
push 0x800
push dword [eax + edi*8 + 4]
call dword [sym.imp.USER32.dll_AppendMenuA]
jmp 0x401592
cmp al, 0x40
jne 0x4015e3
inc esi
mov dword [ebp - 8], esi
jmp 0x40170c
jle 0x401686
cmp dword [ebp - 8], ebx
jne 0x4015f1
mov dword [ebp - 8], esi
mov eax, dword [ebp - 0x3c]
push dword [ebp - 8]
add eax, 0x7f
push eax
mov eax, dword [ebp - 4]
or eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0xc]
push dword [eax + edi*8 + 4]
call dword [sym.imp.USER32.dll_AppendMenuA]
test eax, eax
je 0x401592
mov eax, dword [ebp - 0x3c]
mov ecx, dword [0x40427c]
mov edx, dword [ebp - 8]
inc eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 4], ebx
lea eax, [eax + eax*4]
mov dword [ecx + eax*4], edx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [0x40427c]
lea eax, [eax + eax*4]
mov dword [ecx + eax*4 + 8], ebx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [0x40427c]
lea eax, [eax + eax*4]
mov dword [ecx + eax*4 + 0x10], ebx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [0x40427c]
lea eax, [eax + eax*4]
mov dword [ecx + eax*4 + 0xc], esi
cmp byte [esi], 0x5b
jne 0x401671
mov al, byte [esi + 1]
inc esi
cmp al, bl
jle 0x401671
cmp al, 0x41
jl 0x401665
mov eax, dword [ebp - 0x3c]
mov ecx, dword [0x40427c]
lea eax, [eax + eax*4]
mov dword [ecx + eax*4 + 4], esi
jmp 0x401592
cmp al, 0x3e
jne 0x4016d8
call dword [sym.imp.USER32.dll_CreatePopupMenu]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x4016ca
inc esi
push esi
push eax
mov eax, dword [ebp - 4]
or ax, 0x218
push eax
mov eax, dword [ebp - 0xc]
push dword [eax + edi*8 + 4]
call dword [sym.imp.USER32.dll_AppendMenuA]
test eax, eax
je 0x4016ca
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
inc edi
mov dword [ebp - 4], ebx
lea eax, [eax + edi*8]
mov dword [eax + 4], ecx
mov dword [eax], edi
jmp 0x401592
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_DestroyMenu]
jmp 0x401592
cmp al, 0x3c
jne 0x4016f3
cmp edi, ebx
jle 0x4016ec
mov eax, dword [ebp - 0xc]
mov edi, dword [eax + edi*8 - 8]
jmp 0x401592
xor edi, edi
jmp 0x401592
cmp al, 0x3f
jne 0x40170c
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
jl 0x40170c
mov ecx, dword [0x40427c]
lea eax, [eax + eax*4]
inc esi
mov dword [ecx + eax*4 + 8], esi
mov eax, dword [ebp - 0x14]
cmp byte [eax + 1], 0xa
lea esi, [eax + 1]
jne 0x401719
inc esi
cmp word [esi], bx
jne 0x40155e
cmp dword [ebp - 0x24], ebx
je 0x401742
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x3c]
push ebx
push eax
push 0x40235d
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x38], eax
jmp 0x401745
mov dword [ebp - 0x38], ebx
cmp dword [ebp - 0x3c], ebx
jge 0x40174e
cmp edi, ebx
jle 0x401761
push ebx
push ebx
push 0x800
push dword [0x404274]
call dword [sym.imp.USER32.dll_AppendMenuA]
push 0x404014
push 0x7d
push ebx
push dword [0x404274]
call dword [sym.imp.USER32.dll_AppendMenuA]
mov eax, dword [0x404278]
and eax, 0x11
cmp al, 0x10
je 0x40179e
mov eax, dword [ebp - 0x28]
cmp eax, ebx
jne 0x40178b
mov eax, dword [ebp - 0x10]
push ebx
push eax
push 0x8002
push dword [0x404284]
call dword [sym.imp.USER32.dll_PostMessageA]
push 0x7f
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x34]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push ebx
push ebx
lea eax, [ebp - 0x6c]
push ebx
push eax
call esi
test eax, eax
je 0x4017d7
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push ebx
push ebx
lea eax, [ebp - 0x6c]
push ebx
push eax
jmp 0x4017be
call dword [sym.imp.ole32.dll_CoUninitialize]
push dword [ebp - 0x38]
call edi
cmp dword [ebp - 0x3c], ebx
mov esi, dword [sym.imp.USER32.dll_DestroyIcon]
jl 0x40180a
mov eax, dword [ebp - 0x3c]
mov ecx, dword [0x40427c]
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*4 + 0x10]
cmp eax, 0x10
jb 0x401805
push eax
call esi
dec dword [ebp - 0x3c]
jns 0x4017ed
mov eax, dword [ebp - 0x18]
dec eax
cmp eax, ebx
jl 0x40182d
mov ecx, dword [ebp - 0xc]
lea edi, [ecx + eax*8 + 4]
inc eax
mov dword [ebp - 0x28], eax
push dword [edi]
call dword [sym.imp.USER32.dll_DestroyMenu]
sub edi, 8
dec dword [ebp - 0x28]
jne 0x40181d
push dword [0x4040a0]
call esi
push dword [0x4040a4]
call esi
push dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
call esi
push dword [ebp - 0xc]
call esi
push dword [0x40427c]
call esi
push dword [ebp - 0x30]
call dword [sym.imp.GDI32.dll_DeleteObject]
push 0x7f
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]