Function at 0x408ec0
Capabilities:
Create pipe
Get common file path
Get geographical location
Get hostname
Set current directory

Disassembly:
sub esp, 0x854
mov eax, dword [0x45707c]
xor eax, esp
mov dword [esp + 0x84c], eax
mov edx, dword [0x4642b4]
push ebx
push ebp
push esi
xor ebp, ebp
push edi
cmp edx, 0x7c
jne 0x408f54
push ebp
push ebp
call dword [sym.imp.USER32.dll_LoadIconW]
push ebp
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ebp
call dword [sym.imp.KERNEL32.dll_FindVolumeMountPointClose]
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp dword [0x4642b4], 0x2d
jne 0x408f2f
push ebp
push ebp
push ebp
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], ebp
call dword [sym.imp.KERNEL32.dll_CreatePipe]
push ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
call fcn.00401c20
add esp, 4
lea ecx, [esp + 0x14]
push ecx
call fcn.004010f0
mov edx, dword [0x4642b4]
mov ecx, dword [0x458c80]
xor eax, eax
mov edi, 0xec58acac
or esi, 0xffffffff
cmp eax, 0x8450db
jne 0x408f71
lea edx, [ecx + 0xa231]
cmp edx, 0x141
jne 0x408f85
mov dword [0x459f68], edi
mov dword [0x459f6c], esi
inc eax
cmp eax, 0xb9fa618
jl 0x408f64
mov edi, dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
mov dword [0x4642b4], edx
xor esi, esi
jmp 0x408fa0
cmp esi, 0x562d05
jne 0x408fb2
mov eax, dword [0x458c74]
mov dword [0x4642b8], eax
cmp edx, 0x3c
jne 0x408fc0
push ebp
call edi
mov edx, dword [0x4642b4]
inc esi
cmp esi, 0x5f6c74
jl 0x408fa0
cmp edx, 0x110a
jne 0x409095
push ebp
mov dword [0x464180], ebp
mov dword [0x464184], ebp
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthA]
push ebp
push ebp
push ebp
push ebp
push ebp
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 ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebp
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
lea eax, [esp + 0x30]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetCommState]
push ebp
push ebp
call fcn.00401b41
push ebp
call fcn.00401b81
add esp, 0xc
push 0x30
push 0x455990
push str._s__c
push 0x459ee0
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], ebp
mov word [esp + 0x14], cx
call fcn.00401150
push ebp
push ebp
call fcn.00401c36
push 0x455990
push 0x459ee0
call fcn.0040161c
add esp, 0x10
cmp dword [esp + 0x28], 8
jb 0x409095
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 [0x4642b4]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
xor esi, esi
mov dword [0x463fdc], eax
cmp dword [0x4642b4], ebp
jbe 0x40910d
mov edi, dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4090d0
mov ecx, dword [0x4642b8]
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 [0x463fdc]
mov byte [ecx + esi], al
cmp dword [0x4642b4], 0x5ab
jne 0x409104
push ebp
push ebp
push ebp
call edi
inc esi
cmp esi, dword [0x4642b4]
jb 0x4090d0
push str.msimg32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call fcn.00408b60
call fcn.00408df0
call fcn.00408b50
mov ebx, dword [esp + 0x38]
mov edi, dword [sym.imp.KERNEL32.dll_GetAtomNameW]
xor esi, esi
push ebp
push ebp
push ebp
call edi
cmp esi, 0x1a01e
jle 0x409148
cmp ebx, 0xf5bed7
jne 0x409151
inc esi
cmp esi, 0x1ece7a52
jl 0x409133
mov edi, dword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeaps]
mov ebp, 0x1519a5
mov ebx, 0x8e46a6f0
jmp 0x409170
cmp dword [0x4642b4], 0xcc1
jne 0x40917e
call edi
cmp dword [0x4642b4], 0x3dc
mov dword [0x46417c], ebx
jne 0x409196
push 0
push 0
call esi
dec ebp
jne 0x409170
mov ecx, dword [esp + 0x85c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040160d
add esp, 0x854
ret