Function at 0x405533
Capabilities:
Get common file path
Get file attributes
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1038
call fcn.00411060
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
push esi
xor esi, esi
cmp dword [0x4b3e88], 0x594
push edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], eax
jne 0x405577
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetVolumeMountPointA]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
mov eax, dword [0x4a9748]
mov dword [ebp - 0x24], eax
mov eax, dword [0x4a974c]
mov dword [ebp - 0x2c], eax
push ebx
lea eax, [ebp - 8]
mov dword [ebp - 8], esi
call fcn.0040552c
mov eax, dword [0x4a9750]
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x28], eax
mov eax, dword [0x4a9754]
add ebx, 0x23f
mov dword [ebp - 0x20], 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 [0x4b3e88], 0xc
mov dword [ebp - 4], eax
jne 0x40561b
lea eax, [ebp - 0x838]
push eax
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
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 - 0x1c], ax
lea edi, [ebp - 0x1a]
stosw word es:[edi], ax
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x1c]
lea eax, [ebp - 0x1038]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterW]
lea eax, [ebp - 0x38]
push eax
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputA]
mov eax, dword [ebp - 0x28]
add dword [ebp - 4], eax
mov eax, dword [0x4b3e88]
cmp eax, 0xfa9
jne 0x405637
mov dword [0x4b3424], 0xedeb2e40
cmp eax, 0x3eb
jne 0x405644
mov dword [0x4b2dd0], esi
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
lea eax, [ebx + edx]
shr edx, cl
mov dword [ebp - 0x14], eax
mov dword [0x4b3420], 0xf4ea3dee
add edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x14]
xor dword [ebp - 4], eax
xor edx, dword [ebp - 4]
cmp dword [0x4b3e88], 0x213
mov dword [ebp - 0x14], edx
jne 0x40567e
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov eax, dword [ebp - 0x14]
add dword [ebp - 0xc], 0x64
sub dword [ebp - 0xc], eax
sub dword [ebp - 0xc], 0x64
cmp dword [0x4b3e88], 0xc
jne 0x4056ab
lea eax, [ebp - 0x14]
push eax
push esi
push esi
lea eax, [ebp - 0x34]
push eax
push esi
push esi
push esi
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_BackupWrite]
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 4]
call fcn.00405526
mov eax, dword [ebp - 0x24]
add dword [ebp - 4], eax
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov eax, edx
shr eax, cl
lea edi, [ebx + edx]
add ebx, 0x61c88647
add eax, dword [ebp - 0x2c]
xor eax, edi
xor dword [ebp - 4], eax
mov eax, dword [ebp - 4]
sub dword [ebp - 0x10], eax
dec dword [ebp - 0x18]
jne 0x4055b3
cmp dword [0x4b3e88], 0xa6d
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp + 8]
mov dword [edi], eax
pop ebx
jne 0x405706
push esi
push esi
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceA]
mov edx, dword [ebp - 0xc]
mov dword [edi + 4], edx
pop edi
pop esi
leave
ret 4