Function at 0x414490
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
push esi
push ebx
sub esp, 0x5c
mov esi, dword [ebp + 8]
cmp byte [ecx], 0
je 0x414628
mov dword [esp], 0x56145b
call fcn.004343d0
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x414502
mov eax, esi
call fcn.00414210
lea eax, [ebp - 0x39]
lea ecx, [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], 0x561459
call fcn.0051db30
lea eax, [ebp - 0x30]
sub esp, 8
call fcn.00414210
mov eax, dword [ebp - 0x30]
lea ecx, [eax - 0xc]
cmp ecx, 0x55c3f0
jne 0x4146d1
mov byte [edi + 1], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [edi + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movsx eax, word [ebp - 0x30]
sub esp, 8
mov dword [esp + 8], eax
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov dword [esp + 4], esi
call fcn.00414240
lea eax, [ebp - 0x38]
mov ecx, esi
mov dword [esp], eax
call fcn.0051c690
mov eax, dword [ebp - 0x38]
lea ecx, [eax - 0xc]
sub esp, 4
cmp ecx, 0x55c3f0
jne 0x4146f2
movzx edx, word [ebp - 0x30]
movzx ecx, word [ebp - 0x2c]
movzx eax, word [ebp - 0x2a]
mov dword [ebp - 0x50], 0x10000
movsx ebx, dx
mov word [ebp - 0x38], cx
test ebx, ebx
lea ecx, [edx + ecx - 1]
mov word [ebp - 0x50], dx
mov word [ebp - 0x36], ax
mov word [ebp - 0x34], cx
mov word [ebp - 0x32], ax
mov dword [ebp - 0x4c], 0
jne 0x414690
xor ebx, ebx
test dx, dx
mov eax, dword [ebp - 0x4c]
je 0x4145db
mov dword [ebp - 0x54], edi
mov edi, esi
mov esi, eax
nop
mov edx, dword [edi]
mov ecx, 0x20
cmp ebx, dword [edx - 0xc]
jae 0x4145c0
mov ecx, dword [edx - 4]
test ecx, ecx
js 0x4145bc
mov ecx, edi
call fcn.0051bde0
mov edx, dword [edi]
movzx ecx, byte [edx + ebx]
mov byte [esi], cl
movzx edx, word [ebp - 0x28]
add ebx, 1
add esi, 4
mov word [esi - 2], dx
movsx edx, word [ebp - 0x30]
cmp edx, ebx
ja 0x4145a0
mov edi, dword [ebp - 0x54]
lea eax, [ebp - 0x38]
mov esi, dword [ebp - 0x4c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 0xc], 0
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [edi + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
mov byte [edi + 1], 0
sub esp, 0x14
test esi, esi
je 0x4144f8
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call fcn.00550630
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
lea ecx, [ebp - 0x30]
mov dword [esp], esi
call fcn.0051dbd0
lea ecx, [ebp - 0x30]
sub esp, 4
mov dword [esp + 4], 1
mov dword [esp], 0x561459
call fcn.0051c8d0
lea eax, [ebp - 0x30]
sub esp, 8
call fcn.00414210
mov eax, dword [ebp - 0x30]
lea ecx, [eax - 0xc]
cmp ecx, 0x55c3f0
je 0x4144f8
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4144f8
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.0051c400
push eax
jmp 0x4144f8
cmp ebx, 0x3fffffff
ja 0x4146cc
lea eax, [ebx*4]
mov dword [esp], eax
call fcn.005506e0
mov dword [ebp - 0x4c], eax
lea esi, [esi]
xor edx, edx
xor ecx, ecx
mov word [eax], dx
add eax, 4
mov word [eax - 2], cx
sub ebx, 1
jne 0x4146b0
movzx edx, word [ebp - 0x30]
jmp 0x41458e
call fcn.0054a6e0
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4144f4
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.0051c400
push eax
jmp 0x4144f4
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x414551
lea eax, [ebp - 0x39]
mov dword [esp], eax
call fcn.0051c400
push ebx
jmp 0x414551