Function at 0x4ad0ef42
Capabilities:
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x4ad12056
cmp byte [0x4ad2fa64], 0
je 0x4ad12092
cmp word [0x4ad2fa58], 0x20
jae 0x4ad12092
cmp word [0x4ad2fa5c], 0x20
jae 0x4ad12092
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad12092
mov eax, dword [ebp - 0x3c]
mov cl, byte [0x4ad2fa5c]
mov dword [ebp - 8], eax
xor eax, eax
inc eax
xor edx, edx
shl eax, cl
mov cl, byte [0x4ad2fa58]
inc edx
push ebx
shl edx, cl
push esi
push edi
xor edi, edi
or eax, edx
mov dword [ebp - 0x28], 0x10
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edi
call fcn.4ad0f49b
mov esi, dword [ebp + 0xc]
mov dword [ebp - 4], edi
mov ebx, dword [ebp + 0x14]
lea eax, [ebp - 0x28]
push eax
push ebx
push dword [ebp + 0x10]
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
cmp dword [0x4ad2b9e8], edi
mov dword [ebp - 0x18], eax
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
jne 0x4ad10d27
cmp dword [ebp - 0x18], edi
je 0x4ad0f046
mov dword [ebp + 0xc], edi
xor eax, eax
or edi, 0xffffffff
or edx, 0xffffffff
cmp dword [ebx], eax
jbe 0x4ad0f044
mov cx, word [esi + eax*2]
cmp cx, 0xd
je 0x4ad0f17e
cmp cx, word [0x4ad2fa58]
je 0x4ad0f8a8
cmp cx, word [0x4ad2fa5c]
je 0x4ad1137f
inc eax
cmp eax, dword [ebx]
jb 0x4ad0f017
xor edi, edi
cmp dword [ebp - 4], edi
jne 0x4ad0f4d1
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
leave
ret 0x10
mov edx, eax
cmp edx, 0xffffffff
jne 0x4ad0f044
cmp edi, 0xffffffff
je 0x4ad0f044
mov dword [ebx], edi
xor ebx, ebx
cmp dword [ebp - 4], ebx
mov word [esi + edi*2], bx
jne 0x4ad0fd95
xor ebx, ebx
inc ebx
cmp dword [ebp + 0xc], 0
jne 0x4ad0f268
cmp edi, 2
jbe 0x4ad0f268
push 3
push 0x4ad0f37c
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad11373
push 3
push 0x4ad0f374
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad11373
push 3
push 0x4ad0f36c
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad11373
push 6
push 0x4ad0f35c
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad11373
push 6
push 0x4ad0f34c
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad11373
push 6
push 0x4ad0f33c
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad11373
push 6
push 0x4ad0f32c
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad11373
mov eax, dword [ebp - 0x1c]
push ebx
push dword [ebp + 0xc]
shr eax, 4
not eax
and eax, 1
push eax
push dword [ebp + 0x10]
push edi
push esi
call fcn.4ad0f8b4
test eax, eax
je 0x4ad1207d
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 0x40]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad0f2b3
movsx eax, word [ebp - 8]
movsx ecx, word [ebp - 0x40]
add eax, edi
xor edx, edx
div ecx
mov ecx, dword [ebp - 0x3a]
sub ecx, eax
mov word [ebp - 6], cx
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push dword [ebp - 8]
mov dword [ebp - 0x10], eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 8]
push dword [ebp - 0x14]
push 0x20
push ebx
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov eax, dword [ebp - 0x10]
xor edi, edi
cmp dword [ebp - 4], edi
mov dword [ebp - 0x24], eax
jne 0x4ad0fdae
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 2]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
xor edi, edi
jmp 0x4ad0efda
push dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4ad0f04f
mov edi, eax
jmp 0x4ad0f189
push dword [ebp - 4]
push esi
call dword [sym.imp.msvcrt.dll_wcscmp]
test eax, eax
pop ecx
pop ecx
je 0x4ad0f1a6
jmp 0x4ad0f1a3
push dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4ad0f2fd
call fcn.4ad01eed
cmp dword [ebp - 4], edi
jne 0x4ad12067
mov dword [ebp - 4], edi
jmp 0x4ad0f003
mov dword [ebp + 0xc], 1
jmp 0x4ad0f268
mov edi, eax
mov dword [ebp + 0xc], 1
jmp 0x4ad0f180
push 1
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
mov dword [ebp - 0xc], eax
jmp 0x4ad0ef5e
push dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4ad10d35
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_MessageBeep]
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
jmp 0x4ad0f2ef
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
jmp 0x4ad0f055