Function at 0x4015d0
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x404004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, 0x28
mov esi, 0x78
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x44], esi
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
push 1
push 0x438
push 0x780
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_MoveWindow]
push 0
push 1
push 0
push 0
push 0xc0000000
call dword [sym.imp.KERNEL32.dll_CreateConsoleScreenBuffer]
push eax
mov dword [ebp - 0x48], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleActiveScreenBuffer]
push 0xff00
call fcn.00401b5b
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x70], ebx
push eax
push dword [ebp - 0x48]
mov eax, dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov dword [ebp - 0x8c], eax
call eax
movsx ecx, word [ebp - 0x16]
movsx edx, word [ebp - 0x12]
movsx eax, word [ebp - 0x14]
sub edx, ecx
movsx ecx, word [ebp - 0x10]
inc edx
sub ecx, eax
mov eax, dword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
inc ecx
mov dword [ebp - 0x90], eax
cmp edx, edi
jne 0x40167f
cmp ecx, esi
je 0x401699
mov word [ebp - 0x24], dx
mov esi, ecx
mov word [ebp - 0x22], cx
mov edi, edx
push dword [ebp - 0x24]
mov dword [ebp - 0x38], edx
push dword [ebp - 0x48]
mov dword [ebp - 0x44], esi
call eax
inc esi
mov dword [ebp - 8], 0
mov edx, esi
imul edx, edi
test edx, edx
jle 0x4016bf
mov ecx, edx
mov eax, 0x200020
shr ecx, 1
mov edi, ebx
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp - 0x38]
xor eax, eax
imul esi, edi
mov dword [ebp - 0x24], eax
mov word [ebx + edx*2 - 2], ax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x24]
mov eax, dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterW]
push esi
push ebx
push dword [ebp - 0x48]
mov dword [ebp - 0x84], eax
call eax
lea ebx, [edi - 2]
xor ecx, ecx
mov edi, dword [ebp - 0x44]
mov edx, 4
dec edi
mov dword [ebp - 0x28], ebx
mov eax, edi
mov dword [ebp - 0x34], edi
imul eax, ebx
mov dword [ebp - 0x60], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00401b5b
push 0x4d2
mov dword [ebp - 0x6c], eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov ecx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebx - 2]
mov dword [ebp - 0x54], eax
add esp, 8
lea eax, [edi - 2]
mov dword [ebp - 0x88], ecx
mov dword [ebp - 0x58], eax
xor eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x4c], esi
nop dword [eax]
call eax
cdq
mov ecx, 0x64
idiv ecx
sub edx, 0x1e
mov dword [ebp - 0x68], edx
call dword [ebp - 0x2c]
cdq
mov ecx, 0x4b
idiv ecx
sub edx, 0x32
mov dword [ebp - 0x64], edx
call dword [ebp - 0x2c]
cdq
mov ecx, 0x28
idiv ecx
mov eax, dword [ebp - 0x60]
xor ecx, ecx
add edx, 2
mov dword [ebp - 0x50], edx
mov edx, 8
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00401b5b
mov edx, dword [ebp - 0x60]
add esp, 4
mov dword [ebp - 0x40], eax
test edx, edx
je 0x4017c5
lea ecx, [eax + 5]
nop dword [eax + eax]
mov dword [ecx - 5], 0
lea ecx, [ecx + 8]
mov word [ecx - 9], 0
sub edx, 1
jne 0x4017b0
xor ecx, ecx
mov dword [ebp - 0x3c], ecx
test edi, edi
jle 0x401848
mov esi, dword [ebp - 0x50]
lea eax, [ebx*8]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x30], eax
xor edi, edi
test ebx, ebx
jle 0x401835
mov ebx, eax
nop dword [eax]
test ecx, ecx
je 0x401818
mov eax, dword [ebp - 0x34]
dec eax
cmp ecx, eax
je 0x401818
test edi, edi
je 0x401818
mov eax, dword [ebp - 0x28]
dec eax
cmp edi, eax
je 0x401818
call dword [ebp - 0x2c]
lea ecx, [esi + 1]
cdq
idiv ecx
mov ecx, dword [ebp - 0x3c]
sub edx, esi
jmp 0x401821
mov byte [ebx + 4], 1
mov edx, 0x3fffffff
mov dword [ebx], edx
inc edi
add ebx, 8
cmp edi, dword [ebp - 0x28]
jl 0x4017f0
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x34]
inc ecx
add eax, edx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x30], eax
cmp ecx, edi
jl 0x4017e4
mov eax, dword [ebp - 0x40]
push dword [ebp - 0x64]
push dword [ebp - 0x68]
push eax
push ebx
mov ebx, dword [ebp - 0x2c]
push edi
call ebx
cdq
idiv dword [ebp - 0x58]
push edx
call ebx
cdq
idiv dword [ebp - 0x54]
push edx
call ebx
cdq
idiv dword [ebp - 0x58]
mov edi, edx
call ebx
cdq
idiv dword [ebp - 0x54]
mov ecx, edx
mov edx, edi
call fcn.00401090
add esp, 0x1c
mov edi, ebx
call edi
call edi
call edi
call edi
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x50], 0xfa
lea eax, [edx + 1]
imul eax, dword [ebp - 0x38]
mov dword [ebp - 0x80], eax
mov eax, edx
imul eax, dword [ebp - 0x38]
mov dword [ebp - 0x74], eax
add eax, eax
mov dword [ebp - 0x78], eax
xor ebx, ebx
jmp 0x4018ba
mov edi, dword [ebp - 0x2c]
xor ebx, ebx
jmp 0x4018ba
mov edi, dword [ebp - 0x2c]
call edi
cdq
idiv dword [ebp - 0x54]
lea edi, [edx + 1]
mov dword [ebp - 0x24], edi
call dword [ebp - 0x2c]
cdq
inc ebx
idiv dword [ebp - 0x58]
mov ecx, dword [ebp - 0x40]
lea eax, [edx + 1]
mov dword [ebp - 0x3c], eax
imul eax, dword [ebp - 0x28]
add eax, edi
cmp byte [ecx + eax*8 + 5], 0
jne 0x4018eb
cmp byte [ecx + eax*8 + 4], 0
je 0x4018f0
cmp ebx, 0x32
jl 0x4018b7
mov esi, dword [ebp - 0x28]
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x2c]
nop dword [eax]
call ebx
cdq
lea ecx, [esi - 2]
idiv ecx
lea edi, [edx + 1]
call ebx
cdq
idiv dword [ebp - 0x58]
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, edx
imul eax, esi
add eax, edi
cmp byte [ecx + eax*8 + 5], 0
je 0x401900
cmp dword [ebp - 0x30], 0x32
mov esi, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x28]
jge 0x40194d
push dword [ebp - 0x64]
push dword [ebp - 0x68]
push ecx
push ebx
push dword [ebp - 0x34]
mov ecx, edi
push dword [ebp - 0x3c]
push dword [ebp - 0x24]
call fcn.00401090
mov ecx, dword [ebp - 0x40]
add esp, 0x1c
mov edi, dword [ebp - 0x34]
test edi, edi
jle 0x4019d8
mov esi, dword [ebp - 0x6c]
lea eax, [ebx*8]
mov dword [ebp - 0x24], eax
lea edx, [ebx*8]
lea eax, [ebx*4]
mov dword [ebp - 0x5c], eax
lea eax, [ecx + 5]
mov ecx, edi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], ecx
lea edi, [ebx*4]
test ebx, ebx
jle 0x4019c3
mov ecx, esi
nop
cmp byte [eax - 1], 0
jne 0x4019a0
cmp byte [eax], 0
mov edx, 0x2588
jne 0x4019a5
mov edx, 0x20
mov edi, ecx
add eax, 8
add ecx, 4
mov dword [edi], edx
sub ebx, 1
jne 0x401990
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x5c]
add eax, edx
add esi, edi
sub ecx, 1
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], ecx
jne 0x401988
mov esi, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x34]
xor ebx, ebx
mov dword [ebp - 0x30], ebx
test edi, edi
jle 0x401a8f
mov esi, dword [ebp - 0x28]
lea eax, [esi*4]
mov dword [ebp - 0x5c], eax
lea ecx, [esi*4]
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x24], eax
nop
test esi, esi
jle 0x401a7b
mov eax, edi
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [ebp - 0x44]
cdq
sub eax, edx
sar ecx, 1
mov edi, eax
mov eax, esi
cdq
sub eax, edx
sar edi, 1
sub edi, ecx
mov esi, dword [ebp - 0x24]
mov ecx, eax
add edi, ebx
mov eax, dword [ebp - 0x38]
imul edi, dword [ebp - 0x38]
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
mov edx, eax
sub edx, ecx
lea ebx, [edi + edx]
sub edi, ecx
add edi, eax
mov eax, dword [ebp - 0x70]
lea ecx, [eax + edi*2]
mov edi, dword [ebp - 0x28]
test ebx, ebx
jle 0x401a5f
cmp ebx, dword [ebp - 0x74]
jge 0x401a5f
test edx, edx
jle 0x401a5f
cmp edx, dword [ebp - 0x38]
jge 0x401a5f
mov ax, word [esi]
mov word [ecx], ax
add esi, 4
inc edx
inc ebx
add ecx, 2
sub edi, 1
jne 0x401a47
mov ebx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x34]
inc ebx
add eax, ecx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], eax
cmp ebx, edi
jl 0x401a00
mov esi, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x70]
lea eax, [ebp - 8]
push eax
push esi
push dword [ebp - 0x80]
push ebx
push dword [ebp - 0x48]
call dword [ebp - 0x84]
cmp dword [ebp - 0x74], 0
jle 0x401ac2
mov ecx, dword [ebp - 0x78]
mov eax, 0x200020
shr ecx, 1
mov edi, ebx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x78]
xor ecx, ecx
sub dword [ebp - 0x50], 1
mov word [eax + ebx - 2], cx
jne 0x4018b0
push dword [ebp - 0x40]
call fcn.00401b56
add esp, 4
push 0x3e8
call dword [ebp - 0x88]
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x48]
call dword [ebp - 0x8c]
movsx eax, word [ebp - 0x16]
movsx edx, word [ebp - 0x12]
movsx ecx, word [ebp - 0x10]
sub edx, eax
movsx eax, word [ebp - 0x14]
inc edx
sub ecx, eax
inc ecx
cmp edx, dword [ebp - 0x38]
jne 0x401b23
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x44]
je 0x401750
mov word [ebp - 0x7c], dx
mov word [ebp - 0x7a], cx
push dword [ebp - 0x7c]
mov dword [ebp - 0x38], edx
push dword [ebp - 0x48]
mov dword [ebp - 0x44], ecx
call dword [ebp - 0x90]
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
jmp 0x401750