Function at 0x478410
Capabilities:
Log keystrokes
Manipulate console buffer

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [esp + 0x60]
mov ecx, dword [ebx + 0x2c]
mov edx, ecx
and dh, 0xfe
sub dword [ebx + 0x40], 1
mov dword [ebx + 0x2c], edx
jne 0x478460
test cl, 1
je 0x478483
test edx, 0x20000
je 0x47844d
test edx, 0x2000000
jne 0x4784a1
and edx, 0x400000
je 0x478510
xor esi, esi
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
jns 0x478431
mov dword [esp + 8], 0x406
mov dword [esp + 4], 0x6467c0
mov dword [esp], 0x646d4b
call fcn.004a0380
mov edx, dword [ebx + 0x2c]
jmp 0x478431
test cl, 0x40
je 0x478431
mov edx, ecx
and edx, 0xfffffebf
and ecx, 0x20
mov dword [ebx + 0x2c], edx
je 0x478431
mov eax, dword [ebx + 4]
sub dword [eax + 4], 1
jmp 0x478431
lea eax, [esp + 0x2c]
lea edx, [esp + 0x28]
mov dword [esp + 8], 1
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x90]
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
sub esp, 0x10
test eax, eax
jne 0x47844d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x47844f
mov dword [esp], 0x6ab660
call fcn.00472cd0
mov eax, 2
xchg dword [0x6ab680], eax
cmp eax, 1
je 0x478544
mov dword [esp], 0x6ab660
call fcn.00472c90
or dword [ebx + 0x2c], 0x400000
jmp 0x47844d
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.conout_
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
mov edi, eax
je 0x4785a7
mov dword [esp + 4], 0x6ab664
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
sub esp, 8
test eax, eax
jne 0x478660
mov ecx, 1
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], 0xd0001
mov word [esp + 0x2c], cx
mov dword [esp + 4], 0
mov esi, 0xd
mov dword [esp], 0xd
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
sub esp, 8
mov word [esp + 0x38], ax
lea eax, [esp + 0x28]
mov dword [esp + 8], 1
mov word [esp + 0x3a], si
mov dword [esp + 0x3c], 0
mov dword [esp + 0xc], eax
lea eax, [esp + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x90]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
sub esp, 0x10
test eax, eax
je 0x478640
cmp edi, 0xffffffff
je 0x478538
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x478538
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 0xffffffff
mov ebp, eax
jne 0x4786eb
mov esi, eax
test ebp, ebp
jne 0x47844f
jmp 0x478538
lock or dword [0x6ab67c], 1
mov eax, 1
mov word [esp + 0x2c], ax
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], 0xd0001
mov dword [esp + 4], 0
mov dword [esp], 0xd
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
sub esp, 8
mov edx, 0xd
mov word [esp + 0x38], ax
lea eax, [esp + 0x28]
mov dword [esp + 8], 1
mov word [esp + 0x3a], dx
mov dword [esp + 0x3c], 0
mov dword [esp + 0xc], eax
lea eax, [esp + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x90]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
sub esp, 0x10
test eax, eax
jne 0x478627
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov dword [esp], edi
mov esi, ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x478653