Function at 0x4221b0
Capabilities:
Manipulate console buffer
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4512e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc8
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [sym.imp.MSVCR80.dll__fileno]
xor esi, esi
push ebx
mov dword [esp + 0x54], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x34], esi
call edi
push eax
call dword [sym.imp.MSVCR80.dll__isatty]
add esp, 8
test eax, eax
setne al
test al, al
mov byte [esp + 0x13], al
je 0x422247
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push ebx
mov dword [esp + 0x54], eax
call edi
push eax
call dword [sym.imp.MSVCR80.dll__get_osfhandle]
mov ebx, dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov esi, eax
add esp, 8
lea eax, [esp + 0xb8]
push eax
push esi
call ebx
mov ax, word [esp + 0xc0]
movzx ecx, ax
movzx edx, ax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x30], edx
jmp 0x42224d
mov ebx, dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
xor edi, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x80], edi
mov dword [esp + 0x84], edi
mov dword [esp + 0x88], edi
mov dword [esp + 0x8c], 0x40
mov dword [esp + 0xb4], edi
mov dword [esp + 0x7c], 0x455778
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x30]
push edx
push eax
mov dword [esp + 0xec], edi
call fcn.00441eb0
add esp, 0x10
test al, al
je 0x42264f
lea esp, [esp]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov edx, dword [ebp + 8]
add dword [esp + 0x1c], eax
add ecx, edx
push eax
push ecx
lea ecx, [esp + 0x84]
call fcn.0041ebb0
cmp byte [esp + 0x13], 0
je 0x42257d
mov eax, dword [esp + 0x48]
cmp eax, edi
je 0x42257d
cmp eax, 1
je 0x42257d
mov eax, dword [esp + 0x28]
add dword [esp + 0x1c], eax
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x58], eax
lea eax, [esp + 0x48]
mov dword [esp + 0x3c], ecx
push eax
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00441fa0
add esp, 0x10
test al, al
je 0x42257d
mov eax, dword [esp + 0x44]
add eax, 0xffffffff
cmp eax, 8
ja case.default.0x422336
jmp dword [eax*4 + 0x4226d4]
mov eax, dword [esp + 0xc]
and eax, 0xff07
or eax, 7
mov dword [esp + 0xc], eax
jmp case.default.0x422336
mov eax, dword [esp + 0x20]
cmp eax, edi
je 0x422370
cmp eax, 3
jne case.default.0x422336
or dword [esp + 0xc], 0x80
jmp case.default.0x422336
or dword [esp + 0xc], 8
jmp case.default.0x422336
mov eax, dword [esp + 0x20]
cmp eax, edi
je 0x422398
cmp eax, 3
jne case.default.0x422336
and dword [esp + 0xc], 0xff7f
jmp case.default.0x422336
and dword [esp + 0xc], 0xfff7
jmp case.default.0x422336
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x20]
and ecx, 0xfff8
or cx, word [edx*2 + 0x45685c]
movzx eax, cx
mov dword [esp + 0xc], eax
jmp case.default.0x422336
mov ecx, dword [esp + 0x20]
mov dx, word [ecx*2 + 0x45685c]
mov eax, dword [esp + 0xc]
shl dx, 4
and eax, 0xff8f
or dx, ax
movzx ecx, dx
mov dword [esp + 0xc], ecx
jmp case.default.0x422336
lea edx, [esp + 0x58]
push edx
push esi
mov word [esp + 0x48], di
mov word [esp + 0x4a], di
call ebx
movsx edi, word [esp + 0x5a]
movsx eax, word [esp + 0x58]
mov ebx, dword [esp + 0x40]
imul edi, eax
lea ecx, [esp + 0x78]
push ecx
push ebx
push edi
push 0x20
push esi
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
lea edx, [esp + 0x78]
mov eax, dword [esp + 0x60]
push edx
push ebx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov ebx, dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
xor edi, edi
jmp case.default.0x422336
lea ecx, [esp + 0x58]
push ecx
push esi
call ebx
mov eax, dword [esp + 0x5c]
movsx edi, word [esp + 0x58]
movsx edx, ax
lea ecx, [esp + 0x74]
push ecx
push eax
sub edi, edx
push edi
push 0x20
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
lea edx, [esp + 0x74]
jmp 0x422426
lea ecx, [esp + 0x58]
push ecx
push esi
call ebx
cmp dword [esp + 0x20], edi
movsx ecx, word [esp + 0x58]
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], ecx
lea eax, [esp + 0x20]
jg 0x42249b
lea eax, [esp + 0x18]
cmp dword [eax], ecx
jl 0x4224a3
lea eax, [esp + 0x14]
cmp dword [esp + 0x24], edi
mov eax, dword [eax]
movsx ecx, word [esp + 0x5a]
mov word [esp + 0x4c], ax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ecx
lea eax, [esp + 0x24]
jg 0x4224c5
lea eax, [esp + 0x14]
cmp dword [eax], ecx
jl 0x4224cd
lea eax, [esp + 0x18]
mov eax, dword [eax]
mov word [esp + 0x4e], ax
mov edx, dword [esp + 0x4c]
push edx
jmp 0x422552
lea eax, [esp + 0x58]
push eax
push esi
call ebx
movsx eax, word [esp + 0x5c]
add eax, dword [esp + 0x20]
movsx ecx, word [esp + 0x58]
mov dword [esp + 0x14], eax
cmp eax, edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x34], ecx
lea eax, [esp + 0x14]
jg 0x422509
lea eax, [esp + 0x18]
cmp dword [eax], ecx
jl 0x422511
lea eax, [esp + 0x34]
mov eax, dword [eax]
movsx ecx, word [esp + 0x5a]
mov word [esp + 0x3c], ax
movsx eax, word [esp + 0x5e]
add eax, dword [esp + 0x24]
mov dword [esp + 0x14], edi
mov dword [esp + 0x34], eax
cmp eax, edi
mov dword [esp + 0x18], ecx
lea eax, [esp + 0x34]
jg 0x42253e
lea eax, [esp + 0x14]
cmp dword [eax], ecx
jl 0x422546
lea eax, [esp + 0x18]
mov eax, dword [eax]
mov word [esp + 0x3e], ax
mov ecx, dword [esp + 0x3c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00441fa0
add esp, 0x10
test al, al
jne 0x422326
cmp dword [esp + 0x2c], edi
jbe 0x42261d
cmp byte [esp + 0x13], 0
je 0x4225ec
mov edi, dword [esp + 0xc]
cmp word [esp + 0x30], di
je 0x4225a8
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
movzx eax, di
mov dword [esp + 0x30], eax
mov edi, dword [esp + 0x50]
cmp edi, 0xfde9
je 0x4225ea
mov edx, dword [esp + 0x7c]
mov eax, dword [edx + 0x18]
lea ecx, [esp + 0x7c]
call eax
push edi
push eax
lea ecx, [esp + 0x78]
call fcn.00422110
mov ecx, dword [ebp + 0xc]
mov eax, dword [eax]
push ecx
push eax
call dword [sym.imp.MSVCR80.dll_fputs]
mov edx, dword [esp + 0x78]
push edx
mov edi, eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 0xc
jmp 0x422612
xor edi, edi
mov eax, dword [esp + 0x7c]
mov edx, dword [eax + 0x18]
lea ecx, [esp + 0x7c]
call edx
cmp eax, edi
jne 0x422602
mov eax, 0x4611ab
mov ecx, dword [ebp + 0xc]
push ecx
push eax
call dword [sym.imp.MSVCR80.dll_fputs]
add esp, 8
mov edi, eax
cmp edi, 0xffffffff
je 0x42269e
xor edi, edi
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
add edx, eax
mov eax, dword [ebp + 8]
add eax, edx
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x30]
push ecx
push eax
mov dword [ebp + 8], eax
call fcn.00441eb0
add esp, 0x10
test al, al
jne 0x4222b0
cmp byte [esp + 0x13], 0
je 0x422669
mov eax, dword [esp + 0xc]
cmp word [esp + 0x30], ax
je 0x422669
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea ecx, [esp + 0x7c]
mov dword [esp + 0xdc], 0xffffffff
mov dword [esp + 0x7c], 0x45569c
call fcn.0041e9c0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xd4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x7c]
mov dword [esp + 0xdc], 0xffffffff
mov dword [esp + 0x7c], 0x45569c
call fcn.0041e9c0
mov ecx, dword [esp + 0xd4]
pop edi
pop esi
or eax, 0xffffffff
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret