Function at 0x412e90
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x50
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
cmp byte [ecx], 0
mov esi, ecx
je 0x412ece
push 0x585cd9
call fcn.004385a0
add esp, 4
test ebx, ebx
je 0x412f02
movzx ebx, byte [edi]
mov dword [esp + 4], esi
test bl, 1
je 0x412f37
mov ebx, dword [edi + 4]
mov edi, dword [edi + 8]
jmp 0x412f3a
test ebx, ebx
je 0x412fb1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
movzx ebx, byte [edi]
test bl, 1
jne 0x412fdd
shr ebx, 1
inc edi
jmp 0x412fe3
lea eax, [esp + 8]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movsx eax, word [esp + 8]
lea ebx, [esp + 0x30]
push eax
push edi
push ebx
call fcn.00412ca0
add esp, 0xc
test byte [edi], 1
jne 0x413011
mov word [edi], 0
jmp 0x413034
inc edi
shr ebx, 1
mov esi, dword [fcn.005379b0]
push 1
call esi
add esp, 4
push eax
push ebx
push 1
push edi
call fcn.00438670
add esp, 0x10
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov word [esp + 8], 0xa02
lea edi, [esp + 9]
mov byte [esp + 0xa], 0
push 1
call esi
add esp, 4
push eax
push 1
push 1
push edi
call fcn.00438670
add esp, 0x10
test byte [esp + 8], 1
je 0x412fa4
push dword [esp + 0x10]
call fcn.004fc300
add esp, 4
mov eax, dword [esp + 4]
mov byte [eax + 1], 1
jmp 0x41331b
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
movzx ecx, byte [edi]
test cl, 1
jne 0x41325d
shr ecx, 1
inc edi
jmp 0x413263
mov ebx, dword [edi + 4]
mov edi, dword [edi + 8]
lea eax, [ebx + 1]
cmp eax, 0xfffffff0
jae 0x413325
cmp eax, 0xb
jae 0x413168
mov eax, ebx
lea esi, [esp + 9]
add al, bl
test ebx, ebx
mov byte [esp + 8], al
jne 0x413194
jmp 0x41319f
mov eax, dword [edi + 8]
mov byte [eax], 0
mov dword [edi + 4], 0
test byte [edi], 1
je 0x413034
push dword [edi + 8]
call fcn.004fc300
add esp, 4
mov dword [edi], 0
mov eax, dword [esp + 0x38]
mov dword [edi + 8], eax
movsd xmm0, qword [esp + 0x30]
movsd qword [edi], xmm0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 0
push ebx
push edi
call fcn.004df790
add esp, 8
movsx edi, word [esp + 8]
mov eax, dword [esp + 0xc]
movzx ecx, word [esp + 0xe]
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov word [esp + 0x40], ax
test edi, edi
lea eax, [edi + eax - 1]
mov word [esp + 0x42], cx
mov word [esp + 0x44], ax
mov word [esp + 0x46], cx
je 0x4131f6
test di, di
js 0x41332e
lea eax, [edi*4]
push eax
call fcn.004fc150
add esp, 4
lea ecx, [eax + edi*4]
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
mov edx, eax
mov dword [esp + 0x2c], ecx
mov ecx, edi
neg ecx
nop dword [eax + eax]
mov dword [edx], 0
mov edx, dword [esp + 0x28]
add edx, 4
inc ecx
mov dword [esp + 0x28], edx
jne 0x4130e0
test di, di
je 0x4131f8
mov dword [esp + 4], esi
xor eax, eax
lea esi, [esp + 0x32]
nop word [eax + eax]
movzx ecx, byte [esp + 0x30]
test cl, 1
je 0x413120
mov edx, dword [esp + 0x34]
jmp 0x413124
mov edx, ecx
shr edx, 1
mov bx, 0x20
cmp eax, edx
jae 0x41313b
test cl, 1
mov ecx, esi
je 0x413137
mov ecx, dword [esp + 0x38]
movzx ebx, word [ecx + eax*2]
mov ecx, dword [esp + 0x24]
mov word [ecx + eax*4], bx
movzx ecx, word [esp + 0x10]
mov edx, dword [esp + 0x24]
mov word [edx + eax*4 + 2], cx
inc eax
movsx ecx, word [esp + 8]
cmp eax, ecx
jb 0x413110
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 4]
jmp 0x4131f8
mov dword [esp + 4], ebx
mov eax, dword [esp + 4]
lea ebx, [eax + 0x11]
and ebx, 0xfffffff0
push ebx
call fcn.004fc150
add esp, 4
or ebx, 1
mov dword [esp + 0x10], eax
mov esi, eax
mov dword [esp + 8], ebx
mov ebx, dword [esp + 4]
mov dword [esp + 0xc], ebx
push ebx
push edi
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov byte [esi + ebx], 0
lea ecx, [esp + 8]
push 1
push 0x585cd7
call fcn.00555860
movzx ebx, byte [esp + 8]
test bl, 1
je 0x4131c7
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0xc]
jmp 0x4131cd
shr ebx, 1
lea esi, [esp + 9]
push 1
call dword [0x58040c]
add esp, 4
push eax
push ebx
push 1
push esi
call fcn.00438670
add esp, 0x10
test byte [esp + 8], 1
je 0x41331b
push dword [esp + 0x10]
jmp 0x413250
xor eax, eax
mov ecx, dword [esi + 0x10]
mov word [esp + 0x3c], di
mov word [esp + 0x3e], 1
mov dword [esp + 0x48], 0
mov ebx, esi
lea edi, [esp + 0x40]
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x3c]
push edi
push edx
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
mov byte [ebx + 1], 0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x413241
mov dword [esp + 0x28], eax
push eax
call fcn.004fc300
add esp, 4
test byte [esp + 0x30], 1
je 0x41331b
push dword [esp + 0x38]
call fcn.004fc300
add esp, 4
jmp 0x41331b
mov ecx, dword [edi + 4]
mov edi, dword [edi + 8]
lea eax, [ecx + 1]
cmp eax, 0xfffffff0
jae 0x413325
cmp eax, 0xb
jae 0x413286
mov eax, ecx
lea ebx, [esp + 9]
add al, cl
test ecx, ecx
mov byte [esp + 8], al
jne 0x4132b2
jmp 0x4132c1
mov dword [esp + 4], esi
lea esi, [ecx + 0x11]
and esi, 0xfffffff0
push esi
mov ebx, ecx
call fcn.004fc150
mov ecx, ebx
add esp, 4
or esi, 1
mov dword [esp + 0x10], eax
mov ebx, eax
mov dword [esp + 8], esi
mov esi, dword [esp + 4]
mov dword [esp + 0xc], ecx
push ecx
push edi
push ebx
mov edi, ecx
call sub.msvcrt.dll_memcpy
mov ecx, edi
add esp, 0xc
mov byte [ebx + ecx], 0
lea ecx, [esp + 8]
push 1
push 0x585cd7
call fcn.00555860
test byte [esi + 4], 1
lea edi, [esi + 4]
jne 0x4132e5
mov word [edi], 0
jmp 0x41330a
mov eax, dword [esi + 0xc]
mov byte [eax], 0
mov dword [esi + 8], 0
test byte [esi + 4], 1
je 0x41330a
push dword [esi + 0xc]
call fcn.004fc300
add esp, 4
mov dword [esi + 4], 0
mov eax, dword [esp + 0x10]
mov dword [edi + 8], eax
movsd xmm0, qword [esp + 8]
movsd qword [edi], xmm0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 8
lea ecx, [esp + 8]
call fcn.0053ebb0
lea ecx, [esp + 0x24]
call fcn.0053eb90
nop word [eax + eax]