Function at 0x4022a0
Capabilities:
Allocate or change rwx memory
Check os version
Enumerate pe sections
Execute shellcode via indirect call
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x4022a9
mov eax, dword [ebp - 4]
add esp, 0xfffffb50
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
lea edi, [ebp - 0xa8]
mov dword [ebp - 0x2c], eax
mov esi, 0x490e7a
mov ecx, 8
lea eax, [ebp - 0x23d4]
rep movsd dword es:[edi], dword [esi]
push 0x232c
push 0x4a8a18
push eax
call fcn.00405368
add esp, 0xc
lea edx, [ebp - 0xa8]
lea ecx, [ebp - 0x23d4]
push 0x232c
push edx
push 0x64
push ecx
call fcn.00403994
add esp, 0x10
lea edi, [ebp - 0x23f4]
mov esi, 0x490e9a
mov ecx, 8
lea eax, [ebp - 0x23b6]
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x2414]
mov ecx, 8
mov esi, 0x490eba
lea edx, [ebp - 0x23f4]
rep movsd dword es:[edi], dword [esi]
push 0x20
push eax
push edx
call fcn.00405368
add esp, 0xc
cmp byte [ebp - 0x23c3], 0
je 0x402370
mov ecx, dword [ebp + 0x1c]
push ecx
push 8
push 0x64
lea eax, [ebp - 0x2414]
push eax
lea edx, [ebp - 0x23f4]
push edx
call fcn.00403884
add esp, 0x14
mov ebx, dword [ebp + 0x10]
cmp ebx, 0xfa000
jle 0x402380
mov ebx, 0xfa000
push ebx
lea eax, [ebp - 0x23f4]
push eax
push 0x64
mov edx, dword [ebp + 8]
push edx
call fcn.00403c68
add esp, 0x10
mov eax, dword [ebp + 0x10]
sub eax, ebx
cmp eax, 0x9c4000
jbe 0x4023a7
mov eax, 0x9c4000
test eax, eax
jbe 0x4023c7
push eax
lea edx, [ebp - 0x2414]
push edx
mov cx, word [ebp - 0x23b8]
push ecx
add ebx, dword [ebp - 0x2c]
push ebx
call fcn.00403994
add esp, 0x10
cmp byte [ebp - 0x23c1], 0
cmp byte [ebp - 0x23c2], 0
je 0x40243a
mov eax, dword [ebp - 0x23c8]
mov dword [ebp - 0x30], eax
mov edx, dword [ebp + 0x1c]
push edx
push 0x80
push 0x64
mov ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x30]
push ecx
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x30]
push eax
call fcn.004038d8
add esp, 0x14
cmp byte [ebp - 0x2190], 0xa
jb 0x402413
cmp byte [ebp - 0x2190], 0x20
jb 0x402425
cmp byte [ebp - 0x2190], 0x28
je 0x402425
cmp byte [ebp - 0x2190], 0x8c
jne 0x40243a
mov edx, dword [ebp + 0x1c]
push edx
push 0x20
mov ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x30]
push ecx
call fcn.0040392c
add esp, 0xc
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x3c]
add eax, edi
mov dword [ebp - 4], eax
push 0xf8
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.DLL_IsBadReadPtr
dec eax
je 0x402461
mov ecx, dword [ebp - 4]
cmp dword [ecx], 0x4550
je 0x402468
xor eax, eax
jmp 0x4029b7
mov edx, dword [ebp - 4]
movzx ecx, word [edx + 0x14]
add ecx, dword [ebp - 4]
add ecx, 0x18
mov dword [ebp - 8], ecx
mov dword [ebp - 0x34], 0x28
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
sub eax, edi
movzx ecx, word [edx + 6]
imul ecx, dword [ebp - 0x34]
add eax, ecx
xor edx, edx
mov dword [ebp - 0x28], eax
xor esi, esi
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 8]
lea ebx, [eax + 0xc]
jmp 0x4024cd
mov edx, dword [ebx]
mov eax, edx
add eax, dword [ebx + 4]
cmp eax, dword [ebp - 0x24]
jbe 0x4024b8
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 4]
cmp edx, dword [ecx + 0x88]
jne 0x4024c9
movzx eax, si
mov dword [ebp - 0x38], eax
inc esi
add ebx, 0x28
mov ecx, dword [ebp - 4]
movzx edx, si
movzx eax, word [ecx + 6]
cmp edx, eax
jb 0x4024a9
lea edx, [ebp - 0x88]
push edx
call sub.KERNEL32.DLL_GetSystemInfo
mov eax, dword [ebp - 0x24]
xor edx, edx
div dword [ebp - 0x84]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
xor edx, edx
div dword [ebp - 0x84]
test edx, edx
je 0x402507
inc dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp + 0x14]
imul ecx, dword [ebp - 0x84]
mov dword [eax], ecx
push 0x40
push 0x1000
mov edx, dword [ebp + 0x14]
mov ecx, dword [edx]
push ecx
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x40254d
push 0x10
push 0x491104
push str.Error_in_VirtualAlloc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x4029b7
mov edx, dword [ebp - 0x28]
push edx
mov ecx, dword [ebp + 8]
push ecx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0040538c
add esp, 0xc
xor esi, esi
mov eax, dword [ebp - 8]
lea ebx, [eax + 0xc]
jmp 0x4025e1
mov eax, dword [ebp + 0xc]
add eax, dword [ebx]
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp + 8]
add edx, dword [ebx + 8]
mov dword [ebp - 0x40], edx
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x44], ecx
mov eax, dword [ebp - 0x44]
push eax
mov edx, dword [ebp - 0x40]
push edx
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.0040538c
add esp, 0xc
mov eax, dword [ebp - 0x44]
push eax
lea edx, [ebp - 0x23b6]
push edx
mov cx, word [ebp - 0x23b8]
push ecx
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00403994
add esp, 0x10
cmp byte [ebp - 0x23d1], 0
je 0x4025dd
mov edx, dword [ebp - 0x44]
lea ecx, [ebp - 0x23b6]
push edx
push ecx
mov ax, word [ebp - 0x23b8]
push eax
mov edx, dword [ebp - 0x40]
push edx
call fcn.00403994
add esp, 0x10
inc esi
add ebx, 0x28
mov ecx, dword [ebp - 4]
cmp si, word [ecx + 6]
jb 0x40256b
cmp byte [ebp - 0x23d1], 0
je 0x402640
mov eax, dword [ebp - 0x23cc]
push eax
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.004029dc
add esp, 0xc
test eax, eax
jne 0x402635
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x491117
push str.Error_in_CCF
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x4029b7
push 0x4a8a18
call dword [0x4a87e0]
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 0x3c]
add eax, edi
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
add edx, 0xf8
mov dword [ebp - 8], edx
mov dword [0x4a89fc], edi
cmp dword [ebp - 0x38], 0
je 0x40268b
call fcn.00402a04
dec eax
jne 0x40268b
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 8]
add dword [eax + ecx*8 + 0xc], edx
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 8]
add dword [eax + ecx*8 + 0x14], edx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x80]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
jne 0x4026c4
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x491138
push str.Error_in_GetImgDirEntryRVA
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x4029b7
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov ecx, dword [edx + 0x28]
mov edx, dword [ebp + 0x18]
add ecx, dword [eax + 0x34]
mov dword [edx], ecx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x80]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4026f1
mov edx, dword [ebp - 0xc]
add edx, edi
mov dword [ebp - 0xc], edx
jmp 0x402718
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x491156
push str.Error_in_Get_ImportDesc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x4029b7
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x40272e
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x4028ad
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0xc]
add ebx, dword [0x4a89fc]
push ebx
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x402752
push ebx
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4028a4
cmp byte [ebp - 0x23d1], 0
je 0x402815
push 0x49115c
push ebx
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x402815
mov dword [ebp - 0x24a8], 0x94
lea eax, [ebp - 0x24a8]
push eax
call sub.KERNEL32.DLL_GetVersionExA
cmp dword [ebp - 0x2498], 1
je 0x402815
push str.psapi.dll
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x40280c
push str.GetModuleInformation
mov edx, dword [ebp - 0x4c]
push edx
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x4a87d0], eax
push 0xc
lea ecx, [ebp - 0x24b4]
push ecx
mov eax, dword [ebp - 0x1c]
push eax
call sub.KERNEL32.DLL_GetCurrentProcess
push eax
call dword [0x4a87d0]
test eax, eax
je 0x40280c
lea edx, [ebp - 0x50]
push edx
push 0x40
mov ecx, dword [ebp - 0x24b0]
push ecx
mov eax, dword [ebp - 0x24b4]
push eax
call sub.KERNEL32.DLL_VirtualProtect
test eax, eax
je 0x40280c
mov dl, byte [ebp - 0x23d0]
push edx
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [0x4a87f8]
mov eax, dword [ebp - 0x4c]
push eax
call sub.KERNEL32.DLL_FreeLibrary
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
test eax, eax
je 0x402824
mov ebx, eax
add ebx, edi
jmp 0x40282c
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0x10]
add ebx, edi
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 0x10]
add esi, edi
jmp 0x40289f
mov eax, 0x80000000
test dword [ebx], eax
je 0x402855
mov edx, dword [ebx]
and edx, 0xffff
push edx
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.KERNEL32.DLL_GetProcAddress
mov dword [esi], eax
jmp 0x40286e
mov eax, dword [ebx]
add eax, edi
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
add edx, 2
push edx
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.KERNEL32.DLL_GetProcAddress
mov dword [esi], eax
test esi, esi
jne 0x402899
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x49119f
push str.Error_in_set_FuncAddr.
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x4029b7
add esi, 4
add ebx, 4
cmp dword [ebx], 0
jne 0x402836
add dword [ebp - 0xc], 0x14
jmp 0x402718
push edi
mov edx, dword [ebp - 4]
push edx
call fcn.00401224
add esp, 8
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0xc0], 0
jbe 0x40294b
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc0]
add edx, edi
mov dword [ebp - 0x54], edx
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x54]
mov eax, dword [ecx + 4]
sub eax, dword [edx]
mov dword [ebp - 0x58], eax
push 4
push 0x1000
mov ecx, dword [ebp - 0x58]
push ecx
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [0x4a87c8], eax
mov eax, dword [ebp - 0x54]
mov edx, dword [eax]
sub edx, dword [0x4a87cc]
add edx, edi
mov dword [ebp - 0x5c], edx
mov ecx, dword [ebp - 0x58]
push ecx
mov eax, dword [ebp - 0x5c]
push eax
mov edx, dword [0x4a87c8]
push edx
call fcn.00405368
add esp, 0xc
mov ecx, dword [0x4a87c8]
mov eax, dword fs:[0x2c]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx + 8]
sub eax, dword [0x4a87cc]
add eax, edi
mov dword [ebp - 0x60], eax
mov edx, dword [ebp - 0x60]
xor ecx, ecx
mov dword [edx], ecx
cmp byte [ebp - 0x23c0], 0
je 0x40297a
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x80]
add edx, edi
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x84]
push eax
push 0
mov edx, dword [ebp - 0xc]
push edx
call fcn.004053d8
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0xa0]
add eax, edi
mov dword [ebp - 0x14], eax
cmp byte [ebp - 0x23bf], 0
je 0x4029a9
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0xa4]
push ecx
push 0
mov eax, dword [ebp - 0x14]
push eax
call fcn.004053d8
add esp, 0xc
mov edx, dword [ebp + 0xc]
mov eax, 1
mov dword [0x4a8a04], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret