Function at 0x408e60
Capabilities:
Create pipe
Get common file path
Get geographical location
Get hostname
Set console window title
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x854
mov eax, dword [0x46607c]
xor eax, esp
mov dword [esp + 0x850], eax
mov edx, dword [0x4732b4]
push ebx
push esi
xor ebx, ebx
push edi
cmp edx, 0x7c
jne 0x408ef9
push ebx
push ebx
call dword [sym.imp.USER32.dll_LoadIconW]
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ebx
call dword [sym.imp.KERNEL32.dll_FindVolumeMountPointClose]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp dword [0x4732b4], 0x2d
jne 0x408ed4
push ebx
push ebx
push ebx
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
push ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call fcn.00401c20
add esp, 4
lea ecx, [esp + 0x14]
push ecx
call fcn.004010f0
mov edx, dword [0x4732b4]
mov ecx, dword [0x467c80]
xor eax, eax
mov edi, 0xec58acac
or esi, 0xffffffff
lea esp, [esp]
cmp eax, 0x8450db
jne 0x408f1d
lea edx, [ecx + 0xa231]
cmp edx, 0x141
jne 0x408f31
mov dword [0x468f68], edi
mov dword [0x468f6c], esi
inc eax
cmp eax, 0xb9fa618
jl 0x408f10
mov edi, dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
mov dword [0x4732b4], edx
xor esi, esi
cmp esi, 0x562d05
jne 0x408f59
mov eax, dword [0x467c74]
mov dword [0x4732b8], eax
cmp edx, 0x3c
jne 0x408f67
push ebx
call edi
mov edx, dword [0x4732b4]
inc esi
cmp esi, 0x5f6c74
jl 0x408f47
cmp edx, 0x110a
jne 0x40903c
push ebx
mov dword [0x473180], ebx
mov dword [0x473184], ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthA]
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_UnlockFile]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
lea eax, [esp + 0x30]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetCommState]
push ebx
push ebx
call fcn.00401b41
push ebx
call fcn.00401b81
add esp, 0xc
push 0x30
push 0x4642bc
push str._s__c
push 0x468ee0
call fcn.0040161c
xor ecx, ecx
add esp, 0x10
lea esi, [ecx + 1]
lea eax, [esp + 0x14]
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], ebx
mov word [esp + 0x14], cx
call fcn.00401150
push ebx
push ebx
call fcn.00401c36
push 0x4642bc
push 0x468ee0
call fcn.0040161c
add esp, 0x10
cmp dword [esp + 0x28], 8
jb 0x40903c
mov edx, dword [esp + 0x14]
push edx
call fcn.00401c15
add esp, 4
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov eax, dword [0x4732b4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
xor esi, esi
mov dword [0x472fdc], eax
cmp dword [0x4732b4], ebx
jbe 0x4090ad
mov edi, dword [sym.imp.KERNEL32.dll_VirtualFree]
lea esp, [esp]
mov ecx, dword [0x4732b8]
mov dword [esp + 0x10], ecx
mov eax, 0xa231
add dword [esp + 0x10], eax
mov edx, dword [esp + 0x10]
mov al, byte [edx + esi]
mov ecx, dword [0x472fdc]
mov byte [ecx + esi], al
cmp dword [0x4732b4], 0x5ab
jne 0x4090a4
push ebx
push ebx
push ebx
call edi
inc esi
cmp esi, dword [0x4732b4]
jb 0x409070
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.msimg32.dll
call esi
call fcn.00408b60
mov eax, dword [0x4732b4]
mov edx, dword [0x472fdc]
mov edi, dword [0x466e60]
mov ebx, eax
mov dword [esp + 0x10], edx
cmp eax, 0x930
jne 0x4090ea
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov eax, dword [0x4732b4]
mov dword [0x472fd8], edi
cmp eax, 0x114e
jne 0x40910e
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
push 0
call esi
mov eax, dword [0x4732b4]
cmp eax, 0x2f
jne 0x40912d
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumCalendarInfoA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FindNextVolumeMountPointA]
mov eax, dword [esp + 0x10]
push ebx
push eax
call fcn.00408cb0
add dword [0x472fdc], 0
mov ebx, dword [esp + 0x40]
mov edi, dword [sym.imp.KERNEL32.dll_GetAtomNameW]
add esp, 8
xor esi, esi
push 0
push 0
push 0
call edi
cmp esi, 0x1a01e
jle 0x409169
cmp ebx, 0xf5bed7
jne 0x409172
inc esi
cmp esi, 0x1ece7a52
jl 0x409151
mov edi, dword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeaps]
mov dword [esp + 0x10], 0x1519a5
mov ebx, 0x8e46a6f0
jmp 0x409190
cmp dword [0x4732b4], 0xcc1
jne 0x40919e
call edi
cmp dword [0x4732b4], 0x3dc
mov dword [0x47317c], ebx
jne 0x4091b6
push 0
push 0
call esi
dec dword [esp + 0x10]
jne 0x409190
mov ecx, dword [esp + 0x85c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040160d
mov esp, ebp
pop ebp
ret