Function at 0x40d8d0
Capabilities:
Manipulate console buffer

Disassembly:
sub esp, 0x24
push ebx
push ebp
movzx ebp, word [0x260dd94]
add ebp, dword [0x260de28]
push esi
movzx si, byte [0x260dd88]
push edi
movzx di, byte [0x260dd89]
add di, word [0x25f2560]
mov word [esp + 0x10], si
mov word [esp + 0x12], di
call fcn.00401d70
mov bl, byte [0x260dd80]
movzx eax, bl
cmp eax, 0x21
ja case.0x40d923.4
movzx eax, byte [eax + 0x40ddc4]
jmp dword [eax*4 + 0x40ddb0]
mov cl, byte [0x4b9462]
cmp cl, byte [0x260dd8d]
jne case.0x40d923.4
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebx, dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
lea edx, [esp + 0x1c]
mov esi, eax
push edx
push esi
call ebx
mov eax, dword [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
movzx ax, byte [0x260dd8c]
mov edi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp word [esp + 0x24], ax
je 0x40d979
push eax
push esi
call edi
movzx edx, word [0x260dd84]
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
lea eax, [ebp + 0x4b9000]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
movzx cx, byte [0x260dd8c]
mov eax, dword [esp + 0x24]
cmp ax, cx
je 0x40d9ab
push eax
push esi
call edi
cmp byte [0x260dd80], 0
jne 0x40da16
cmp byte [0x26112b2], 0
jne 0x40d9cf
lea edx, [esp + 0x1c]
push edx
push esi
call ebx
movsx eax, word [esp + 0x28]
mov dword [0x25f2560], eax
movzx eax, byte [0x260dd8d]
movzx dx, byte [eax + eax + 0x4b9451]
movzx cx, byte [eax + eax + 0x4b9450]
add dx, word [0x25f2560]
add eax, eax
mov word [esp + 0x10], cx
mov word [esp + 0x12], dx
mov eax, dword [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
pop edi
pop esi
pop ebp
mov byte [0x4b8033], 0
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov byte [0x4b800e], 1
mov byte [0x4b8033], 0
pop ebx
add esp, 0x24
ret
mov cl, byte [0x4b9462]
cmp cl, byte [0x260dd8d]
jne case.0x40d923.4
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea edx, [esp + 0x1c]
mov edi, eax
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov eax, dword [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
movzx ecx, word [esp + 0x24]
xor edx, edx
xor ebx, ebx
mov dword [esp + 0x18], ecx
cmp dx, word [0x260dd84]
jae 0x40dad2
lea esi, [ebp + 0x4b9001]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteConsoleA]
movzx ax, byte [esi]
cmp word [esp + 0x18], ax
je 0x40daa0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
movzx ax, byte [esi]
movzx ecx, ax
mov dword [esp + 0x18], ecx
push 0
lea edx, [esp + 0x18]
push edx
push 1
lea eax, [esi - 1]
push eax
push edi
call ebp
movzx ecx, word [0x260dd84]
inc ebx
add esi, 2
cmp ebx, ecx
jl 0x40da82
mov eax, dword [esp + 0x24]
cmp ax, word [esp + 0x18]
je 0x40dad2
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp byte [0x260dd80], 2
jne 0x40da16
movzx eax, byte [0x260dd8d]
movzx dx, byte [eax + eax + 0x4b9450]
add eax, eax
movzx ax, byte [eax + 0x4b9451]
add ax, word [0x25f2560]
mov word [esp + 0x10], dx
mov word [esp + 0x12], ax
mov ecx, dword [esp + 0x10]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
pop edi
pop esi
pop ebp
mov byte [0x4b8033], 0
pop ebx
add esp, 0x24
ret
mov al, byte [0x260dd8d]
cmp byte [0x4b9462], al
jne 0x40dbc3
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, dword [esp + 0x10]
mov esi, eax
movzx eax, word [0x260dd84]
lea edx, [esp + 0x14]
push edx
push edi
push eax
push 0x25f5978
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
movzx edx, word [0x260dd84]
lea ecx, [esp + 0x14]
push ecx
push edi
push edx
push 0x24e2200
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputAttribute]
mov esi, dword [esp + 0x14]
xor ecx, ecx
test esi, esi
jbe 0x40dda6
mov dl, byte [0x260dd80]
and dl, 1
lea eax, [ebp + 0x4b9000]
movzx ebx, byte [ecx + 0x25f5978]
mov byte [eax], bl
movzx ebx, byte [ecx*2 + 0x24e2200]
inc eax
mov byte [eax], bl
inc eax
test dl, dl
je 0x40dbb6
mov byte [eax], 0
inc eax
mov byte [eax], 0
inc eax
inc ecx
cmp ecx, esi
jb 0x40db95
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
movzx eax, al
mov dword [esp + 0x18], 0
call fcn.0040c220
movsx ecx, di
sub ecx, dword [0x25f2560]
movsx edx, si
imul ecx, dword [0x4b8bdc]
add ecx, edx
lea ecx, [eax + ecx*2]
movzx eax, word [0x260dd84]
test eax, eax
jle 0x40dda6
mov dl, bl
and dl, 1
lea eax, [ebp + 0x4b9000]
lea ecx, [ecx + 0x4b9000]
jmp 0x40dc10
movzx ebx, byte [ecx]
mov byte [eax], bl
movzx ebx, byte [ecx + 1]
inc ecx
inc eax
mov byte [eax], bl
inc eax
inc ecx
test dl, dl
je 0x40dc2b
mov byte [eax], 0
inc eax
mov byte [eax], 0
inc eax
inc si
movsx ebx, si
cmp ebx, dword [0x4b8bdc]
jne 0x40dc4b
inc di
movsx esi, di
cmp esi, dword [0x4b802c]
je 0x40dda6
xor esi, esi
mov ebx, dword [esp + 0x18]
movzx ebp, word [0x260dd84]
inc ebx
cmp ebx, ebp
mov dword [esp + 0x18], ebx
jl 0x40dc10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov al, byte [0x260dd8d]
cmp byte [0x4b9462], al
jne 0x40dd06
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
movzx esi, word [0x260dd84]
mov edi, eax
mov eax, dword [0x4b802c]
imul eax, dword [0x4b8bdc]
cmp esi, eax
jl 0x40dc9b
mov esi, eax
xor ecx, ecx
test esi, esi
jle 0x40dcd2
mov dl, byte [0x260dd80]
and dl, 1
lea eax, [ebp + 0x4b9000]
mov bl, byte [eax]
inc eax
mov byte [ecx + 0x25f5978], bl
movzx bx, byte [eax]
inc eax
mov word [ecx*2 + 0x24e2200], bx
test dl, dl
je 0x40dccd
add eax, 2
inc ecx
cmp ecx, esi
jl 0x40dcb0
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push ebx
push esi
push 0x25f5978
push edi
call fcn.00401bb0
add esp, 0x14
lea ecx, [esp + 0x14]
push ecx
push ebx
push esi
push 0x24e2200
push edi
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputAttribute]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
movzx eax, al
mov dword [esp + 0x18], 0
call fcn.0040c220
movsx edx, di
sub edx, dword [0x25f2560]
movsx ecx, si
imul edx, dword [0x4b8bdc]
add edx, ecx
movzx ecx, word [0x260dd84]
lea eax, [eax + edx*2]
test ecx, ecx
jle 0x40dda6
mov dl, bl
lea ecx, [eax + 0x4b9000]
and dl, 1
lea eax, [ebp + 0x4b9000]
mov edi, edi
movzx ebx, byte [eax]
mov byte [ecx], bl
movzx ebx, byte [eax + 1]
inc eax
inc ecx
mov byte [ecx], bl
inc ecx
inc eax
test dl, dl
je 0x40dd66
add eax, 2
inc si
movsx ebx, si
cmp ebx, dword [0x4b8bdc]
jne 0x40dd82
inc di
movsx esi, di
cmp esi, dword [0x4b802c]
je 0x40dda6
xor esi, esi
mov ebx, dword [esp + 0x18]
movzx ebp, word [0x260dd84]
inc ebx
cmp ebx, ebp
mov dword [esp + 0x18], ebx
jl 0x40dd50
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
or word [0x260ddac], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret