Function at 0x4038f8
Capabilities:
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, 0x18dc
call fcn.00409f40
push ebx
push esi
xor ebx, ebx
cmp dword [0x2b190a0], 0x5b1
push edi
jne 0x4039cc
push ebx
push ebx
lea eax, [esp + 0x10f0]
push eax
push ebx
push ebx
call sub.USER32.dll_DdeQueryStringA
push ebx
push ebx
push ebx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
xor eax, eax
mov word [esp + 0xc], ax
lea edi, [esp + 0xe]
stosw word es:[edi], ax
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x10]
lea eax, [esp + 0x8f0]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
push 0x4030a0
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]
push ebx
push dword [esp + 0x14]
lea eax, [esp + 0xf0]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_ShellAboutW]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.ole32.dll_StringFromCLSID]
push ebx
call fcn.00403c92
pop ecx
lea esi, [esp + 0x18]
call fcn.00403500
mov ecx, esi
call fcn.00403520
push ebx
push ebx
call fcn.00403dcc
push ebx
call fcn.00403d9d
push ebx
call fcn.00403e6d
add esp, 0x10
push ebx
call fcn.0040411d
add dword [0x2b190a0], 0x1134b
push dword [0x2b190a0]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x2b17ff0], eax
call fcn.00403843
xor esi, esi
cmp dword [0x2b190a0], ebx
jbe 0x403a2c
cmp dword [0x2b190a0], 0xa8
mov eax, dword [0x2b190a4]
mov al, byte [eax + esi + 0x1134b]
mov ecx, dword [0x2b17ff0]
mov byte [ecx + esi], al
jne 0x403a23
push 0x403178
call dword [sym.imp.KERNEL32.dll_SetComputerNameA]
inc esi
cmp esi, dword [0x2b190a0]
jb 0x4039f7
xor esi, esi
mov eax, dword [0x2b190a0]
add eax, esi
cmp eax, 0xe
jne 0x403aad
push ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
push ebx
lea eax, [esp + 0xec]
push eax
push ebx
push 0x4031c0
push ebx
call dword [sym.imp.KERNEL32.dll_FoldStringW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea eax, [esp + 0xc]
push eax
push ebx
push 0x403218
push ebx
call dword [sym.imp.KERNEL32.dll_GetStringTypeW]
push ebx
push ebx
lea eax, [esp + 0x8f0]
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 + 0x10ec]
push eax
push 0x4032c0
lea eax, [esp + 0x24]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
inc esi
cmp esi, 0x39621
jl 0x403a2e
call fcn.0040372e
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x26
jne 0x403ad1
call fcn.00403829
inc esi
cmp esi, 0x6753f
jl 0x403ac1
push 0x7b
pop esi
cmp dword [0x2b190a0], 0x86
jne 0x403b48
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0xec]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
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 + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_TzSpecificLocalTimeToSystemTime]
push ebx
lea eax, [esp + 0x8ec]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp dword [0x2b190a0], 0xf
jne 0x403b5d
push ebx
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
dec esi
jne 0x403add
push 0x4032b4
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret