Function at 0x4ad04a93
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push edi
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x4ad04ab8
push 1
call dword [sym.imp.MSVCRT.dll__get_osfhandle]
pop ecx
mov dword [ebp - 0x10], eax
cmp byte [0x4ad1cf7c], 0
je 0x4ad04e0c
cmp word [0x4ad1c7e4], 0x20
jae 0x4ad04e0c
cmp word [0x4ad1c7e8], 0x20
jae 0x4ad04e0c
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4ad04e0c
mov eax, dword [ebp - 0x50]
push 1
movsx ecx, word [ebp - 0x48]
movsx edx, word [ebp - 0x4a]
mov dword [ebp - 8], eax
mov dword [ebp - 0x3c], 0x10
movsx eax, word [ebp - 0x44]
sub eax, ecx
movsx ecx, word [ebp - 0x46]
sub ecx, edx
inc eax
inc ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0xc], ecx
xor ecx, ecx
cmp ax, word [ebp - 0x52]
pop eax
push 1
setne cl
mov dword [ebp - 0x2c], ecx
mov cl, byte [0x4ad1c7e4]
shl eax, cl
mov cl, byte [0x4ad1c7e8]
pop edx
shl edx, cl
xor esi, esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x30], esi
or eax, edx
mov dword [ebp - 0x34], eax
call fcn.4ad19e2f
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 4], esi
mov dword [ebp - 0x20], esi
mov edi, dword [ebp + 0x14]
lea eax, [ebp - 0x3c]
push eax
push edi
push dword [ebp + 0x10]
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
cmp dword [0x4ad22878], esi
mov dword [ebp - 0x24], eax
je 0x4ad04b9a
call fcn.4ad0aafe
cmp dword [ebp - 4], esi
je 0x4ad04b97
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], esi
cmp dword [ebp - 0x24], esi
je 0x4ad04df1
mov eax, dword [edi]
or dword [ebp - 0x1c], 0xffffffff
mov dword [ebp + 0xc], esi
or esi, 0xffffffff
xor ecx, ecx
test eax, eax
jbe 0x4ad04bed
mov edi, ebx
mov dx, word [edi]
cmp dx, 0xd
je 0x4ad04bdb
cmp dx, word [0x4ad1c7e4]
je 0x4ad04be0
cmp dx, word [0x4ad1c7e8]
je 0x4ad04be4
inc ecx
inc edi
inc edi
cmp ecx, eax
jb 0x4ad04bb7
jmp 0x4ad04bed
mov dword [ebp - 0x1c], ecx
jmp 0x4ad04bed
mov esi, ecx
jmp 0x4ad04bed
mov esi, ecx
mov dword [ebp + 0xc], 1
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x4ad04def
cmp esi, 0xffffffff
je 0x4ad04def
mov eax, dword [ebp + 0x14]
mov dword [eax], esi
and word [ebx + esi*2], 0
cmp dword [ebp - 4], 0
je 0x4ad04c25
push dword [ebp - 4]
push ebx
call dword [sym.imp.MSVCRT.dll_wcscmp]
pop ecx
test eax, eax
pop ecx
jne 0x4ad04c25
and dword [ebp - 0x1c], eax
jmp 0x4ad04c2c
mov dword [ebp - 0x1c], 1
cmp dword [ebp + 0xc], 0
jne 0x4ad04caa
cmp esi, 3
jbe 0x4ad04caa
mov edi, dword [sym.imp.MSVCRT.dll__wcsnicmp]
push 3
push 0x4ad01598
push ebx
call edi
add esp, 0xc
test eax, eax
je 0x4ad04ca3
push 3
push 0x4ad01590
push ebx
call edi
add esp, 0xc
test eax, eax
je 0x4ad04ca3
push 3
push 0x4ad01588
push ebx
call edi
add esp, 0xc
test eax, eax
je 0x4ad04ca3
push 6
push 0x4ad01578
push ebx
call edi
add esp, 0xc
test eax, eax
je 0x4ad04ca3
push 6
push 0x4ad01568
push ebx
call edi
add esp, 0xc
test eax, eax
je 0x4ad04ca3
push 6
push 0x4ad01558
push ebx
call edi
add esp, 0xc
test eax, eax
jne 0x4ad04caa
mov dword [ebp + 0xc], 1
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x1c]
not eax
push dword [ebp + 0xc]
shr eax, 4
and eax, 1
push eax
push dword [ebp + 0x10]
push esi
push ebx
call fcn.4ad19e4b
test eax, eax
je 0x4ad04d92
push ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
mov dword [ebp - 0x14], eax
push dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
movsx ecx, word [ebp - 8]
mov esi, dword [ebp - 0x14]
xor edx, edx
lea eax, [esi + ecx]
div dword [ebp - 0xc]
mov edi, eax
mov eax, dword [ebp - 0x20]
cmp esi, eax
jae 0x4ad04d0b
add eax, ecx
xor edx, edx
div dword [ebp - 0xc]
inc eax
jmp 0x4ad04d0e
lea eax, [edi + 1]
imul eax, dword [ebp - 0xc]
sub eax, ecx
lea ecx, [ebp - 0x18]
push ecx
mov esi, dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
push dword [ebp - 8]
mov dword [ebp - 0x18], eax
push eax
push 0x20
push dword [ebp - 0x10]
call esi
test edi, edi
jbe 0x4ad04d7a
movsx eax, word [ebp - 6]
mov ecx, edi
add ecx, eax
cmp ecx, dword [ebp - 0x28]
jb 0x4ad04d7a
cmp dword [ebp - 0x2c], 0
jne 0x4ad04d47
sub word [ebp - 6], di
mov eax, dword [ebp - 8]
xor edx, edx
movsx ecx, word [ebp - 8]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x14]
add eax, ecx
add word [ebp + 0xe], di
div dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0x18]
push eax
movsx eax, dx
mov word [ebp + 0xc], dx
push dword [ebp + 0xc]
sub ecx, eax
push ecx
push 0x20
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x14]
push 0
push eax
push dword [ebp - 0x14]
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov eax, dword [ebp - 0x14]
jmp 0x4ad04da2
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_MessageBeep]
push ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
xor esi, esi
mov dword [ebp - 0x38], eax
cmp dword [ebp - 4], esi
je 0x4ad04dbd
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov dword [ebp - 0x20], eax
pop ecx
lea eax, [eax + eax + 2]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push ebx
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
pop ecx
xor esi, esi
pop ecx
jmp 0x4ad04b5c
xor esi, esi
cmp dword [ebp - 4], esi
je 0x4ad04e07
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x24]
jmp 0x4ad04e20
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]
pop edi
pop esi
pop ebx
leave
ret 0x10