Function at 0x401aec
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff74
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.00402130
add esp, 8
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x3c]
add ecx, dword [ebp - 4]
mov dword [ebp - 8], ecx
push 0xf8
push dword [ebp - 8]
call sub.KERNEL32.DLL_IsBadReadPtr
dec eax
je 0x401b30
mov eax, dword [ebp - 8]
cmp dword [eax], 0x4550
je 0x401b37
xor eax, eax
jmp 0x401f83
mov edx, dword [ebp - 8]
movzx ecx, word [edx + 0x14]
add ecx, dword [ebp - 8]
add ecx, 0x18
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x38], 0x28
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
movzx ecx, word [edx + 6]
imul ecx, dword [ebp - 0x38]
add eax, ecx
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
xor edx, edx
mov dword [ebp - 0x3c], edx
mov word [ebp - 0x22], 0
jmp 0x401bdb
movzx ecx, word [ebp - 0x22]
lea eax, [ecx + ecx*4]
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + eax*8 + 0xc]
movzx eax, word [ebp - 0x22]
lea edx, [eax + eax*4]
mov eax, dword [ebp - 0xc]
add ecx, dword [eax + edx*8 + 0x10]
cmp ecx, dword [ebp - 0x2c]
jbe 0x401bb7
movzx edx, word [ebp - 0x22]
lea ecx, [edx + edx*4]
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + ecx*8 + 0xc]
movzx ecx, word [ebp - 0x22]
lea eax, [ecx + ecx*4]
mov ecx, dword [ebp - 0xc]
add edx, dword [ecx + eax*8 + 0x10]
mov dword [ebp - 0x2c], edx
movzx edx, word [ebp - 0x22]
lea eax, [edx + edx*4]
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + eax*8 + 0xc]
mov eax, dword [ebp - 8]
cmp ecx, dword [eax + 0x88]
jne 0x401bd7
movzx edx, word [ebp - 0x22]
mov dword [ebp - 0x3c], edx
inc word [ebp - 0x22]
movzx ecx, word [ebp - 0x22]
mov eax, dword [ebp - 8]
movzx edx, word [eax + 6]
cmp ecx, edx
jb 0x401b77
lea ecx, [ebp - 0x8c]
push ecx
call sub.KERNEL32.DLL_GetSystemInfo
mov eax, dword [ebp - 0x2c]
xor edx, edx
div dword [ebp - 0x88]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x2c]
xor edx, edx
div dword [ebp - 0x88]
test edx, edx
je 0x401c16
inc dword [ebp - 0x28]
mov ecx, dword [ebp - 0x28]
imul ecx, dword [ebp - 0x88]
mov eax, dword [ebp + 0x14]
mov dword [eax], ecx
push 0x40
push 0x1000
mov edx, dword [ebp + 0x14]
push dword [edx]
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x401c5b
push 0x10
push 0x40a219
push str.Error_in_VirtualAlloc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401f83
push dword [ebp - 0x30]
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00403620
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x40], edx
xor ecx, ecx
mov dword [ebp - 0x44], ecx
xor eax, eax
mov dword [ebp - 0x48], eax
mov word [ebp - 0x22], 0
jmp 0x401cd1
movzx edx, word [ebp - 0x22]
lea ecx, [edx + edx*4]
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + ecx*8 + 0xc]
add edx, dword [ebp + 0xc]
mov dword [ebp - 0x40], edx
movzx ecx, word [ebp - 0x22]
lea eax, [ecx + ecx*4]
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + eax*8 + 0x14]
add ecx, dword [ebp + 8]
mov dword [ebp - 0x44], ecx
movzx eax, word [ebp - 0x22]
lea edx, [eax + eax*4]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + edx*8 + 0x10]
mov dword [ebp - 0x48], eax
push dword [ebp - 0x48]
push dword [ebp - 0x44]
push dword [ebp - 0x40]
call fcn.00403620
add esp, 0xc
inc word [ebp - 0x22]
mov edx, dword [ebp - 8]
mov cx, word [edx + 6]
cmp cx, word [ebp - 0x22]
ja 0x401c83
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x3c]
add ecx, dword [ebp - 4]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
add eax, 0xf8
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 4]
mov dword [0x40caf8], edx
cmp dword [ebp - 0x3c], 0
je 0x401d32
call fcn.00401f88
dec eax
jne 0x401d32
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add dword [eax + ecx*8 + 0xc], edx
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add dword [eax + ecx*8 + 0x14], edx
mov ecx, dword [ebp - 8]
mov eax, dword [ecx + 0x80]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x401d6d
push 0x8000
push 0
push dword [ebp - 4]
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a23a
push str.Error_in_GetImgDirEntryRVA
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401f83
mov edx, dword [ebp - 8]
mov ecx, dword [edx + 0x28]
mov eax, dword [ebp - 8]
add ecx, dword [eax + 0x34]
mov edx, dword [ebp + 0x18]
mov dword [edx], ecx
mov ecx, dword [ebp - 8]
mov eax, dword [ecx + 0x80]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x401d9b
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 4]
mov dword [ebp - 0x10], edx
jmp 0x401dc4
push 0x8000
push 0
push dword [ebp - 4]
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a258
push str.Error_in_Get_ImportDesc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401f83
mov edx, dword [ebp - 0x10]
cmp dword [edx + 4], 0
jne 0x401dda
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0xc], 0
je 0x401ed7
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0xc]
add edx, dword [0x40caf8]
mov dword [ebp - 0x34], edx
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x401e05
push dword [ebp - 0x34]
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x401ece
mov ecx, dword [ebp - 0x10]
cmp dword [ecx], 0
je 0x401e24
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
add edx, dword [ebp - 4]
mov dword [ebp - 0x54], edx
jmp 0x401e30
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 0x10]
add eax, dword [ebp - 4]
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x10]
add ecx, dword [ebp - 4]
mov dword [ebp - 0x50], ecx
jmp 0x401ec2
mov dword [ebp - 0x58], 0x80000000
mov eax, dword [ebp - 0x54]
mov edx, dword [eax]
and edx, dword [ebp - 0x58]
je 0x401e6c
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx]
and eax, 0xffff
push eax
push dword [ebp - 0x20]
call sub.KERNEL32.DLL_GetProcAddress
mov edx, dword [ebp - 0x50]
mov dword [edx], eax
jmp 0x401e8b
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx]
add eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
add edx, 2
push edx
push dword [ebp - 0x20]
call sub.KERNEL32.DLL_GetProcAddress
mov ecx, dword [ebp - 0x50]
mov dword [ecx], eax
cmp dword [ebp - 0x50], 0
jne 0x401eba
push 0x8000
push 0
push dword [ebp - 4]
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a275
push str.Error_in_set_FuncAddr.
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401f83
add dword [ebp - 0x50], 4
add dword [ebp - 0x54], 4
mov edx, dword [ebp - 0x54]
cmp dword [edx], 0
jne 0x401e41
add dword [ebp - 0x10], 0x14
jmp 0x401dc4
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040120c
add esp, 8
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0xc0], 0
jbe 0x401f75
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0xc0]
add edx, dword [ebp - 4]
mov dword [ebp - 0x5c], edx
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ecx + 4]
mov edx, dword [ebp - 0x5c]
sub eax, dword [edx]
mov dword [ebp - 0x60], eax
push 4
push 0x1000
push dword [ebp - 0x60]
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [0x40c868], eax
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ecx]
sub eax, dword [0x40c86c]
add eax, dword [ebp - 4]
mov dword [ebp - 0x64], eax
push dword [ebp - 0x60]
push dword [ebp - 0x64]
push dword [0x40c868]
call fcn.004035fc
add esp, 0xc
mov ecx, dword [0x40c868]
mov eax, dword fs:[0x2c]
mov dword [eax], ecx
mov edx, dword [ebp - 0x5c]
mov ecx, dword [edx + 8]
sub ecx, dword [0x40c86c]
add ecx, dword [ebp - 4]
mov dword [ebp - 0x68], ecx
mov eax, dword [ebp - 0x68]
xor edx, edx
mov dword [eax], edx
mov ecx, dword [ebp + 0xc]
mov dword [0x40cb00], ecx
mov eax, 1
mov esp, ebp
pop ebp
ret