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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov eax, dword [ebp + 0x10]
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.00401bfc
add esp, 8
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 0x4017b4
mov ecx, dword [ebp - 4]
cmp dword [ecx], 0x4550
je 0x4017bb
xor eax, eax
jmp 0x401b14
mov edx, dword [ebp - 4]
mov eax, 0x28
movzx ecx, word [edx + 0x14]
add ecx, dword [ebp - 4]
add ecx, 0x18
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
sub edx, edi
movzx ecx, word [ecx + 6]
imul ecx, eax
add edx, ecx
xor eax, eax
mov dword [ebp - 0x20], edx
xor edi, edi
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 8]
lea ebx, [eax + 0xc]
jmp 0x401818
mov edx, dword [ebx]
mov eax, edx
add eax, dword [ebx + 4]
cmp esi, eax
jae 0x401803
mov esi, eax
mov eax, dword [ebp - 4]
cmp edx, dword [eax + 0x88]
jne 0x401814
movzx edx, di
mov dword [ebp - 0x24], edx
inc edi
add ebx, 0x28
mov eax, dword [ebp - 4]
movzx ecx, di
movzx edx, word [eax + 6]
cmp ecx, edx
jb 0x4017f6
lea ecx, [ebp - 0x58]
push ecx
call sub.KERNEL32.DLL_GetSystemInfo
mov eax, esi
mov ecx, dword [ebp - 0x54]
xor edx, edx
div ecx
mov ebx, eax
mov eax, esi
xor edx, edx
div ecx
test edx, edx
je 0x401845
inc ebx
imul ebx, ecx
mov ecx, dword [ebp + 0x14]
mov dword [ecx], ebx
push 0x40
push 0x1000
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
push edx
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x401884
push 0x10
push 0x40a202
push str.Error_in_VirtualAlloc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401b14
mov edx, dword [ebp - 0x20]
push edx
mov ecx, dword [ebp + 8]
push ecx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004033b4
add esp, 0xc
xor edi, edi
mov eax, dword [ebp - 8]
lea ebx, [eax + 0xc]
jmp 0x4018bf
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
add eax, dword [ebx]
add edx, dword [ebx + 8]
mov esi, dword [ebx + 4]
push esi
push edx
push eax
call fcn.004033b4
add esp, 0xc
inc edi
add ebx, 0x28
mov eax, dword [ebp - 4]
cmp di, word [eax + 6]
jb 0x4018a2
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 [0x40f160], edi
cmp dword [ebp - 0x24], 0
je 0x401913
call fcn.00401ef0
dec eax
jne 0x401913
mov ecx, dword [ebp - 0x24]
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 - 0x24]
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 - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x40194c
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a223
push str.Error_in_GetImgDirEntryRVA
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401b14
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 0x401979
mov edx, dword [ebp - 0xc]
add edx, edi
mov dword [ebp - 0xc], edx
jmp 0x4019a0
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a241
push str.Error_in_Get_ImportDesc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401b14
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x4019b6
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x401a7c
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0xc]
add ebx, dword [0x40f160]
push ebx
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4019da
push ebx
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x401a73
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
test eax, eax
je 0x4019f3
mov ebx, eax
add ebx, edi
jmp 0x4019fb
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 0x401a6e
mov eax, 0x80000000
test dword [ebx], eax
je 0x401a24
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 0x401a3d
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 0x401a68
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a25e
push str.Error_in_set_FuncAddr.
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401b14
add esi, 4
add ebx, 4
cmp dword [ebx], 0
jne 0x401a05
add dword [ebp - 0xc], 0x14
jmp 0x4019a0
push edi
mov edx, dword [ebp - 4]
push edx
call fcn.0040120c
add esp, 8
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0xc0], 0
jbe 0x401b07
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0xc0]
add ebx, edi
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
mov dword [ebp - 0x2c], eax
push 4
push 0x1000
mov edx, dword [ebp - 0x2c]
push edx
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [0x40c8bc], eax
mov ecx, dword [ebx]
sub ecx, dword [0x40c8c0]
add ecx, edi
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x2c]
push eax
mov edx, dword [ebp - 0x30]
push edx
mov ecx, dword [0x40c8bc]
push ecx
call fcn.00403390
add esp, 0xc
mov ecx, dword [0x40c8bc]
mov eax, dword fs:[0x2c]
mov dword [eax], ecx
mov eax, dword [ebx + 8]
sub eax, dword [0x40c8c0]
add eax, edi
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
xor ecx, ecx
mov dword [edx], ecx
mov eax, dword [ebp + 0xc]
mov dword [0x40cac8], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret