Function at 0x12172f30
Capabilities:
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x1219be08]
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x14
push eax
push 0x40
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 0x24], 0
jne 0x12172f81
xor eax, eax
jmp 0x12173117
mov dword [ebp - 0x14], 0
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x20], edx
jmp 0x12172fab
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x24]
add ecx, 0x14
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x20]
add edx, 0x14
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0x10]
jae 0x121730f1
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
mov ax, word [edx]
mov word [ecx], ax
mov ecx, dword [ebp - 0x20]
movzx edx, word [ecx]
cmp edx, 1
jne 0x12173067
push 8
push 0
lea eax, [ebp - 0xc]
push eax
call sub.MSVCR71.dll_memset
add esp, 0xc
push 4
push 0
lea ecx, [ebp - 0x18]
push ecx
call sub.MSVCR71.dll_memset
add esp, 0xc
mov edx, dword [ebp - 0x20]
mov ax, word [edx + 0xe]
mov word [ebp - 0xc], ax
push 0
push 0
push 4
lea ecx, [ebp - 0x18]
push ecx
push 0xffffffffffffffff
lea edx, [ebp - 0xc]
push edx
push 0
push 1
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov eax, dword [ebp - 0x24]
mov cl, byte [ebp - 0x18]
mov byte [eax + 0xe], cl
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov cx, word [eax + 8]
mov word [edx + 8], cx
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov cx, word [eax + 0xa]
mov word [edx + 0xa], cx
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov cx, word [eax + 0xc]
mov word [edx + 0xc], cx
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x10]
mov dword [edx + 0x10], ecx
jmp 0x121730ec
mov edx, dword [ebp - 0x20]
movzx eax, word [edx]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
sub ecx, 2
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x28], 0xe
ja case.0x12173089.1
mov edx, dword [ebp - 0x28]
movzx eax, byte [edx + 0x12173139]
jmp dword [eax*4 + 0x12173125]
mov ecx, dword [ebp - 0x20]
add ecx, 4
mov edx, dword [ebp - 0x24]
add edx, 4
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [ecx + 8]
mov dword [edx + 8], eax
mov ecx, dword [ecx + 0xc]
mov dword [edx + 0xc], ecx
jmp 0x121730ec
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 4], eax
jmp 0x121730ec
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 4], eax
jmp 0x121730ec
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 4], eax
jmp 0x121730ec
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.kernel32.dll_GlobalFree]
xor eax, eax
jmp 0x12173117
jmp 0x12172f90
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.kernel32.dll_WriteConsoleInputA]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.kernel32.dll_GlobalFree]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
call fcn.1218af21
mov esp, ebp
pop ebp
ret 0x10