Function at 0x40ca60
Capabilities:
Manipulate console buffer

Disassembly:
mov al, byte [0x260dd85]
movzx ecx, al
sub esp, 0x1c
cmp ecx, dword [0x4b802c]
jge 0x40cce3
cmp al, byte [0x260dd89]
ja 0x40cce3
mov al, byte [0x260dd84]
movzx edx, al
cmp edx, dword [0x4b8bdc]
jge 0x40cce3
cmp al, byte [0x260dd88]
ja 0x40cce3
push ebx
push ebp
push esi
push edi
call fcn.00401d70
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, dword [0x4b8bdc]
mov ecx, eax
xor eax, eax
dec edx
mov word [esp + 0x24], ax
mov eax, dword [0x25f2560]
mov word [esp + 0x28], dx
mov edx, dword [0x4b802c]
mov word [esp + 0x26], ax
lea eax, [edx + eax - 1]
lea edx, [esp + 0x24]
push edx
mov edx, dword [0x4b8008]
mov word [esp + 0x2e], ax
mov eax, dword [0x4b8038]
push eax
push edx
push 0x24c2200
push ecx
mov dword [esp + 0x34], ecx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputA]
mov eax, dword [0x4b8bdc]
movzx edx, byte [0x260dd88]
lea ecx, [eax - 1]
cmp edx, ecx
jge 0x40cb1f
mov esi, edx
mov dword [esp + 0x10], esi
jmp 0x40cb25
mov dword [esp + 0x10], ecx
mov esi, ecx
mov ecx, dword [0x4b802c]
movzx ebp, byte [0x260dd89]
dec ecx
cmp ebp, ecx
jge 0x40cb3d
mov dword [esp + 0x14], ebp
jmp 0x40cb43
mov dword [esp + 0x14], ecx
mov ebp, ecx
mov cl, byte [0x260dd80]
test cl, cl
jne 0x40cbea
movzx ebx, byte [0x260dd85]
cmp ebx, ebp
jg 0x40ccbc
movzx ebp, byte [0x260dd84]
lea ecx, [eax + eax]
imul eax, ebx
add eax, ebp
add eax, eax
mov dword [esp + 0x18], ecx
mov edi, eax
mov dword [esp + 0x1c], eax
jmp 0x40cb80
movzx eax, byte [0x4b9462]
call fcn.0040c220
add eax, edi
cmp ebp, esi
jg 0x40cbd2
movsx ecx, word [0x4b8008]
movzx di, byte [0x260dd8d]
imul ecx, ebx
add ecx, ebp
sub esi, ebp
lea eax, [eax + 0x4b9000]
lea ecx, [ecx*4 + 0x24c2202]
inc esi
mov byte [ecx - 2], 0x20
mov byte [eax], 0x20
inc eax
mov word [ecx], di
mov dl, byte [ecx]
mov byte [eax], dl
inc eax
add ecx, 4
sub esi, 1
jne 0x40cbb6
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
add edi, dword [esp + 0x18]
inc ebx
cmp ebx, dword [esp + 0x14]
mov dword [esp + 0x1c], edi
jle 0x40cb80
jmp 0x40ccbc
movzx edi, byte [0x260dd85]
movzx ecx, cl
add ecx, edi
lea edx, [ebp + 1]
cmp ecx, edx
mov ebx, ecx
jl 0x40cc01
mov ebx, edx
cmp edi, ebp
jg 0x40ccbc
movzx ecx, byte [0x260dd84]
lea edx, [eax + eax]
imul eax, edi
add eax, ecx
add eax, eax
mov dword [esp + 0x18], edx
mov ebp, eax
mov dword [esp + 0x1c], eax
jmp 0x40cc30
movzx eax, byte [0x4b9462]
movzx esi, byte [0x260dd84]
call fcn.0040c220
add eax, ebp
cmp esi, dword [esp + 0x10]
jg 0x40cca4
movsx ebp, word [0x4b8008]
lea ecx, [eax + 0x4b9000]
mov eax, ebp
imul eax, edi
add eax, esi
lea eax, [eax*4 + 0x24c2200]
cmp ebx, dword [esp + 0x14]
jg 0x40cc7e
mov edx, ebp
imul edx, ebx
add edx, esi
mov edx, dword [edx*4 + 0x24c2200]
mov dword [eax], edx
jmp 0x40cc8d
movzx dx, byte [0x260dd8d]
mov byte [eax], 0x20
mov word [eax + 2], dx
movzx edx, byte [eax]
mov byte [ecx], dl
movzx edx, byte [eax + 2]
inc ecx
mov byte [ecx], dl
inc esi
inc ecx
add eax, 4
cmp esi, dword [esp + 0x10]
jle 0x40cc66
mov ebp, dword [esp + 0x1c]
add ebp, dword [esp + 0x18]
inc edi
inc ebx
cmp edi, dword [esp + 0x14]
mov dword [esp + 0x1c], ebp
jle 0x40cc30
mov ecx, dword [0x4b8038]
mov edx, dword [0x4b8008]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push ecx
push edx
push 0x24c2200
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret