Function at 0x40bf89
Capabilities:
Accept command line arguments
Allocate or change rwx memory
Check os version
Enumerate gui resources
Execute shellcode via indirect call
Execute shellcode via windows callback function

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff30
push ebx
push ecx
push edx
push edi
mov eax, dword [ebp + 0x20]
mov dword [0x421174], eax
mov eax, dword [ebp + 0x1c]
mov dword [0x421170], eax
mov ecx, dword [eax + 0x10]
mov dword [0x4211cc], ecx
mov eax, dword [ebp + 0x24]
mov dword [0x4211a0], eax
push 4
push 0x1000
push 0x1218
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [0x4211d8], eax
add eax, 0x800
mov dword [0x4211e4], eax
add eax, 0x108
mov dword [0x4211b8], eax
add eax, 0x108
mov ecx, dword [0x421174]
mov dword [ecx + 0x10], eax
add eax, 0x200
mov dword [0x4211e0], eax
add eax, 0x400
mov dword [0x4211dc], eax
push 0x310
push 0x40
call sub.kernel32.dll_GlobalAlloc
mov dword [0x4211e8], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0xd0], 0x9c
lea eax, [ebp - 0xd0]
push eax
call sub.kernel32.dll_GetVersionExA
cmp dword [ebp - 0xc0], 1
jne 0x40c063
cmp dword [ebp - 0xc8], 0
jne 0x40c054
mov dword [0x4211b4], 1
jmp 0x40c241
mov dword [0x4211b4], 2
jmp 0x40c241
push str.msvcrt.dll
call sub.kernel32.dll_LoadLibraryA
or eax, eax
je 0x40c0e5
mov edi, eax
push str._get_winmajor
push edi
call sub.kernel32.dll_GetProcAddress
or eax, eax
je 0x40c0a9
push dword [ebp - 0xcc]
lea ecx, [ebp - 0xcc]
push ecx
call eax
pop eax
pop eax
cmp eax, dword [ebp - 0xcc]
je 0x40c0a9
mov byte [ebp - 0xbc], 0
mov dword [ebp - 4], 1
push str._get_winminor
push edi
call sub.kernel32.dll_GetProcAddress
or eax, eax
je 0x40c0df
push dword [ebp - 0xc8]
lea ecx, [ebp - 0xc8]
push ecx
call eax
pop eax
pop eax
cmp eax, dword [ebp - 0xc8]
je 0x40c0df
mov byte [ebp - 0xbc], 0
mov dword [ebp - 4], 1
push edi
call sub.kernel32.dll_FreeLibrary
cmp dword [ebp - 0xc0], 2
jne 0x40c241
cmp dword [ebp - 0xcc], 5
jge 0x40c10a
mov dword [0x4211b4], 3
jmp 0x40c241
cmp dword [ebp - 0xcc], 6
jle 0x40c137
cmp byte [ebp - 0x36], 1
jne 0x40c128
mov dword [0x4211b4], 0xa
jmp 0x40c241
mov dword [0x4211b4], 0x11
jmp 0x40c241
cmp dword [ebp - 0xcc], 5
jle 0x40c1fc
cmp dword [ebp - 0xc8], 3
jg 0x40c156
cmp dword [ebp - 0xcc], 0xa
jne 0x40c15d
jmp 0x40c113
cmp dword [ebp - 0xc8], 2
jle 0x40c18a
cmp byte [ebp - 0x36], 1
jne 0x40c17b
mov dword [0x4211b4], 9
jmp 0x40c241
mov dword [0x4211b4], 0x10
jmp 0x40c241
cmp dword [ebp - 0xc8], 1
jle 0x40c1b7
cmp byte [ebp - 0x36], 1
jne 0x40c1a8
mov dword [0x4211b4], 8
jmp 0x40c241
mov dword [0x4211b4], 0xf
jmp 0x40c241
cmp dword [ebp - 0xc8], 0
jle 0x40c1de
cmp byte [ebp - 0x36], 1
jne 0x40c1d2
mov dword [0x4211b4], 7
jmp 0x40c241
mov dword [0x4211b4], 0xe
jmp 0x40c241
cmp byte [ebp - 0x36], 1
jne 0x40c1f0
mov dword [0x4211b4], 6
jmp 0x40c1fa
mov dword [0x4211b4], 0xd
jmp 0x40c241
cmp dword [ebp - 0xc8], 0
jne 0x40c211
mov dword [0x4211b4], 4
jmp 0x40c241
test word [ebp - 0x38], 0x8000
je 0x40c225
mov dword [0x4211b4], 0xc
jmp 0x40c241
cmp byte [ebp - 0x36], 1
jne 0x40c237
mov dword [0x4211b4], 5
jmp 0x40c241
mov dword [0x4211b4], 0xb
cmp dword [ebp - 4], 0
je 0x40c262
lea eax, [ebp - 0xbc]
push eax
push str.CSDVersion
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push 0x80000002
call fcn.00414073
cmp dword [ebp + 0x18], 0
je 0x40c27b
cmp dword [0x4211b4], 3
jl 0x40c27b
mov dword [0x42119c], 1
cmp byte [ebp - 0xbc], 0
je 0x40c296
lea eax, [ebp - 0xbc]
push eax
push dword [0x4211b8]
call sub.kernel32.dll_lstrcpyA
push 4
push 0x3000
push 0x800
push 0
call sub.kernel32.dll_VirtualAlloc
mov ecx, dword [0x421170]
mov dword [ecx + 4], eax
add eax, 0x20c
mov dword [ecx + 0x28], eax
add eax, 0x20c
mov dword [ecx + 8], eax
add eax, 0x20c
mov dword [ecx + 0xc], eax
cmp dword [ebp + 0x10], 0
je 0x40c2de
push eax
push dword [ebp + 0x10]
call fcn.00407ffa
mov eax, dword [0x421170]
push dword [eax + 8]
push dword [ebp + 0xc]
call fcn.00407ffa
cmp dword [0x42119c], 0
je 0x40c2f9
call sub.kernel32.dll_GetCommandLineW
jmp 0x40c2fe
call sub.kernel32.dll_GetCommandLineA
mov ebx, eax
mov ax, word [ebx]
cmp dword [0x42119c], 0
jne 0x40c30e
xor ah, ah
cmp ax, 0x22
jne 0x40c333
inc ebx
cmp dword [0x42119c], 0
je 0x40c329
inc ebx
push 0x22
push ebx
call fcn.0041383e
jmp 0x40c368
push 0x22
push ebx
call fcn.00413817
jmp 0x40c368
cmp dword [0x42119c], 0
je 0x40c353
push 0x20
push ebx
call fcn.0041383e
cmp eax, 0xffffffff
jne 0x40c368
push 9
push ebx
call fcn.0041383e
jmp 0x40c368
push 0x20
push ebx
call fcn.00413817
cmp eax, 0xffffffff
jne 0x40c368
push 9
push ebx
call fcn.00413817
cmp eax, 0xffffffff
jne 0x40c374
push ebx
call fcn.0040cc2e
dec eax
inc eax
cmp dword [0x42119c], 0
je 0x40c380
shl eax, 1
add ebx, eax
mov eax, dword [0x421170]
push ebx
push dword [eax + 4]
call fcn.0040cc0c
mov edx, dword [0x421170]
push dword [edx + 4]
call fcn.00415158
push 0x208
push dword [edx + 0x28]
push dword [edx + 0x10]
cmp dword [0x42119c], 0
je 0x40c3b9
call sub.kernel32.dll_GetModuleFileNameW
jmp 0x40c3be
call sub.kernel32.dll_GetModuleFileNameA
mov edx, dword [0x421170]
push 0x5c
push dword [edx + 0x28]
call fcn.0041386b
cmp eax, 0xffffffff
je 0x40c3e6
cmp dword [0x42119c], 0
je 0x40c3de
shl eax, 1
add eax, dword [edx + 0x28]
mov word [eax], 0
mov dword [ebp - 0x34], 4
lea eax, [ebp - 0x34]
push eax
push 2
push 0x800
push dword [edx + 4]
call sub.kernel32.dll_VirtualProtect
push 0x18
push 1
push dword [0x4211cc]
cmp dword [0x42119c], 0
je 0x40c41a
call sub.kernel32.dll_FindResourceW
jmp 0x40c41f
call sub.kernel32.dll_FindResourceA
or eax, eax
je 0x40c42d
mov dword [0x4211f0], 1
push 0
call sub.user32.dll_GetDC
mov ebx, eax
push 0x58
push ebx
call sub.gdi32.dll_GetDeviceCaps
mov ecx, eax
mov eax, 0x5a0
xor edx, edx
div ecx
mov dword [0x421178], eax
push 0x5a
push ebx
call sub.gdi32.dll_GetDeviceCaps
mov ecx, eax
mov eax, 0x5a0
xor edx, edx
div ecx
mov dword [0x42117c], eax
mov eax, ecx
mov ecx, 0x3e8
mul ecx
xor edx, edx
mov ecx, 0x60
idiv ecx
mov ecx, 0x48
mul ecx
xor edx, edx
mov ecx, 0x3e8
idiv ecx
mov dword [0x421180], eax
push ebx
push 0
call sub.user32.dll_ReleaseDC
push 0x400
push 0x40
call sub.kernel32.dll_GlobalAlloc
mov dword [0x4211bc], eax
mov dword [0x4211b0], 0x3fc
push 0x9040
push 0
push 0
push 2
push 0x7f00
push 0
call fcn.0040cb5d
mov dword [0x4211c4], eax
push 0x9040
push 0
push 0
push 2
push 0x7f02
push 0
call fcn.0040cb5d
mov dword [0x4211c8], eax
mov dword [ebp - 0x34], 0x30
mov dword [ebp - 0x30], 8
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0x20
mov edx, dword [0x421170]
push dword [edx + 0x10]
pop dword [ebp - 0x20]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 8], 0
push dword [ebp + 8]
push str.EC2RUNDIALOGBOX
call sub.kernel32.dll_lstrcatW
push dword [ebp + 8]
push str.EC2RUNMDIWINDOW
call sub.kernel32.dll_lstrcatW
push dword [ebp + 8]
push str.EC2RUNMDICHILDWINDOW
call sub.kernel32.dll_lstrcatW
push dword [ebp + 8]
push str.EC2RUNWINDOW
call sub.kernel32.dll_lstrcatW
mov dword [ebp - 0x2c], 0x40f13c
push dword [0x4211dc]
push str.EC2RUNMDIWINDOW
call fcn.00407ffa
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x34]
push eax
call fcn.0040debc
push dword [0x4211dc]
push str.EC2RUNMDICHILDWINDOW
call fcn.00407ffa
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x34]
push eax
call fcn.0040debc
push dword [0x4211dc]
push str.EC2RUNWINDOW
call fcn.00407ffa
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x34]
push eax
call fcn.0040debc
push dword [0x4211dc]
push str.EC2RUNDIALOGBOX
call fcn.00407ffa
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x34]
push eax
call fcn.0040debc
push dword [0x4211dc]
push 0x422108
call fcn.00407ffa
push eax
mov edx, eax
add edx, 2
cmp dword [0x42119c], 0
je 0x40c600
add edx, 2
lea ecx, [ebp - 0x34]
push ecx
push edx
push 0
cmp dword [0x42119c], 0
je 0x40c617
call sub.user32.dll_GetClassInfoExW
jmp 0x40c61c
call sub.user32.dll_GetClassInfoExA
or dword [ebp - 0x30], 8
mov eax, dword [ebp - 0x2c]
mov dword [0x4213b0], eax
mov dword [ebp - 0x2c], 0x40ef36
mov dword [ebp - 0x24], 0x20
pop eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x34]
push eax
call fcn.0040debc
push dword [0x4211dc]
push 0x422120
call fcn.00407ffa
mov edx, eax
lea ecx, [ebp - 0x34]
push ecx
push edx
push 0
cmp dword [0x42119c], 0
je 0x40c66c
call sub.user32.dll_GetClassInfoExW
jmp 0x40c671
call sub.user32.dll_GetClassInfoExA
mov eax, dword [ebp - 0x2c]
mov dword [0x4211d0], eax
mov dword [ebp - 0x34], 0x30
mov dword [ebp - 0x30], 8
mov edx, dword [0x421170]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x2c], 0x40f13c
push dword [0x4211dc]
push str.ECGROUP
call fcn.00407ffa
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
lea eax, [ebp - 0x34]
push eax
call fcn.0040debc
mov dword [ebp - 0x34], 0x30
mov dword [ebp - 0x30], 8
mov edx, dword [0x421170]
push dword [edx + 0x10]
pop dword [ebp - 0x20]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x2c], 0x40f13c
push dword [0x4211dc]
push str.ECPICTURE
call fcn.00407ffa
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x34]
push eax
call fcn.0040debc
cmp dword [ebp + 0x14], 1
jne 0x40c732
lea eax, str.EC2RUNDIALOGBOX
jmp 0x40c746
cmp dword [ebp + 0x14], 2
jne 0x40c740
lea eax, str.EC2RUNMDIWINDOW
jmp 0x40c746
lea eax, str.EC2RUNWINDOW
push dword [0x4211dc]
push eax
call fcn.00407ffa
push dword [0x4211dc]
push 0x411731
call sub.user32.dll_EnumWindows
pop edi
pop edx
pop ecx
pop ebx
leave
ret 0x20