Function at 0x48d11c
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x20
mov eax, dword [eax + 0x4f]
mov dword [0x698fa0], ebx
mov edi, dword [eax + 7]
lea eax, [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.KERNEL32.dll_GetNumberOfConsoleInputEvents
sub esp, 8
test eax, eax
je 0x48d1e3
mov edx, dword [ebp - 0xc]
test edx, edx
je 0x48d1d0
lea eax, [edx + edx*4]
lea eax, [eax*4 + 0x1e]
and eax, 0xfffffff0
call fcn.004ea990
mov dword [esp + 8], edx
lea esi, [esp + 0x1f]
and esi, 0xfffffff0
mov dword [esp + 4], esi
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp], edi
call sub.KERNEL32.dll_PeekConsoleInputA
sub esp, 0x10
test eax, eax
je 0x48d1e3
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x48d1d0
xor edx, edx
cmp edx, ecx
jae 0x48d1d0
xor eax, eax
jmp 0x48d1a8
inc edx
add eax, 0x14
cmp edx, ecx
jae 0x48d1d0
cmp word [eax + esi], 1
jne 0x48d1a0
mov edi, dword [eax + esi + 4]
test edi, edi
je 0x48d1a0
cmp byte [eax + esi + 0xe], 0
je 0x48d1a0
xor eax, eax
mov dword [0x698fa0], eax
xor eax, eax
jmp 0x48d1dc
xor eax, eax
mov dword [0x698fa0], eax
mov eax, 2
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
call fcn.00439640
push ebp
mov ebp, esp
push edi
lea edi, [ebp - 0x28]
push esi
add esp, 0xffffff80
mov dword [0x698fa0], ebx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov eax, dword [eax + 0x4f]
mov esi, dword [eax + 7]
lea esi, [esi]
lea edi, [edi]
mov dword [esp + 4], edi
lea eax, [ebp - 0x3c]
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.004723f4
test eax, eax
je 0x48d474
cmp dword [ebp - 0x3c], 1
jne 0x48d4d3
cmp word [ebp - 0x28], 1
jne 0x48d210
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x48d210
mov eax, dword [ebp - 0x20]
cmp ax, 1
ja 0x48d32b
movzx edx, byte [ebp - 0x1a]
cmp dl, 0x20
mov byte [ebp - 0x59], dl
ja 0x48d35c
movzx ecx, word [ebp - 0x1e]
xor eax, eax
jmp 0x48d272
inc eax
cmp eax, 0x68
ja 0x48d412
mov edx, eax
shl edx, 4
cmp cx, word [edx + 0x567bd0]
jne 0x48d268
mov eax, dword [edx + 0x567bd4]
mov dword [ebp - 0x38], eax
mov eax, dword [edx + 0x567bd8]
mov dword [ebp - 0x34], eax
mov eax, dword [edx + 0x567bdc]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x18]
test al, 0x10
je 0x48d2a6
or byte [ebp - 0x30], 4
test al, 0xc
je 0x48d2ae
or byte [ebp - 0x30], 1
test al, 3
jne 0x48d3ef
xor eax, eax
mov dword [0x698fa0], eax
mov eax, dword [ebp - 0x38]
test eax, eax
jne 0x48d2ce
cmp byte [ebp - 0x30], 0
je 0x48d49b
mov dword [ebx], 0x5024a1
mov eax, dword [ebp - 0x38]
lea edx, [ebx + 4]
mov ebx, edx
test eax, eax
jne 0x48d3f8
mov eax, dword [ebp - 0x34]
lea ebx, [edx + 4]
shl eax, 7
add eax, 0x27
mov dword [edx], eax
mov dword [ebx], 0x504361
lea edx, [ebx + 4]
lea ebx, [edx + 4]
movzx eax, byte [ebp - 0x30]
shl eax, 7
add eax, 7
mov dword [edx], eax
mov eax, 4
mov dword [esp + 4], eax
mov dword [esp], 0x504381
call fcn.0044555c
mov eax, dword [0x698da0]
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
dec eax
mov edx, 1
mov word [ebp - 0x20], ax
lea eax, [ebp - 0x40]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.KERNEL32.dll_WriteConsoleInputA
sub esp, 0x10
test eax, eax
jne 0x48d250
call fcn.00439640
mov dword [ebp - 0x44], 0
mov eax, dword [ebp + 8]
mov edx, dword [eax]
lea eax, [ebp - 0x44]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x50]
mov ecx, dword [edx + 0x43]
mov dword [ebp - 0x58], eax
movzx eax, byte [ebp - 0x59]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov byte [ebp - 0x50], al
lea eax, [ebp - 0x40]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x54]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x48]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x58]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], ecx
call dword [ecx + 0x1b]
test byte [ebp - 0x18], 3
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x44]
mov byte [ebp - 0x30], 0
mov dword [ebp - 0x34], eax
je 0x48d2b6
mov dword [esp], eax
call fcn.0044bfd0
mov dword [ebp - 0x34], eax
mov dword [esp], eax
call fcn.0044bff8
cmp dword [ebp - 0x34], eax
je 0x48d3ef
test byte [ebp - 0x18], 0x10
je 0x48d3ef
or byte [ebp - 0x30], 4
or byte [ebp - 0x30], 2
jmp 0x48d2b6
mov dword [esp], eax
call fcn.0044ad20
mov dword [esp], eax
call fcn.004b8118
mov dword [ebx], eax
add ebx, 4
jmp 0x48d2f2
movzx ecx, cx
cmp ecx, 0x14
ja 0x48d42c
mov eax, 1
shl eax, cl
test eax, 0x170000
jne 0x48d210
movsx eax, byte [ebp - 0x59]
mov dword [esp + 0x10], eax
movzx eax, word [ebp - 0x1c]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
mov eax, str._0x0400__Unknown_keyboard_event__VKeyCode___d__VScanCode___d__AsciiChar___d_n
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00482c20
mov dword [esp + 4], edi
lea eax, [ebp - 0x3c]
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.004723f4
test eax, eax
jne 0x48d22b
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x48d357
mov dword [ebx], 0x4fc781
xor eax, eax
add ebx, 4
mov dword [0x698fa0], eax
call fcn.0043a1a4
jmp 0x48d1f3
mov dword [ebx], 0x504341
mov eax, dword [ebp - 0x34]
lea edx, [ebx + 4]
lea ebx, [edx + 4]
shl eax, 7
add eax, 0x27
mov dword [edx], eax
mov eax, 2
mov dword [esp + 4], eax
mov dword [esp], 0x504381
call fcn.0044555c
mov eax, dword [0x698da0]
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.c:_usr_work_edrive_w32texsrc_clisp249_clisp_2.49_src_stream.d
mov esi, 0x2158
mov dword [esp + 4], esi
call fcn.00420a64