Function at 0x462510
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x49fc04]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov ecx, dword [eax + 0x10]
mov eax, ebx
cdq
idiv ecx
push edi
mov si, ax
mov eax, ebx
cdq
idiv ecx
mov al, byte [ebp + 0x18]
mov word [ebp + 0xa], si
test al, 1
mov di, dx
mov word [ebp + 8], di
je 0x46258e
call fcn.004610d0
test eax, eax
je 0x46263f
movsx eax, di
mov edi, dword [ebp + 0x10]
mov ecx, ebx
mov word [ebp - 8], 0
mov word [ebp - 6], si
sub ecx, eax
mov eax, dword [ebp - 8]
lea edx, [ebp - 4]
add edi, ecx
mov ecx, dword [0x4b558c]
push edx
push eax
push 0x50
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
test eax, eax
jne 0x46258e
mov ecx, 0x14
mov eax, 0x20202020
rep stosd dword es:[edi], eax
mov esi, dword [ebp + 0xc]
test byte [ebp + 0x18], 2
je 0x462739
mov eax, dword [ebp + 0x14]
lea ecx, [eax + ebx*4]
lea eax, [esi + esi]
add eax, 3
mov dword [ebp + 0x14], ecx
and al, 0xfc
call fcn.0048d710
mov edi, esp
test edi, edi
mov dword [ebp + 0x18], edi
je 0x462745
movsx ebx, word [0x4b52a0]
mov eax, dword [0x4b559c]
mov dword [ebp - 8], ebx
test eax, eax
mov dword [ebp + 0x10], edi
je 0x4626d7
movsx edx, word [ebp + 8]
sub ebx, edx
cmp esi, ebx
jle 0x4626d7
mov ecx, dword [ebp + 8]
mov edx, dword [0x4b558c]
lea eax, [ebp - 4]
sub esi, ebx
push eax
push ecx
push ebx
push edi
push edx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputAttribute]
test eax, eax
jne 0x46261a
test ebx, ebx
jle 0x46261a
mov ecx, ebx
mov eax, 0x70007
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp + 0x18]
inc word [ebp + 0xa]
lea eax, [edi + ebx*2]
test esi, esi
mov dword [ebp + 0x10], eax
mov word [ebp + 8], 0
jle 0x4626d0
mov ebx, dword [ebp - 8]
cmp ebx, esi
jle 0x462680
mov ebx, esi
xor esi, esi
jmp 0x462683
mov edi, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov ecx, dword [0x4b558c]
lea edx, [ebp - 4]
add edi, ebx
push edx
push eax
push esi
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
test eax, eax
jne 0x462591
mov ecx, esi
mov eax, 0x20202020
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x462591
sub esi, dword [ebp - 8]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 4]
push ecx
mov ecx, dword [0x4b558c]
push edx
push ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputAttribute]
test eax, eax
jne 0x4626b8
test ebx, ebx
jle 0x4626b8
mov edi, dword [ebp + 0x10]
mov ecx, ebx
mov eax, 0x70007
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edx, dword [ebp + 0x10]
inc word [ebp + 0xa]
test esi, esi
lea eax, [edx + ebx*2]
mov dword [ebp + 0x10], eax
jg 0x462632
mov edi, dword [ebp + 0x18]
mov esi, dword [ebp + 0xc]
mov ebx, edi
jmp 0x46270b
mov edx, dword [ebp + 8]
mov eax, dword [0x4b558c]
lea ecx, [ebp - 4]
push ecx
push edx
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputAttribute]
test eax, eax
jne 0x462708
test esi, esi
jle 0x462708
mov ecx, esi
mov eax, 0x70007
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x10]
mov di, word [edi]
mov ecx, edi
call fcn.00463ab0
test esi, esi
jle 0x462739
mov cx, word [ebx]
cmp cx, di
je 0x462728
mov edi, ecx
call fcn.00463ab0
mov ecx, dword [ebp + 0x14]
add ebx, 2
mov dword [ecx], eax
add ecx, 4
dec esi
mov dword [ebp + 0x14], ecx
jne 0x462719
xor eax, eax
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea esp, [ebp - 0x14]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret