Function at 0x42775c
Capabilities:
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x4310b4]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0xfffffffffffffff5
mov edi, edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], esi
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetStdHandle]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x4277a0
push 1
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
mov dword [esp + 0x14], eax
cmp byte [0x4397cd], 0
je 0x427b83
push 0x20
pop ecx
cmp word [0x4310d0], cx
jae 0x427b83
cmp word [0x4310cc], cx
jae 0x427b83
lea ecx, [esp + 0x44]
push ecx
push eax
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x427b83
mov cl, byte [0x4310d0]
xor edx, edx
movzx eax, word [0x4310cc]
inc edx
mov esi, dword [esp + 0x48]
xor ebx, ebx
shl edx, cl
bts edx, eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x34], 0x10
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ebx
call fcn.0042f76a
mov dword [0x4397a4], ebx
mov dword [0x43979c], ebx
mov dword [0x439798], ebx
mov dword [0x4397a0], ebx
push 0x44be6c
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x20]
push dword [ebp + 8]
push edi
push dword [esp + 0x40]
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_ReadConsoleW]
push 0x44be6c
mov dword [esp + 0x10], eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
cmp dword [0x435614], 0
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx]
mov dword [esp + 0x28], ecx
je 0x4278b4
push dword [0x43561c]
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
push dword [0x43561c]
xor eax, eax
mov dword [0x435614], eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
test ebx, ebx
je 0x4278aa
push ebx
xor eax, eax
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov edx, dword [esp + 0x1c]
xor eax, eax
mov ebx, eax
jmp 0x4278b6
xor eax, eax
cmp dword [esp + 0xc], 0
je 0x4278e6
cmp dword [edx], 0
mov dword [esp + 0x18], eax
jbe 0x4278e6
movzx ecx, word [edi + eax*2]
cmp ecx, 0xd
je 0x42791c
cmp cx, word [0x4310d0]
je 0x427914
cmp cx, word [0x4310cc]
je 0x427904
inc eax
cmp eax, dword [edx]
jb 0x4278c6
test ebx, ebx
je 0x4278fb
push ebx
xor eax, eax
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov eax, dword [esp + 0xc]
jmp 0x427bab
mov ecx, eax
mov dword [esp + 0x18], 1
mov dword [esp + 0x10], ecx
jmp 0x42792e
mov ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x42792e
xor ecx, ecx
mov dword [esp + 0x18], ecx
or ecx, 0xffffffff
mov dword [esp + 0x10], ecx
cmp eax, 0xffffffff
jne 0x4278e6
cmp ecx, 0xffffffff
je 0x4278e6
xor eax, eax
mov dword [edx], ecx
mov word [edi + ecx*2], ax
test ebx, ebx
je 0x42797a
mov ecx, ebx
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x42796b
test dx, dx
je 0x427965
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x42796b
add eax, 4
add ecx, 4
test dx, dx
jne 0x427943
xor ecx, ecx
mov eax, ecx
jmp 0x427972
sbb eax, eax
or eax, 1
xor ecx, ecx
mov dword [esp + 0xc], ecx
test eax, eax
je 0x427982
mov dword [esp + 0xc], 1
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x427a35
cmp dword [esp + 0x10], 2
jbe 0x427a35
push 3
push 0x403ce8
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x427a2c
push 3
push 0x403cf0
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x427a2c
push 3
push 0x403cf8
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x427a2c
push 6
push 0x403d00
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x427a2c
push 6
push 0x403d10
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x427a2c
push 6
push 0x403d20
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x427a2c
push 6
push 0x403d30
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x427a31
xor eax, eax
inc eax
jmp 0x427a35
mov eax, dword [esp + 0x18]
push dword [esp + 0xc]
mov edx, dword [ebp + 8]
mov ecx, edi
push eax
mov eax, dword [esp + 0x48]
shr eax, 4
not eax
and eax, 1
push eax
push dword [esp + 0x1c]
call fcn.0042f53c
test eax, eax
je 0x427af8
call fcn.0042d483
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x18]
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x427a97
mov ax, word [esp + 0x20]
xor edx, edx
movsx ecx, word [esp + 0x44]
cwde
add eax, dword [esp + 0x10]
div ecx
mov ecx, dword [esp + 0x4a]
sub ecx, eax
mov word [esp + 0x22], cx
mov esi, dword [esp + 0x20]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x2c]
jne 0x427a9c
sub ecx, edx
push esi
push dword [esp + 0x18]
sar ecx, 1
mov dword [esp + 0x2c], ecx
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_SetConsoleCursorPosition]
lea eax, [esp + 0x28]
push eax
push esi
push dword [esp + 0x30]
push 0x20
push dword [esp + 0x24]
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_FillConsoleOutputCharacterW]
xor eax, eax
push eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x2c]
push edi
push dword [esp + 0x24]
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_WriteConsoleW]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x38], eax
call fcn.0040d220
jmp 0x427b23
call fcn.004183be
test al, al
je 0x427b09
push 0xffffffffffffffff
call dword [sym.imp.ext_ms_win_cmd_util_l1_1_0.dll_MessageBeepStub]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x2c]
jne 0x427b0e
sub ecx, edx
sar ecx, 1
mov dword [esp + 0x38], ecx
test ebx, ebx
je 0x427b3a
push ebx
xor ebx, ebx
push ebx
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
jmp 0x427b3c
xor ebx, ebx
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x427b41
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
mov dword [esp + 0xc], eax
add eax, eax
push eax
push ebx
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x427b7f
mov edx, dword [esp + 0xc]
mov ecx, ebx
push edi
call fcn.0040dfe0
jmp 0x427832
xor eax, eax
jmp 0x427bab
mov ebx, 0x44be6c
push ebx
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
push 0
push esi
push dword [ebp + 8]
push edi
push dword [esp + 0x40]
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_ReadConsoleW]
push ebx
mov esi, eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
mov eax, esi
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00417b90
mov esp, ebp
pop ebp
ret 8