Function at 0x402960
Capabilities:
Get common file path
Get hostname
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2544
call fcn.00408dc0
push ebx
push esi
xor esi, esi
cmp dword [0x839d78], 0x5b1
push edi
jne 0x4029e2
push esi
push esi
lea eax, [esp + 0x558]
push eax
push esi
push esi
call sub.USER32.dll_DdeQueryStringW
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 + 0x158]
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_CreateFileMappingW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push esi
call fcn.00402dfd
push esi
call fcn.00402de7
add esp, 0xc
push esi
call fcn.004030c6
add dword [0x839d78], 0x1134b
push dword [0x839d78]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x838cc8], eax
call fcn.004028ab
xor edi, edi
cmp dword [0x839d78], esi
jbe 0x402a55
mov eax, dword [0x839d7c]
mov al, byte [eax + edi + 0x1134b]
mov ecx, dword [0x838cc8]
mov byte [ecx + edi], al
cmp dword [0x839d78], 0xa8
jne 0x402a4c
push esi
call dword [sym.imp.KERNEL32.dll_SetComputerNameA]
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
push esi
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetTimerQueueTimer]
inc edi
cmp edi, dword [0x839d78]
jb 0x402a0d
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov dword [esp + 0x10], esi
mov eax, dword [0x839d78]
mov ecx, dword [esp + 0x10]
add eax, ecx
cmp eax, 0xe
jne 0x402b09
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstChangeNotificationA]
push esi
lea eax, [esp + 0x154]
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 + 0x558]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeMountPointA]
push esi
push esi
lea eax, [esp + 0xd58]
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 + 0x1554]
push eax
push esi
lea eax, [esp + 0x24]
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
push esi
push esi
lea eax, [esp + 0x1d58]
push eax
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push esi
lea eax, [esp + 0x18]
push eax
call ebx
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
inc dword [esp + 0x10]
cmp dword [esp + 0x10], 0x39621
jl 0x402a5f
call fcn.004027b9
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 0x26
jne 0x402b32
call fcn.00402891
inc edi
cmp edi, 0x6753f
jl 0x402b22
mov dword [esp + 0x10], 0x7b
cmp dword [0x839d78], 0x86
jne 0x402ba2
push esi
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
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 + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
push esi
lea eax, [esp + 0x554]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp dword [0x839d78], 0xf
jne 0x402bb3
push esi
lea eax, [esp + 0x18]
push eax
call ebx
dec dword [esp + 0x10]
jne 0x402b43
call fcn.004025a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret