Function at 0x4016b4
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.00401bb8
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 0x4016f4
mov ecx, dword [ebp - 4]
cmp dword [ecx], 0x4550
je 0x4016fb
xor eax, eax
jmp 0x401a6a
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 0x401758
mov edx, dword [ebx]
mov eax, edx
add eax, dword [ebx + 4]
cmp esi, eax
jae 0x401743
mov esi, eax
mov eax, dword [ebp - 4]
cmp edx, dword [eax + 0x88]
jne 0x401754
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 0x401736
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 0x401785
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 0x4017c4
push 0x10
push 0x40a3ff
push str.Error_in_VirtualAlloc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401a6a
mov edx, dword [ebp - 0x20]
push edx
mov ecx, dword [ebp + 8]
push ecx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00403098
add esp, 0xc
xor edi, edi
mov eax, dword [ebp - 8]
lea ebx, [eax + 0xc]
jmp 0x4017ff
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.00403098
add esp, 0xc
inc edi
add ebx, 0x28
mov eax, dword [ebp - 4]
cmp di, word [eax + 6]
jb 0x4017e2
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 [0x40cd28], edi
cmp dword [ebp - 0x24], 0
je 0x401853
call fcn.00401a74
dec eax
jne 0x401853
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 0x40188c
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a420
push str.Error_in_GetImgDirEntryRVA
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401a6a
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 0x4018b9
mov edx, dword [ebp - 0xc]
add edx, edi
mov dword [ebp - 0xc], edx
jmp 0x4018e0
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a43e
push str.Error_in_Get_ImportDesc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401a6a
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x4018f6
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x4019df
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0xc]
add ebx, dword [0x40cd28]
push ebx
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40191a
push ebx
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401947
push 0x10
push 0x40a45c
push str.Cant_Find_required_Dll
push 0
call sub.USER32.DLL_MessageBoxA
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
xor eax, eax
jmp 0x401a6a
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
test eax, eax
je 0x401956
mov ebx, eax
add ebx, edi
jmp 0x40195e
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 0x4019d1
mov eax, 0x80000000
test dword [ebx], eax
je 0x401987
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 0x4019a0
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 0x4019cb
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a479
push str.Error_in_set_FuncAddr.
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401a6a
add esi, 4
add ebx, 4
cmp dword [ebx], 0
jne 0x401968
add dword [ebp - 0xc], 0x14
jmp 0x4018e0
mov edx, dword [ebp - 4]
cmp dword [edx + 0xc0], 0
jbe 0x401a5d
mov ecx, dword [ebp - 4]
mov ebx, dword [ecx + 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 [0x40caa0], eax
mov ecx, dword [ebx]
sub ecx, dword [0x40caa4]
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 [0x40caa0]
push ecx
call fcn.00403074
add esp, 0xc
mov ecx, dword [0x40caa0]
mov eax, dword fs:[0x2c]
mov dword [eax], ecx
mov eax, dword [ebx + 8]
sub eax, dword [0x40caa4]
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 [0x40cd30], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret