Function at 0x401591
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov word [ebp - 0x36], 0
mov word [ebp - 0x34], 0
mov dword [ebp - 0x18], 2
cmp dword [ebp + 8], 0
jne 0x4015c0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
jmp 0x401610
mov dword [ebp - 0xc], 1
jmp 0x4015ed
mov eax, dword [ebp - 0xc]
dec eax
mov eax, dword [eax*4 + 0x402018]
mov dword [esp], eax
call sym._strlen
mov edx, eax
mov eax, dword [ebp - 0x18]
lea eax, [edx + eax]
add eax, 4
mov dword [ebp - 0x18], eax
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 8]
jl 0x4015c9
mov eax, dword [ebp + 8]
dec eax
mov eax, dword [eax*4 + 0x402018]
mov dword [esp], eax
call sym._strlen
mov edx, dword [ebp - 0x18]
add eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [0x404070]
lea edx, [ebp - 0x2e]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._GetConsoleScreenBufferInfo_8
sub esp, 8
mov ax, word [ebp - 0x2e]
mov word [ebp - 0x32], ax
mov word [ebp - 0x30], 1
mov dword [ebp - 0xc], 0
jmp 0x4016a4
mov eax, dword [0x404014]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov word [eax + 2], 0x70
mov eax, dword [0x404014]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov al, byte [eax]
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0x40
jle 0x40166f
cmp byte [ebp - 0xd], 0x5a
jle 0x40167b
cmp byte [ebp - 0xd], 0x60
jle 0x4016a1
cmp byte [ebp - 0xd], 0x7a
jg 0x4016a1
mov eax, dword [0x404014]
mov edx, dword [ebp - 0xc]
shl edx, 2
lea edx, [eax + edx]
mov eax, dword [0x404014]
mov ecx, dword [ebp - 0xc]
shl ecx, 2
add eax, ecx
mov ax, word [eax + 2]
or eax, 4
mov word [edx + 2], ax
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jl 0x40163e
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
jmp 0x4016ca
mov eax, dword [0x404014]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov word [eax + 2], 7
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
jl 0x4016b4
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
jmp 0x401740
mov eax, dword [0x404014]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov word [eax + 2], 0x70
mov eax, dword [0x404014]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov al, byte [eax]
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0x40
jle 0x40170b
cmp byte [ebp - 0xd], 0x5a
jle 0x401717
cmp byte [ebp - 0xd], 0x60
jle 0x40173d
cmp byte [ebp - 0xd], 0x7a
jg 0x40173d
mov eax, dword [0x404014]
mov edx, dword [ebp - 0xc]
shl edx, 2
lea edx, [eax + edx]
mov eax, dword [0x404014]
mov ecx, dword [ebp - 0xc]
shl ecx, 2
add eax, ecx
mov ax, word [eax + 2]
or eax, 4
mov word [edx + 2], ax
inc dword [ebp - 0xc]
mov ax, word [ebp - 0x2e]
cwde
cmp eax, dword [ebp - 0xc]
jg 0x4016da
mov ax, word [ebp - 0x32]
dec eax
mov word [ebp - 0x3e], 0
mov word [ebp - 0x3c], 0
mov word [ebp - 0x3a], ax
mov word [ebp - 0x38], 0
mov edx, dword [0x404014]
mov eax, dword [0x404070]
lea ecx, [ebp - 0x3e]
mov dword [esp + 0x10], ecx
mov ecx, dword [ebp - 0x36]
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x32]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._WriteConsoleOutputA_20
sub esp, 0x14
leave
ret