Function at 0x6e7c70
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 0x6e7cc0
test cl, 1
je 0x6e7ce3
test edx, 0x20000
je 0x6e7cad
test edx, 0x2000000
jne 0x6e7d01
and edx, 0x400000
je 0x6e7d70
xor esi, esi
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
jns 0x6e7c91
mov dword [esp + 8], 0x406
mov dword [esp + 4], 0x86b320
mov dword [esp], 0x86b8ab
call dbg._assert
mov edx, dword [ebx + 0x2c]
jmp 0x6e7c91
test cl, 0x40
je 0x6e7c91
mov edx, ecx
and edx, 0xfffffebf
and ecx, 0x20
mov dword [ebx + 0x2c], edx
je 0x6e7c91
mov eax, dword [ebx + 4]
sub dword [eax + 4], 1
jmp 0x6e7c91
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 0x6e7cad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x6e7caf
mov dword [esp], 0x947a60
call dbg.uv_sem_wait
mov eax, 2
xchg dword [0x947a80], eax
cmp eax, 1
je 0x6e7da4
mov dword [esp], 0x947a60
call dbg.uv_sem_post
or dword [ebx + 0x2c], 0x400000
jmp 0x6e7cad
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 0x6e7e07
mov dword [esp + 4], 0x947a64
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
sub esp, 8
test eax, eax
jne 0x6e7ec0
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 0x6e7ea0
cmp edi, 0xffffffff
je 0x6e7d98
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x6e7d98
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 0xffffffff
mov ebp, eax
jne 0x6e7f4b
mov esi, eax
test ebp, ebp
jne 0x6e7caf
jmp 0x6e7d98
lock or dword [0x947a7c], 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 0x6e7e87
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 0x6e7eb3