Function at 0x4104fc
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [0x5c4e68]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
push 0x7fe
mov dword [ebp - 0x81c], eax
lea eax, [ebp - 0x806]
push ebx
push eax
mov word [ebp - 0x808], bx
call fcn.005117f0
xor eax, eax
xor ecx, ecx
add esp, 0xc
cmp byte [ebp + 0x14], bl
lea edi, [ebp - 0x816]
setne cl
stosw word es:[edi], ax
mov edi, dword [ebp + 0xc]
mov eax, 0x400
mov dword [ebp - 0x80c], ebx
sub eax, ecx
cmp edi, eax
mov dword [ebp - 0x810], ebx
mov dword [ebp - 0x814], ebx
jl 0x410574
mov eax, 0x3ff
sub eax, ecx
mov edi, eax
call fcn.00412d51
lea ebx, [ebp - 0x810]
lea esi, [ebp - 0x80c]
mov dword [ebp - 0x820], eax
call fcn.004128bf
cmp byte [ebp + 0x14], 0
mov ax, word [ebp - 0x80c]
mov word [ebp - 0x818], ax
mov ax, word [ebp - 0x810]
mov word [ebp - 0x816], ax
je 0x4105b3
inc edi
test edi, edi
jle 0x410734
lea eax, [ebp - 0x814]
push eax
push dword [ebp - 0x818]
lea eax, [ebp - 0x808]
push edi
push eax
push dword [ebp - 0x820]
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputAttribute]
test eax, eax
je 0x410768
cmp dword [ebp - 0x814], 0
je 0x410768
cmp dword [ebp - 0x814], edi
je 0x410615
push edi
push dword [ebp - 0x814]
push str.:8:ReadConsoleOutputAttribute___FAILED:_Read__ld__not__ld.
call fcn.004265da
mov eax, dword [ebp - 0x814]
add esp, 0xc
mov edi, eax
xor eax, eax
cmp dword [ebp + 0x10], eax
je 0x410630
test edi, edi
jle 0x410643
or word [ebp + eax*2 - 0x808], 8
inc eax
cmp eax, edi
jl 0x410620
jmp 0x410643
test edi, edi
jle 0x410643
and word [ebp + eax*2 - 0x808], 0xfff7
inc eax
cmp eax, edi
jl 0x410634
cmp byte [ebp + 0x14], 0
je 0x410655
lea eax, [ebp + eax*2 - 0x80a]
and word [eax], 0xfff7
lea eax, [ebp - 0x814]
push eax
push dword [ebp - 0x818]
lea eax, [ebp - 0x808]
push edi
push eax
push dword [ebp - 0x820]
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputAttribute]
mov esi, dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterA]
lea eax, [ebp - 0x814]
push eax
push dword [ebp - 0x818]
xor eax, eax
cmp byte [ebp + 0x14], al
mov ecx, edi
setne al
sub ecx, eax
push ecx
push dword [ebp - 0x81c]
push dword [ebp - 0x820]
call esi
call fcn.00412cb9
and dword [ebp - 0x81c], 0
test edi, edi
mov ebx, eax
jle 0x410734
cmp byte [ebp + 0x14], 0
je 0x4106fe
lea eax, [edi - 1]
cmp dword [ebp - 0x81c], eax
jne 0x4106fe
mov ax, word [ebp - 0x80c]
mov word [ebp - 0x818], ax
mov ax, word [ebp - 0x810]
mov word [ebp - 0x816], ax
lea eax, [ebp - 0x814]
push eax
push dword [ebp - 0x818]
lea eax, [ebp + 0x14]
push 1
push eax
push dword [ebp - 0x820]
call esi
inc dword [ebp - 0x80c]
cmp dword [ebp - 0x80c], ebx
jl 0x410726
call fcn.00412ba0
and dword [ebp - 0x80c], 0
inc dword [ebp - 0x810]
cmp dword [ebp - 0x810], eax
jge 0x410758
inc dword [ebp - 0x81c]
cmp dword [ebp - 0x81c], edi
jl 0x4106b6
push dword [ebp - 0x810]
push dword [ebp - 0x80c]
call fcn.004127f9
pop ecx
pop ecx
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051291c
leave
ret
dec eax
dec ebx
mov dword [ebp - 0x810], eax
mov dword [ebp - 0x80c], ebx
jmp 0x410734
or eax, 0xffffffff
jmp 0x410749