Function at 0x40fc70
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [0x581900]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x800
mov dword [ebp - 0x824], eax
lea eax, [ebp - 0x804]
push 0
push eax
call fcn.004e69c0
mov edi, dword [ebp + 0xc]
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x808], 0
cmp byte [ebp + 0x14], cl
mov eax, 0x400
mov dword [ebp - 0x820], 0
setne cl
mov dword [ebp - 0x810], 0
sub eax, ecx
cmp edi, eax
jl 0x40fce3
mov edi, 0x3ff
sub edi, ecx
mov dword [ebp + 0xc], edi
cmp dword [0x587bec], 0
je 0x40fcfe
call fcn.004d9850
sub eax, dword [0x587bf0]
cmp eax, 0xfa0
jb 0x40fd24
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [0x587bec], eax
cmp eax, 0xffffffff
jne 0x40fd1a
mov dword [0x587bec], 0
call fcn.004d9850
mov dword [0x587bf0], eax
mov eax, dword [0x587bec]
mov dword [ebp - 0x818], eax
lea eax, [ebp - 0x820]
push eax
lea eax, [ebp - 0x808]
push eax
call fcn.0040dd70
mov eax, dword [ebp - 0x820]
add esp, 8
cmp byte [ebp + 0x14], 0
mov ebx, dword [ebp - 0x808]
mov word [ebp - 0x80c], bx
mov dword [ebp - 0x81c], eax
mov word [ebp - 0x80a], ax
je 0x40fd6f
inc edi
mov dword [ebp + 0xc], edi
test edi, edi
jle 0x410080
mov esi, dword [ebp - 0x80c]
lea eax, [ebp - 0x810]
push eax
push esi
push edi
lea eax, [ebp - 0x804]
push eax
push dword [ebp - 0x818]
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputAttribute]
test eax, eax
je 0x410066
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x410066
cmp eax, edi
je 0x40fdcb
push edi
push eax
push str.:8:ReadConsoleOutputAttribute___FAILED:_Read__ld__not__ld.
call fcn.00424a90
mov edi, dword [ebp - 0x810]
add esp, 0xc
mov dword [ebp + 0xc], edi
xor eax, eax
mov ecx, 0xfff7
cmp dword [ebp + 0x10], eax
je 0x40fea3
test edi, edi
jle 0x40ff6d
cmp edi, 0x20
jb 0x40fe90
mov ecx, edi
and ecx, reloc.ODBC32.dll_SQLFreeHandle
jns 0x40fdfb
dec ecx
or ecx, 0xffffffe0
inc ecx
movaps xmm2, xmmword [str._b_b_b_b_b_b_b_b]
lea esi, [ebp - 0x804]
mov edx, edi
mov ebx, esi
sub edx, ecx
lea edi, [ebp - 0x7e4]
mov dword [ebp - 0x814], edx
xor ecx, ecx
xor edx, edx
nop
movups xmm0, xmmword [esi + ecx]
lea esi, [ebp - 0x7d4]
movaps xmm1, xmm2
lea ecx, [ecx + 0x40]
orps xmm0, xmm2
lea edx, [edx + 0x40]
movups xmmword [ebx + edx - 0x40], xmm0
movups xmm0, xmmword [ebp + eax*2 - 0x7f4]
orps xmm1, xmm0
movups xmmword [ebp + eax*2 - 0x7f4], xmm1
movups xmm0, xmmword [edi + eax*2]
orps xmm0, xmm2
movups xmmword [edi + eax*2], xmm0
movups xmm0, xmmword [esi + eax*2]
orps xmm0, xmm2
movups xmmword [esi + eax*2], xmm0
add eax, 0x20
lea esi, [ebp - 0x804]
cmp eax, dword [ebp - 0x814]
jl 0x40fe20
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp - 0x80c]
mov ebx, dword [ebp - 0x808]
cmp eax, edi
jge 0x40ff6d
nop dword [eax]
or word [ebp + eax*2 - 0x804], 8
inc eax
cmp eax, edi
jl 0x40fe90
jmp 0x40ff6d
test edi, edi
jle 0x40ff6d
cmp edi, 0x20
jb 0x40ff60
mov ecx, edi
xor eax, eax
and ecx, reloc.ODBC32.dll_SQLFreeHandle
jns 0x40fec5
dec ecx
or ecx, 0xffffffe0
inc ecx
movaps xmm2, xmmword [0x511050]
lea esi, [ebp - 0x804]
mov edx, edi
lea ebx, [ebp - 0x7e4]
sub edx, ecx
mov edi, esi
mov dword [ebp - 0x814], edx
xor ecx, ecx
xor edx, edx
nop dword [eax + eax]
movups xmm0, xmmword [esi + ecx]
lea esi, [ebp - 0x7d4]
movaps xmm1, xmm2
lea ecx, [ecx + 0x40]
andps xmm0, xmm2
lea edx, [edx + 0x40]
movups xmmword [edi + edx - 0x40], xmm0
movups xmm0, xmmword [ebp + eax*2 - 0x7f4]
andps xmm1, xmm0
movups xmmword [ebp + eax*2 - 0x7f4], xmm1
movups xmm0, xmmword [ebx + eax*2]
andps xmm0, xmm2
movups xmmword [ebx + eax*2], xmm0
movups xmm0, xmmword [esi + eax*2]
andps xmm0, xmm2
movups xmmword [esi + eax*2], xmm0
add eax, 0x20
lea esi, [ebp - 0x804]
cmp eax, dword [ebp - 0x814]
jl 0x40fef0
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp - 0x80c]
mov ebx, dword [ebp - 0x808]
cmp eax, edi
jge 0x40ff6d
mov ecx, 0xfff7
nop dword [eax]
and word [ebp + eax*2 - 0x804], cx
inc eax
cmp eax, edi
jl 0x40ff60
cmp byte [ebp + 0x14], 0
je 0x40ff80
mov ecx, 0xfff7
and word [ebp + eax*2 - 0x806], cx
lea eax, [ebp - 0x810]
push eax
push esi
push edi
lea eax, [ebp - 0x804]
push eax
push dword [ebp - 0x818]
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputAttribute]
xor ecx, ecx
lea eax, [ebp - 0x810]
cmp byte [ebp + 0x14], cl
push eax
push esi
setne cl
mov eax, edi
sub eax, ecx
push eax
push dword [ebp - 0x824]
push dword [ebp - 0x818]
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterA]
call fcn.0040e080
mov ecx, eax
xor esi, esi
mov dword [ebp - 0x808], ecx
test edi, edi
jle 0x41007a
nop word [eax + eax]
cmp byte [ebp + 0x14], 0
je 0x410026
lea eax, [edi - 1]
cmp esi, eax
jne 0x410026
mov eax, dword [ebp - 0x81c]
mov word [ebp - 0x80a], ax
lea eax, [ebp - 0x810]
push eax
mov word [ebp - 0x80c], bx
lea eax, [ebp + 0x14]
push dword [ebp - 0x80c]
push 1
push eax
push dword [ebp - 0x818]
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterA]
mov ecx, dword [ebp - 0x808]
inc ebx
cmp ebx, ecx
jl 0x410052
call fcn.0040e1f0
mov ecx, eax
xor ebx, ebx
mov eax, dword [ebp - 0x81c]
inc eax
mov dword [ebp - 0x81c], eax
cmp eax, ecx
jge 0x41005a
mov ecx, dword [ebp - 0x808]
inc esi
cmp esi, edi
jl 0x40ffe0
jmp 0x410080
mov eax, dword [ebp - 0x81c]
jmp 0x41004b
mov ebx, dword [ebp - 0x808]
lea eax, [ecx - 1]
dec ebx
jmp 0x410080
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e50dc
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x820]
push eax
push ebx
call fcn.00410800
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, edi
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004e50dc
mov esp, ebp
pop ebp
ret