Function at 0x404f70
Capabilities:
Manipulate console buffer

Disassembly:
sub esp, 0x68
mov eax, dword [ecx]
push ebx
mov dword [esp + 0x40], ecx
mov ecx, dword [ecx + 4]
push ebp
mov dword [esp + 0x18], ecx
mov ecx, dword [edx + 4]
push esi
mov dword [esp + 0x18], eax
mov eax, dword [edx]
xor esi, esi
mov dword [esp + 0x40], ecx
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], esi
mov dword [esp + 0x48], 0x9e3779b9
mov dword [esp + 0x40], eax
call fcn.00404f60
mov eax, dword [edx + 8]
mov ecx, dword [edx + 0xc]
add dword [esp + 0x18], 0x23f
mov edi, dword [sym.imp.KERNEL32.DLL_FindNextFileA]
mov ebx, dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov ebp, dword [sym.imp.KERNEL32.DLL_ReadConsoleInputA]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x34], 0x20
lea esp, [esp]
mov dword [esp + 0x24], 2
add dword [esp + 0x24], 3
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x47d2fc]
shl eax, 4
mov dword [esp + 0x10], eax
cmp ecx, 0xc
jne 0x405028
push esi
push esi
call edi
push esi
push esi
push esi
push esi
push esi
push esi
push esi
call ebx
lea edx, [esp + 0x50]
push edx
push esi
lea eax, [esp + 0x64]
push eax
push esi
call ebp
mov eax, dword [esp + 0x10]
mov ecx, dword [0x47d2fc]
add eax, dword [esp + 0x38]
mov dword [esp + 0x10], eax
cmp ecx, 0xfa9
jne 0x405044
mov dword [0x47d2f8], 0xedeb2e40
jmp 0x405065
cmp ecx, 0x3eb
jne 0x405065
push esi
call dword [sym.imp.KERNEL32.DLL_GetConsoleAliasesLengthW]
lea ecx, [esp + 0x5c]
push ecx
push esi
call dword [sym.imp.KERNEL32.DLL_BuildCommDCBW]
mov dword [0x479dec], esi
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
add dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
shr eax, 5
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x3c]
add dword [esp + 0x14], edx
mov dword [0x47d2f4], 0xf4ea3dee
mov eax, dword [esp + 0x2c]
xor dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
xor dword [esp + 0x14], eax
cmp dword [0x47d2fc], 0xc
jne 0x4050dc
push esi
push 0x40120c
call dword [sym.imp.KERNEL32.DLL_WaitNamedPipeW]
push esi
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.DLL_SetWaitableTimer]
lea ecx, [esp + 0x54]
push ecx
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.DLL_WriteConsoleInputA]
lea edx, [esp + 0x58]
push edx
call dword [sym.imp.KERNEL32.DLL_InterlockedIncrement]
mov eax, dword [esp + 0x14]
sub dword [esp + 0x20], eax
mov dword [esp + 0x28], esi
sub dword [esp + 0x28], 0x5396dd36
add dword [esp + 0x28], 0x5396dd3a
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
shl eax, cl
mov dword [esp + 0x30], esi
add eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
add dword [esp + 0x30], eax
mov eax, dword [esp + 0x20]
nop
add dword [esp + 0x30], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x2c], eax
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
shr edx, cl
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x44]
add dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
xor eax, dword [esp + 0x2c]
mov dword [0x426db0], esi
xor dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
sub dword [esp + 0x1c], eax
mov eax, dword [esp + 0x48]
sub dword [esp + 0x18], eax
dec dword [esp + 0x34]
jne 0x404fe0
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov dword [eax], ecx
mov dword [eax + 4], edx
pop ebx
add esp, 0x68
ret