Function at 0x402f80
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
mov eax, dword [0x44d014]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push edx
push ecx
mov esi, ecx
mov edx, 0x100
push esi
push 0xffffffffffffffff
lea ecx, [ebp - 0x20c]
call fcn.00402e80
mov edi, eax
add esp, 0x10
mov dword [ebp - 0x240], edi
test edi, edi
jns 0x403018
mov ecx, esi
mov edi, 0xff
mov dword [ebp - 0x240], edi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402fd0
sub ecx, edx
mov edx, edi
sar ecx, 1
je 0x402ff9
cmp word [esi + ecx*2 - 2], 0xa
jne 0x402ff9
mov eax, 0xa
mov edx, 0xfe
mov word [ebp - 0x10], ax
xor ecx, ecx
mov esi, 0x2e
lea ebx, [ecx + 3]
dec edx
inc ecx
cmp edx, ebx
mov eax, edx
cmova eax, ebx
mov word [ebp + edx*2 - 0x20c], si
cmp ecx, eax
jb 0x403003
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebx, eax
mov dword [ebp - 0x214], 0
lea eax, [ebp - 0x224]
mov word [ebp - 0x210], 0
push eax
xorps xmm0, xmm0
push ebx
movups xmmword [ebp - 0x224], xmm0
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movsx eax, word [0x44ed9c]
xor edx, edx
movsx ecx, word [ebp - 0x224]
add eax, edi
div ecx
add ax, word [0x44ed9e]
mov esi, edx
movzx ecx, ax
mov dword [ebp - 0x248], ecx
movzx ecx, byte [ebp + 8]
add cx, ax
mov dword [ebp - 0x24c], esi
movzx edi, cx
mov word [ebp - 0x232], ax
mov word [ebp - 0x234], si
cmp di, word [ebp - 0x222]
jl 0x403143
mov ecx, dword [ebp - 0x222]
mov eax, edi
sub eax, ecx
inc eax
movzx esi, ax
xor eax, eax
mov word [ebp - 0x22c], ax
sub ecx, esi
mov eax, dword [ebp - 0x224]
dec ecx
dec eax
mov word [ebp - 0x22a], si
mov word [ebp - 0x228], ax
xor eax, eax
mov dword [ebp - 0x23c], eax
mov eax, 0x20
mov word [ebp - 0x238], ax
mov ax, word [ebp - 0x21c]
mov word [ebp - 0x236], ax
lea eax, [ebp - 0x238]
push eax
push dword [ebp - 0x23c]
lea eax, [ebp - 0x22c]
mov word [ebp - 0x226], cx
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ScrollConsoleScreenBufferW]
sub word [ebp - 0x21e], si
push dword [ebp - 0x220]
mov eax, dword [ebp - 0x248]
sub word [0x44ed9e], si
sub eax, esi
push ebx
mov word [ebp - 0x232], ax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov esi, dword [ebp - 0x24c]
mov ax, word [ebp - 0x21e]
cmp ax, word [ebp - 0x218]
jl 0x40319a
mov cx, word [ebp - 0x214]
cmp ax, cx
jg 0x40319a
cmp di, cx
jle 0x40319a
sub edi, dword [ebp - 0x214]
xor ecx, ecx
movzx eax, di
mov word [ebp - 0x22a], ax
mov word [ebp - 0x226], ax
lea eax, [ebp - 0x22c]
push eax
push ecx
push ebx
mov word [ebp - 0x22c], cx
mov word [ebp - 0x228], cx
call dword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
lea eax, [ebp - 0x244]
mov dword [ebp - 0x244], 0
push eax
push dword [0x44ed9c]
lea eax, [ebp - 0x20c]
push dword [ebp - 0x240]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterW]
cmp byte [ebp + 8], 0
je 0x403214
movsx ecx, word [ebp - 0x224]
lea eax, [ebp - 0x244]
push eax
push dword [ebp - 0x234]
movsx eax, si
sub ecx, eax
push ecx
push 0x20
push ebx
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
xor eax, eax
mov word [0x44ed9c], ax
mov eax, dword [ebp - 0x232]
inc eax
mov word [0x44ed9e], ax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00420eb4
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x234]
xor ecx, ebp
pop edi
pop esi
mov dword [0x44ed9c], eax
pop ebx
call fcn.00420eb4
mov esp, ebp
pop ebp
ret