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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4284e3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x203c
call fcn.0040a7d0
push ebx
push esi
xor ebx, ebx
cmp dword [0x2a9f360], 0x5b1
push edi
jne 0x4035ed
push ebx
push ebx
lea eax, [esp + 0x450]
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 + 0x24]
push eax
push dword [esp + 0x14]
lea eax, [esp + 0xc50]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterW]
push 0x402dd8
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push ebx
call dword [sym.imp.KERNEL32.dll_SetLocalTime]
lea eax, [esp + 0x2c]
call fcn.00403891
push ebx
mov dword [esp + 0x2058], ebx
call fcn.00403dbf
pop ecx
lea esi, [esp + 0x14]
call fcn.00403130
mov ecx, esi
call fcn.00403150
push ebx
push ebx
call fcn.00403cd1
push ebx
call fcn.00403ca2
add esp, 0xc
push ebx
call fcn.00403e3b
pop ecx
push ebx
call fcn.004040eb
add dword [0x2a9f360], 0x1134b
push dword [0x2a9f360]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x2a9e2b0], eax
call fcn.00403462
xor esi, esi
cmp dword [0x2a9f360], ebx
jbe 0x403649
cmp dword [0x2a9f360], 0xa8
mov eax, dword [0x2a9f364]
mov al, byte [eax + esi + 0x1134b]
mov ecx, dword [0x2a9e2b0]
mov byte [ecx + esi], al
jne 0x403640
push ebx
call dword [sym.imp.KERNEL32.dll_SetComputerNameW]
inc esi
cmp esi, dword [0x2a9f360]
jb 0x403618
xor esi, esi
mov eax, dword [0x2a9f360]
add eax, esi
cmp eax, 0xe
jne 0x4036bf
push ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
push ebx
lea eax, [esp + 0xc4c]
push eax
push ebx
push 0x402e34
push ebx
call dword [sym.imp.KERNEL32.dll_FoldStringW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push ebx
call dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
push ebx
push ebx
lea eax, [esp + 0x1850]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesW]
xor eax, eax
mov word [esp + 0x14], ax
lea edi, [esp + 0x16]
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 + 0x44c]
push eax
push 0x402e6c
lea eax, [esp + 0x20]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetDateFormatA]
inc esi
cmp esi, 0x39621
jl 0x40364b
call fcn.00403351
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x26
jne 0x4036df
call fcn.00403448
inc esi
cmp esi, 0x6753f
jl 0x4036cf
push 0x7b
pop esi
cmp dword [0x2a9f360], 0x86
jne 0x403727
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x144c]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_AddConsoleAliasW]
push ebx
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp dword [0x2a9f360], 0xf
jne 0x403736
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
dec esi
jne 0x4036eb
push 0x402ea4
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [esp + 0x204c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret