Function at 0x401f36
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x50
mov eax, dword [ebp + 0xc]
mov word [ebp - 0x2c], ax
mov word [ebp - 0x24], 0
mov word [ebp - 0x22], 0
mov eax, dword [ebp + 8]
mov ax, word [eax + 4]
mov edx, eax
mov eax, dword [ebp + 8]
mov ax, word [eax]
mov ecx, edx
sub cx, ax
mov eax, ecx
inc eax
mov word [ebp - 0x20], ax
mov eax, dword [ebp + 8]
mov ax, word [eax + 6]
mov edx, eax
mov eax, dword [ebp + 8]
mov ax, word [eax + 2]
mov ecx, edx
sub cx, ax
mov eax, ecx
inc eax
mov word [ebp - 0x1e], ax
mov dword [esp], 0x18
call sym._malloc
mov dword [ebp - 0x1c], eax
mov edx, dword [0x40b008]
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x14], edx
mov eax, dword [0x40b008]
mov al, byte [eax]
inc eax
mov dl, al
mov eax, dword [ebp - 0x1c]
mov byte [eax], dl
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [ecx + 2], eax
mov dword [ecx + 6], edx
mov eax, dword [ebp - 0x20]
movsx edx, ax
mov ax, word [ebp - 0x1e]
cwde
imul eax, edx
shl eax, 2
mov dword [esp], eax
call sym._malloc
mov edx, eax
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x20]
movsx edx, ax
mov ax, word [ebp - 0x1e]
cwde
imul eax, edx
mov dword [esp], eax
call sym._malloc
mov edx, eax
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + 0xc]
mov eax, dword [0x40b070]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x10], ecx
mov ecx, dword [ebp - 0x24]
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x20]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._ReadConsoleOutputA_20
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ax, word [eax + 2]
cwde
mov dword [ebp - 0x14], eax
jmp 0x402089
mov eax, dword [ebp + 8]
mov ax, word [eax]
cwde
mov dword [ebp - 0x10], eax
jmp 0x402079
mov ecx, dword [0x40b01c]
mov edx, dword [ebp - 0x14]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 4
add eax, dword [ebp - 0x10]
lea eax, [ecx + eax]
mov dl, byte [eax]
mov eax, dword [ebp - 0x18]
mov byte [eax], dl
inc dword [ebp - 0x18]
inc dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ax, word [eax + 4]
cwde
cmp eax, dword [ebp - 0x10]
jge 0x402053
inc dword [ebp - 0x14]
mov eax, dword [ebp + 8]
mov ax, word [eax + 6]
cwde
cmp eax, dword [ebp - 0x14]
jge 0x402047
mov eax, dword [ebp - 0x1c]
mov dword [0x40b008], eax
mov eax, dword [ebp + 8]
mov ax, word [eax]
mov word [ebp - 0x24], ax
mov eax, dword [ebp + 8]
mov ax, word [eax + 2]
mov word [ebp - 0x22], ax
mov eax, dword [ebp + 8]
mov ax, word [eax + 2]
cwde
mov dword [ebp - 0x14], eax
jmp 0x4020fd
mov eax, dword [ebp - 0x20]
movsx ecx, ax
movzx edx, word [ebp - 0x2c]
mov eax, dword [0x40b070]
mov dword [esp + 0x10], 0x40b060
mov ebx, dword [ebp - 0x24]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._FillConsoleOutputAttribute_20
sub esp, 0x14
mov ax, word [ebp - 0x22]
inc eax
mov word [ebp - 0x22], ax
inc dword [ebp - 0x14]
mov eax, dword [ebp + 8]
mov ax, word [eax + 6]
cwde
cmp eax, dword [ebp - 0x14]
jge 0x4020c0
mov dword [ebp - 0x14], 0
jmp 0x402175
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov al, byte [eax]
test al, al
je 0x402172
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x14]
shl edx, 2
lea ebx, [eax + edx]
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._strlen
mov edx, dword [0x40b070]
mov dword [esp + 0x10], 0x40b060
mov ecx, dword [ebx]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._WriteConsoleOutputCharacterA_20
sub esp, 0x14
inc dword [ebp - 0x14]
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 8]
cmp eax, dword [ebp - 0x14]
jg 0x402113
mov eax, dword [ebp + 8]
mov ax, word [eax + 2]
cwde
mov dword [ebp - 0x14], eax
jmp 0x4021ce
mov eax, dword [ebp + 8]
mov ax, word [eax]
cwde
mov dword [ebp - 0x10], eax
jmp 0x4021be
mov ecx, dword [0x40b01c]
mov edx, dword [ebp - 0x14]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 4
add eax, dword [ebp - 0x10]
lea edx, [ecx + eax]
mov eax, dword [0x40b008]
mov al, byte [eax]
mov byte [edx], al
inc dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ax, word [eax + 4]
cwde
cmp eax, dword [ebp - 0x10]
jge 0x402199
inc dword [ebp - 0x14]
mov eax, dword [ebp + 8]
mov ax, word [eax + 6]
cwde
cmp eax, dword [ebp - 0x14]
jge 0x40218d
mov dword [ebp - 0x14], 0
jmp 0x402292
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
shl edx, 3
add eax, edx
mov ax, word [eax + 2]
cwde
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
shl edx, 3
add eax, edx
mov ax, word [eax]
cwde
mov dword [ebp - 0x10], eax
jmp 0x402278
mov ecx, dword [0x40b01c]
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 4
add eax, dword [ebp - 0x10]
add ecx, eax
mov ebx, dword [0x40b01c]
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 4
add eax, dword [ebp - 0x10]
lea eax, [ebx + eax]
mov dl, byte [eax]
mov eax, dword [ebp + 0x14]
mov ebx, dword [eax + 4]
mov eax, dword [ebp - 0x14]
lea eax, [ebx + eax]
mov al, byte [eax]
movsx eax, al
shl eax, 6
mov bl, al
mov eax, dword [ebp + 0x14]
mov esi, dword [eax + 8]
mov eax, dword [ebp - 0x14]
lea eax, [esi + eax]
mov al, byte [eax]
movsx eax, al
shl eax, 2
or eax, ebx
or eax, edx
mov byte [ecx], al
inc dword [ebp - 0x10]
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
shl edx, 3
add eax, edx
mov ax, word [eax + 4]
cwde
cmp eax, dword [ebp - 0x10]
jge 0x402212
inc dword [ebp - 0x14]
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0xc]
cmp eax, dword [ebp - 0x14]
jg 0x4021e7
lea esp, [ebp - 8]
add esp, 0
pop ebx
pop esi
leave
ret