Function at 0x4211e0
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x60
mov ebx, ecx
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
cmp byte [ecx], 0
je 0x421225
push 0x867f52
call fcn.00476bb0
add esp, 4
test esi, esi
je 0x42125b
mov dword [esp + 0xc], ebx
movzx ebx, byte [edi]
test bl, 1
je 0x42139d
mov ebx, dword [edi + 4]
mov edi, dword [edi + 8]
jmp 0x4213a0
test esi, esi
je 0x421412
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
movzx eax, byte [edi]
test al, 1
je 0x421441
mov eax, dword [edi + 4]
mov edi, dword [edi + 8]
jmp 0x421444
xorps xmm0, xmm0
movaps xmmword [esp + 0x10], xmm0
mov dword [esp + 0x22], 0
mov dword [esp + 0x1e], 0
lea eax, [esp + 0x10]
push eax
mov esi, ebx
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movsx eax, word [esp + 0x10]
lea ebx, [esp + 0x40]
push eax
push edi
push ebx
call fcn.00420fe0
add esp, 0xc
test byte [edi], 1
je 0x4212b9
mov eax, dword [edi + 8]
mov byte [eax], 0
mov dword [edi + 4], 0
test byte [edi], 1
je 0x4212b9
push dword [edi + 8]
call fcn.0051c570
add esp, 4
mov eax, dword [esp + 0x48]
mov dword [edi + 8], eax
movsd xmm0, qword [esp + 0x40]
movsd qword [edi], xmm0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x48], 0
push ebx
push edi
call fcn.004bc4f0
add esp, 8
movzx edx, word [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, edx
sub cx, 1
add ecx, eax
xor edi, edi
mov word [esp + 0x50], ax
movzx eax, word [esp + 0x16]
mov word [esp + 0x52], ax
mov word [esp + 0x54], cx
mov word [esp + 0x56], ax
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 0
cmp dx, 1
mov ebx, esi
jb 0x421682
test dx, dx
js 0x4216e7
mov word [esp + 0xc], dx
movsx ebx, dx
lea eax, [ebx*4]
push eax
call fcn.0051c3d0
add esp, 4
mov edi, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov ecx, ebx
and ecx, 3
je 0x4215aa
xor edx, edx
mov eax, edi
nop word cs:[eax + eax]
mov dword [eax], 0
mov eax, dword [esp + 0x34]
add eax, 4
mov dword [esp + 0x34], eax
inc edx
cmp ecx, edx
jne 0x421380
sub ebx, edx
jmp 0x4215ac
inc edi
shr ebx, 1
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push 1
call esi
add esp, 4
push eax
push ebx
push 1
push edi
call fcn.00476c80
add esp, 0x10
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov word [esp + 0x10], 0xa02
lea edi, [esp + 0x11]
push 1
call esi
add esp, 4
push eax
push 1
push 1
push edi
call fcn.00476c80
add esp, 0x10
test byte [esp + 0x10], 1
je 0x421405
push dword [esp + 0x18]
call fcn.0051c570
add esp, 4
mov eax, dword [esp + 0xc]
mov byte [eax + 1], 1
jmp 0x4216d4
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
movzx ecx, byte [edi]
test cl, 1
je 0x4214f8
mov ecx, dword [edi + 4]
mov edi, dword [edi + 8]
jmp 0x4214fb
shr eax, 1
inc edi
mov dword [esp + 0xc], eax
lea ebx, [eax + 1]
cmp ebx, 0xfffffff0
jae 0x4216de
cmp ebx, 0xb
jae 0x42146f
mov ebx, dword [esp + 0xc]
mov eax, ebx
add al, bl
mov byte [esp + 0x10], al
lea esi, [esp + 0x11]
test ebx, ebx
jne 0x421493
jmp 0x42149e
or ebx, 0xf
lea eax, [ebx + 1]
push eax
call fcn.0051c3d0
add esp, 4
mov esi, eax
mov dword [esp + 0x18], eax
add ebx, 2
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x14], ebx
push ebx
push edi
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov byte [esi + ebx], 0
lea ecx, [esp + 0x10]
push 1
push 0x867f50
call fcn.00520110
movzx ebx, byte [esp + 0x10]
test bl, 1
je 0x4214c6
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
jmp 0x4214cc
shr ebx, 1
lea esi, [esp + 0x11]
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push ebx
push 1
push esi
call fcn.00476c80
add esp, 0x10
test byte [esp + 0x10], 1
je 0x4216d4
push dword [esp + 0x18]
jmp 0x4216cc
shr ecx, 1
inc edi
lea esi, [ecx + 1]
cmp esi, 0xfffffff0
jae 0x4216de
mov dword [esp + 0xc], ebx
cmp esi, 0xb
jae 0x421522
mov eax, ecx
add al, cl
mov byte [esp + 0x10], al
lea ebx, [esp + 0x11]
test ecx, ecx
jne 0x421546
jmp 0x421555
or esi, 0xf
lea eax, [esi + 1]
push eax
mov ebx, ecx
call fcn.0051c3d0
mov ecx, ebx
add esp, 4
mov ebx, eax
mov dword [esp + 0x18], eax
add esi, 2
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ecx
push ecx
push edi
push ebx
mov esi, ecx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov ecx, esi
add esp, 0xc
mov byte [ebx + ecx], 0
lea ecx, [esp + 0x10]
push 1
push 0x867f50
call fcn.00520110
mov ecx, dword [esp + 0xc]
lea esi, [ecx + 4]
test byte [ecx + 4], 1
je 0x421594
mov eax, dword [ecx + 0xc]
mov byte [eax], 0
mov dword [ecx + 8], 0
test byte [ecx + 4], 1
je 0x421594
push dword [ecx + 0xc]
call fcn.0051c570
add esp, 4
mov eax, dword [esp + 0x18]
mov dword [esi + 8], eax
movsd xmm0, qword [esp + 0x10]
movsd qword [esi], xmm0
jmp 0x4216d4
mov eax, edi
movzx edx, word [esp + 0xc]
cmp dx, 4
jb 0x42160c
nop word [eax + eax]
mov dword [eax], 0
mov eax, dword [esp + 0x34]
lea ecx, [eax + 4]
mov dword [esp + 0x34], ecx
mov dword [eax + 4], 0
mov eax, dword [esp + 0x34]
lea ecx, [eax + 4]
mov dword [esp + 0x34], ecx
mov dword [eax + 4], 0
mov eax, dword [esp + 0x34]
lea ecx, [eax + 4]
mov dword [esp + 0x34], ecx
mov dword [eax + 4], 0
mov eax, dword [esp + 0x34]
add eax, 4
mov dword [esp + 0x34], eax
add ebx, 0xfffffffc
jne 0x4215c0
cmp word [esp + 0x10], 0
mov ebx, esi
je 0x421682
xor eax, eax
lea ecx, [esp + 0x42]
jmp 0x421644
movzx esi, word [esi + eax*2]
mov edx, dword [esp + 0x30]
mov word [edx + eax*4], si
movzx edx, word [esp + 0x18]
mov esi, dword [esp + 0x30]
mov word [esi + eax*4 + 2], dx
inc eax
movsx edx, word [esp + 0x10]
cmp eax, edx
jae 0x421679
movzx edx, byte [esp + 0x40]
test dl, 1
je 0x421660
mov edi, dword [esp + 0x44]
jmp 0x421664
mov edi, edx
shr edi, 1
mov si, 0x20
cmp eax, edi
jae 0x421624
mov esi, ecx
test dl, 1
je 0x421620
mov esi, dword [esp + 0x48]
jmp 0x421620
mov edi, dword [esp + 0x30]
movzx edx, word [esp + 0xc]
mov eax, dword [ebx + 0x10]
mov word [esp + 0x4c], dx
mov word [esp + 0x4e], 1
mov dword [esp + 0x58], 0
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x4c]
lea esi, [esp + 0x50]
push esi
push ecx
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
mov byte [ebx + 1], 0
test edi, edi
je 0x4216c1
push edi
call fcn.0051c570
add esp, 4
test byte [esp + 0x40], 1
je 0x4216d4
push dword [esp + 0x48]
call fcn.0051c570
add esp, 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 8
lea ecx, [esp + 0x10]
call fcn.0051f6b0
lea ecx, [esp + 0x30]
call fcn.005256b0