Function at 0x41e921
Capabilities:
Get common file path
Log keystrokes via polling
Query environment variable
Set current directory

Disassembly:
push ebp
mov eax, 0x41b4
lea ebp, [esp - 0x74]
call fcn.0046cf20
push ebx
push esi
mov dword [ebp + 0x54], ecx
push edi
lea ecx, [ebp + 0x7c]
call fcn.00409e64
xor esi, esi
mov dword [ebp + 0x6c], 1
mov byte [ebp + 0x73], 0
xor bl, bl
mov dword [ebp + 0x40], esi
mov dword [ebp + 0x60], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp + 0x24], eax
push 4
lea eax, [ebp + 0x7c]
push eax
push str.sys
mov dword [ebp + 0x3c], 0x3e8
call fcn.0042df66
mov byte [ebp + 0x58], al
push 5
lea eax, [ebp + 0x7c]
push eax
push str.sys0
call fcn.0042df66
add esp, 0x18
test al, al
je 0x41e991
mov byte [ebp + 0x58], 0x41
push 7
lea eax, [ebp + 0x7c]
push eax
push str.syscmd
call fcn.0042df66
add esp, 0xc
test al, al
je 0x41e9ac
mov byte [ebp + 0x58], 0x10
push 8
lea eax, [ebp + 0x7c]
push eax
push str.sys0cmd
call fcn.0042df66
add esp, 0xc
test al, al
je 0x41e9c7
mov byte [ebp + 0x58], 0x50
cmp byte [ebp + 0x58], 0
je 0x41eae5
push 0x4975e4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str.GlobalPECMD:main:lock
call fcn.0040c032
mov ebx, dword [ebp + 0x58]
and ebx, 0x40
push ebx
mov dword [ebp + 0x68], eax
call fcn.0040bff9
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
pop ecx
pop ecx
push dword [ebp + 0x7c]
mov dword [ebp + 0x60], eax
call edi
mov esi, eax
add esi, 0x10
lea eax, [esi + 0x65]
push eax
lea ecx, [ebp + 0x6c]
call fcn.0042c415
mov eax, dword [ebp + 0x6c]
and word [eax], 0
test byte [ebp + 0x58], 0x10
jne 0x41ea37
push dword [ebp + 0x24]
push str.THREAD_WAIT__cur:_lu
push dword [ebp + 0x6c]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push dword [ebp + 0x6c]
call edi
mov ecx, dword [ebp + 0x6c]
inc esi
push esi
push dword [ebp + 0x7c]
lea eax, [ecx + eax*2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov esi, dword [ebp + 0x6c]
push esi
call edi
shl eax, 1
push eax
push esi
push 1
push str.HOTKEY9000000
push str.SOFTWAREPELOGON
push 0x80000002
call fcn.00427da9
add esp, 0x18
cmp dword [ebp + 0x60], 0
jne 0x41ea89
push ebx
push dword [ebp + 0x54]
call fcn.0041255a
test eax, eax
pop ecx
pop ecx
mov dword [ebp + 0x60], eax
je 0x41eab9
push 0
push 0x895440
push 0x312
push dword [ebp + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [ebp + 0x6c]
mov esi, eax
call fcn.0042704a
cmp dword [ebp + 0x68], 0
je 0x41ead3
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x41ead3
lea ecx, [ebp + 0x6c]
call fcn.0042704a
cmp dword [ebp + 0x68], 0
je 0x41ead0
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor esi, esi
inc esi
push 0x4975e4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x41f268
mov ecx, dword [ebp + 0x7c]
cmp word [ecx], 0x2d
jne 0x41ec3a
push 5
lea eax, [ebp + 0x7c]
push eax
push str._cont
call fcn.0042df66
add esp, 0xc
test al, al
je 0x41eb12
mov dword [ebp + 0x40], 0x10000
jmp 0x41eb76
push 8
lea eax, [ebp + 0x7c]
push eax
push str._scanall
call fcn.0042df66
add esp, 0xc
test al, al
je 0x41eb2d
mov bl, 1
jmp 0x41eb76
push 4
lea eax, [ebp + 0x7c]
push eax
push str._ncd
call fcn.0042df66
add esp, 0xc
test al, al
je 0x41eb4d
mov dword [ebp + 0x60], 0x40
jmp 0x41eb76
push 5
push dword [ebp + 0x7c]
push str._cur:
call fcn.00427f14
add esp, 0xc
test al, al
je 0x41eb85
add dword [ebp + 0x7c], 0xa
lea eax, [ebp + 0x24]
push eax
lea eax, [ebp + 0x7c]
push eax
call fcn.0042ed5c
pop ecx
pop ecx
mov ecx, dword [ebp + 0x7c]
cmp word [ecx], 0x2d
je 0x41eaf2
jmp 0x41eb88
mov ecx, dword [ebp + 0x7c]
test bl, bl
je 0x41ec3a
lea ecx, [ebp + 0x60]
mov ebx, str.PressKey
call fcn.0042c3f7
mov eax, dword [ebp + 0x7c]
cmp word [eax], si
je 0x41ebba
push 0x2c
lea eax, [ebp + 0x60]
push eax
lea eax, [ebp + 0x7c]
push eax
call fcn.0042e8ac
mov ebx, dword [ebp + 0x60]
add esp, 0xc
push 0x3f
xor eax, eax
mov byte [ebp - 0x13c], 0
pop ecx
lea edi, [ebp - 0x13b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
xor esi, esi
mov word [ebp - 0x4140], si
lea edi, [ebp - 0x4140]
movzx eax, byte [ebp + esi - 0x13c]
push eax
push 0x4840d0
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
inc esi
add edi, 0xa
cmp esi, 0x100
jl 0x41ebed
mov ecx, dword [ebp + 0x54]
and word [ebp - 0x3742], 0
lea eax, [ebp - 0x4140]
push eax
push ebx
call fcn.0042af0d
lea ecx, [ebp + 0x60]
call fcn.0042704a
and dword [ebp + 0x6c], 0
jmp 0x41f25b
mov esi, 0x80000000
mov dword [ebp + 0x64], esi
cmp word [ecx], 0x2d
jne 0x41ec70
lea eax, [ecx + 2]
mov dx, word [eax]
or dx, 0x20
cmp dx, 0x63
je 0x41ec70
cmp dx, 0x64
je 0x41ec70
lea ecx, [ebp + 0x7c]
mov dword [ebp + 0x7c], eax
mov byte [ebp + 0x73], 1
call fcn.00409e64
mov ecx, dword [ebp + 0x7c]
cmp word [ecx], 0x3d
jne 0x41ec7f
mov bl, byte [ecx]
inc ecx
inc ecx
mov dword [ebp + 0x7c], ecx
jmp 0x41ec81
xor bl, bl
xor eax, eax
mov ax, word [ecx]
push eax
call fcn.0040ee76
add esp, 4
test al, al
je 0x41eca5
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp + 0x7c]
push eax
call fcn.0042ed5c
pop ecx
pop ecx
mov ecx, dword [ebp + 0x7c]
cmp word [ecx], 0x2a
je 0x41edbe
cmp dword [ebp + 0x64], esi
je 0x41edbe
and word [ebp - 0x3a], 0
and word [ebp - 0x3c], 0
lea ecx, [ebp + 0x68]
mov edi, str.PressKey
call fcn.0042c3f7
mov eax, dword [ebp + 0x7c]
cmp word [eax], 0x2c
jne 0x41ecf9
add dword [ebp + 0x7c], 2
push 0x2c
lea eax, [ebp + 0x68]
push eax
lea eax, [ebp + 0x7c]
push eax
call fcn.0042e8ac
mov eax, dword [ebp + 0x68]
add esp, 0xc
cmp word [eax], 0
je 0x41ecf9
mov edi, eax
cmp byte [ebp + 0x73], 0
mov ecx, dword [ebp + 0x64]
jne 0x41ed48
test ecx, ecx
je 0x41ed43
jl 0x41eda4
test bl, bl
push ecx
je 0x41ed36
and dword [ebp + 0x6c], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 0x7c]
mov dword [ebp + 0x64], esi
cmp word [eax], 0
jne 0x41eda4
lea ecx, [ebp + 0x68]
call fcn.0042704a
xor eax, eax
jmp 0x41f268
mov ecx, dword [ebp + 0x54]
call fcn.0040b65c
mov dword [ebp + 0x6c], eax
jmp 0x41eda1
push 2
pop eax
jmp 0x41ed4b
xor eax, eax
inc eax
or eax, dword [ebp + 0x40]
push eax
push ecx
call fcn.0041502f
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
mov dword [ebp + 0x6c], ecx
je 0x41ed94
cmp ecx, 0x41
jl 0x41ed6a
cmp ecx, 0x5a
jle 0x41ed77
push ecx
call fcn.0040ee76
add esp, 4
test al, al
je 0x41ed81
movsx ax, cl
mov word [ebp - 0x3c], ax
jmp 0x41ed94
push ecx
lea eax, [ebp - 0x3c]
push str.0x_X
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov ecx, dword [ebp + 0x54]
lea eax, [ebp - 0x3c]
push eax
push edi
call fcn.0042af0d
mov dword [ebp + 0x64], esi
lea ecx, [ebp + 0x7c]
call fcn.00409e64
lea ecx, [ebp + 0x68]
mov dword [ebp + 0x64], esi
mov byte [ebp + 0x73], 0
call fcn.0042704a
mov ecx, dword [ebp + 0x7c]
cmp word [ecx], 0
je 0x41f25b
xor edi, edi
mov dword [ebp + 0x48], edi
xor bl, bl
or esi, 0xffffffff
cmp word [ecx], 0x2a
jne 0x41edf1
mov eax, dword [ebp + 0x24]
inc ecx
xor esi, esi
inc ecx
inc esi
mov dword [ebp + 0x48], eax
jmp 0x41ede8
inc esi
inc ecx
inc ecx
mov dword [ebp + 0x7c], ecx
cmp word [ecx], 0x2a
je 0x41ede5
cmp esi, edi
jle 0x41ee49
mov ax, word [ecx]
cmp ax, 0x2d
jne 0x41ee08
inc ecx
inc ecx
mov dword [ebp + 0x7c], ecx
mov dword [ebp + 0x48], edi
jmp 0x41ee49
cmp ax, 0x3d
jne 0x41ee15
inc ecx
inc ecx
mov dword [ebp + 0x7c], ecx
mov bl, 1
xor eax, eax
mov ax, word [ecx]
push eax
call fcn.0040ee76
add esp, 4
test al, al
je 0x41ee37
lea eax, [ebp + 0x48]
push eax
lea eax, [ebp + 0x7c]
push eax
call fcn.0042ed5c
pop ecx
pop ecx
dec esi
cmp esi, edi
jle 0x41ee49
push esi
push dword [ebp + 0x48]
call fcn.0040cd57
pop ecx
pop ecx
mov dword [ebp + 0x48], eax
or dword [ebp + 0x34], 0xffffffff
lea ecx, [ebp + 0x7c]
call fcn.00409e64
mov eax, dword [ebp + 0x7c]
cmp word [eax], 0x3d
jne 0x41ee6a
mov cl, byte [eax]
inc eax
inc eax
mov byte [ebp + 0x5f], cl
mov dword [ebp + 0x7c], eax
jmp 0x41ee6e
mov byte [ebp + 0x5f], 0
movzx eax, word [eax]
push eax
call fcn.0040ee76
add esp, 4
test al, al
je 0x41ee8d
lea eax, [ebp + 0x34]
push eax
lea eax, [ebp + 0x7c]
push eax
call fcn.0042ed5c
pop ecx
pop ecx
cmp dword [ebp + 0x48], edi
mov dword [ebp + 0x44], edi
mov dword [ebp + 0x6c], edi
je 0x41eec3
test bl, bl
push dword [ebp + 0x48]
push edi
push 0x100000
je 0x41eead
call dword [sym.imp.KERNEL32.dll_OpenThread]
jmp 0x41eeb3
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, edi
mov dword [ebp + 0x44], eax
jne 0x41eec3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x6c], eax
push 0x209
lea ecx, [ebp + 0x4c]
call fcn.0042c415
mov eax, dword [ebp + 0x4c]
mov word [eax], di
push dword [ebp + 0x4c]
mov esi, 0x208
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp + 0x4c]
push eax
lea ecx, [ebp + 0x38]
call fcn.0043622f
push 0x5c
push dword [ebp + 0x38]
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov eax, dword [ebp + 0x4c]
push esi
mov word [eax], di
push dword [ebp + 0x4c]
push str.SystemRoot
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push dword [ebp + 0x38]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp + 0x7c]
call fcn.00409e64
lea ecx, [ebp + 0x28]
call fcn.0042c663
mov eax, dword [ebp + 0x7c]
cmp word [eax], di
mov dword [ebp + 0x20], edi
je 0x41f069
push 4
pop ebx
cmp byte [0x495280], 0
jle 0x41f069
push 7
lea eax, [ebp + 0x7c]
push eax
push str._delms:
call fcn.0042df66
add esp, 0xc
test al, al
je 0x41ef80
lea eax, [ebp + 0x3c]
push eax
lea eax, [ebp + 0x7c]
push eax
call fcn.0042ed5c
cmp dword [ebp + 0x3c], edi
pop ecx
pop ecx
jge 0x41f055
mov dword [ebp + 0x3c], edi
jmp 0x41f055
push ebx
lea eax, [ebp + 0x7c]
push eax
push str._del
call fcn.0042df66
add esp, 0xc
test al, al
je 0x41f035
mov eax, dword [ebp + 0x7c]
mov dword [ebp + 0x50], eax
push 1
lea eax, [ebp + 0x40]
push eax
lea eax, [ebp + 0x50]
push eax
mov dword [ebp + 0x40], edi
call fcn.00413513
add esp, 0xc
lea ecx, [ebp + 0x68]
mov dword [ebp + 0x7c], eax
call fcn.0042c3f7
lea ecx, [ebp + 0x58]
call fcn.0042c3f7
push dword [ebp + 0x40]
lea ecx, [ebp + 0x58]
push dword [ebp + 0x50]
call fcn.0042c51d
lea eax, [ebp + 0x68]
push eax
push dword [ebp + 0x58]
call fcn.0040d360
pop ecx
pop ecx
lea ecx, [ebp + 0x58]
call fcn.0042704a
cmp dword [ebp + 0x40], edi
jle 0x41f023
push ebx
call fcn.0046c708
cmp eax, edi
pop ecx
je 0x41f008
mov ecx, dword [ebp + 0x68]
mov dword [eax], ecx
mov dword [ebp + 0x68], edi
mov esi, eax
jmp 0x41f00a
xor esi, esi
push ebx
lea eax, [ebp + 0x2c]
push eax
lea eax, [ebp + 0x28]
push eax
push dword [ebp + 0x30]
call fcn.0042c626
add esp, 0x10
mov dword [eax], esi
inc dword [ebp + 0x30]
lea ecx, [ebp + 0x7c]
call fcn.00409e64
lea ecx, [ebp + 0x68]
call fcn.0042704a
jmp 0x41f055
push ebx
lea eax, [ebp + 0x7c]
push eax
push str._cmd
call fcn.0042df66
add esp, 0xc
test al, al
jne 0x41f063
lea eax, [ebp + 0x7c]
push eax
call fcn.00403c51
pop ecx
mov eax, dword [ebp + 0x7c]
cmp word [eax], di
jne 0x41ef3c
jmp 0x41f069
mov eax, dword [ebp + 0x7c]
mov dword [ebp + 0x20], eax
cmp byte [ebp + 0x73], 0
je 0x41f072
neg dword [ebp + 0x64]
cmp dword [ebp + 0x60], edi
jne 0x41f085
cmp dword [ebp + 0x44], edi
je 0x41f085
push dword [ebp + 0x4c]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
mov esi, eax
add esi, dword [ebp + 0x64]
cmp dword [ebp + 0x44], edi
je 0x41f134
jmp 0x41f127
cmp dword [ebp + 0x64], 0
je 0x41f134
mov edi, 0x3e8
jle 0x41f0c2
call ebx
mov ecx, esi
sub ecx, eax
mov dword [ebp + 0x64], ecx
js 0x41f134
cmp ecx, edi
jge 0x41f0c2
mov edi, ecx
push 0x4ff
push edi
push 0
lea eax, [ebp + 0x44]
push eax
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
test eax, eax
je 0x41f134
cmp byte [0x495280], 0
mov dword [ebp + 0x50], 0x64
jle 0x41f134
xor edi, edi
push 1
push edi
push edi
push edi
lea eax, [ebp + 4]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x41f127
dec dword [ebp + 0x50]
je 0x41f127
cmp dword [ebp + 8], 0x12
je 0x41f127
lea eax, [ebp + 4]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp + 4]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp byte [0x495280], 0
jg 0x41f0ec
cmp byte [0x495280], 0
jg 0x41f0a0
xor ebx, ebx
cmp dword [ebp + 0x34], ebx
jl 0x41f153
cmp byte [ebp + 0x5f], bl
push dword [ebp + 0x34]
je 0x41f14b
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x41f153
mov ecx, dword [ebp + 0x54]
call fcn.0040b65c
cmp dword [ebp + 0x30], ebx
jle 0x41f20d
cmp byte [0x495280], 0
jle 0x41f20d
cmp dword [ebp + 0x60], ebx
jne 0x41f177
push dword [ebp + 0x4c]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [ebp + 0x30], ebx
mov eax, dword [ebp + 0x28]
mov dword [ebp + 0x40], eax
jle 0x41f20d
cmp byte [0x495280], 0
jle 0x41f20d
mov eax, dword [ebp + 0x30]
xor edi, edi
cmp eax, ebx
mov dword [ebp + 0x50], ebx
mov dword [ebp + 0x68], eax
jle 0x41f20d
cmp byte [0x495280], 0
jle 0x41f1f3
mov eax, dword [ebp + 0x40]
lea esi, [eax + edi*4]
mov eax, dword [esi]
cmp eax, ebx
je 0x41f1eb
push 0
push dword [eax]
call fcn.0041dbfb
mov eax, dword [esi]
push dword [eax]
call fcn.0046c0a6
add esp, 0xc
test eax, eax
jne 0x41f1e5
mov ebx, dword [esi]
test ebx, ebx
je 0x41f1e0
mov ecx, ebx
call fcn.0042704a
push ebx
call fcn.0046c540
pop ecx
and dword [esi], 0
jmp 0x41f1eb
lea eax, [edi + 1]
mov dword [ebp + 0x50], eax
inc edi
xor ebx, ebx
cmp edi, dword [ebp + 0x68]
jl 0x41f19e
mov esi, dword [ebp + 0x50]
cmp esi, ebx
jle 0x41f20d
push dword [ebp + 0x3c]
mov ecx, dword [ebp + 0x54]
call fcn.0040b65c
mov dword [ebp + 0x30], esi
jmp 0x41f186
cmp dword [ebp + 0x60], ebx
jne 0x41f220
cmp dword [ebp + 0x44], ebx
je 0x41f220
push dword [ebp + 0x38]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [ebp + 0x20]
cmp eax, ebx
je 0x41f23b
cmp word [eax], bx
je 0x41f23b
mov ecx, dword [ebp + 0x54]
push ebx
push ebx
push ebx
push eax
call fcn.00420c52
mov dword [ebp + 0x6c], eax
lea ecx, [ebp + 0x28]
call fcn.0043f614
lea ecx, [ebp + 0x38]
call fcn.0042704a
lea ecx, [ebp + 0x4c]
call fcn.0042704a
lea ecx, [ebp + 0x44]
call fcn.0040296e
mov ecx, dword [ebp + 0x54]
push 0
call fcn.0044b61d
mov eax, dword [ebp + 0x6c]
pop edi
pop esi
pop ebx
add ebp, 0x74
leave
ret 4