Function at 0x404c22
Capabilities:
Get file attributes
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x46c
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ebx
mov ebx, dword [eax + 4]
push esi
xor esi, esi
cmp dword [0x241b84c], 0x594
push edi
mov dword [ebp - 0x10], ecx
jne 0x404c5f
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov eax, dword [0x430378]
mov dword [ebp - 0x24], eax
mov eax, dword [0x43037c]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], esi
call fcn.00404c1b
mov eax, dword [0x430380]
add dword [ebp - 0xc], 0x23f
mov dword [ebp - 0x28], eax
mov eax, dword [0x430384]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], 0x20
mov dword [ebp - 8], 2
add dword [ebp - 8], 3
mov eax, dword [ebp - 0x10]
shl eax, 4
cmp dword [0x241b84c], 0xc
mov dword [ebp - 4], eax
jne 0x404cfa
push esi
call dword [sym.imp.KERNEL32.dll_UnregisterWait]
push esi
push esi
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
xor eax, eax
mov word [ebp - 0x14], ax
lea edi, [ebp - 0x12]
stosw word es:[edi], ax
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x14]
lea eax, [ebp - 0x46c]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
lea eax, [ebp - 0x38]
push eax
push esi
lea eax, [ebp - 0x50]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputA]
mov eax, dword [ebp - 0x28]
add dword [ebp - 4], eax
mov eax, dword [0x241b84c]
cmp eax, 0xfa9
jne 0x404d16
mov dword [0x241b848], 0xedeb2e40
cmp eax, 0x3eb
jne 0x404d23
mov dword [0x23fd568], esi
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
add eax, edi
shr edi, cl
mov dword [ebp - 0x20], eax
mov dword [0x241b844], 0xf4ea3dee
add edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
xor dword [ebp - 4], eax
xor edi, dword [ebp - 4]
cmp dword [0x241b84c], 0x213
jne 0x404d5c
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub ebx, edi
cmp dword [0x241b84c], 0xc
jne 0x404d82
xor eax, eax
mov dword [ebp - 0x50], esi
lea edi, [ebp - 0x4c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x6c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_BuildCommDCBAndTimeoutsW]
mov eax, ebx
lea ecx, [ebp - 4]
call fcn.00404c15
mov eax, dword [ebp - 0x24]
add dword [ebp - 4], eax
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov edi, ebx
shr edi, cl
add eax, ebx
xor dword [ebp - 4], eax
add edi, dword [ebp - 0x2c]
cmp dword [0x241b84c], 0x121
jne 0x404dc5
push esi
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthA]
push 0x403620
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetCalendarInfoA]
xor dword [ebp - 4], edi
mov eax, dword [ebp - 4]
sub dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
call fcn.00404c0e
dec dword [ebp - 0x18]
jne 0x404c98
cmp dword [0x241b84c], 0xa6d
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp + 8]
mov dword [edi], eax
jne 0x404e01
push esi
push esi
push 0x403644
push esi
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesA]
mov dword [edi + 4], ebx
pop edi
pop esi
pop ebx
leave
ret 4