Function at 0x501c68
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.005021a4
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 0x501ca8
mov ecx, dword [ebp - 4]
cmp dword [ecx], 0x4550
je 0x501caf
xor eax, eax
jmp 0x50202f
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
xor edi, edi
movzx ecx, word [ecx + 6]
imul ecx, eax
add edx, ecx
xor eax, eax
mov dword [ebp - 0x20], edx
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 8]
add ebx, 0xc
jmp 0x501d0e
mov edx, ebx
mov edx, dword [edx]
mov eax, edx
add eax, dword [ebx + 4]
cmp esi, eax
jae 0x501cf9
mov esi, eax
mov eax, dword [ebp - 4]
cmp edx, dword [eax + 0x88]
jne 0x501d0a
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 0x501cea
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 0x501d3b
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 0x501d7a
push 0x10
push 0x53b2a3
push str.Error_in_VirtualAlloc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x50202f
mov edx, dword [ebp - 0x20]
push edx
mov ecx, dword [ebp + 8]
push ecx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0052e5a5
add esp, 0xc
xor edi, edi
mov ebx, dword [ebp - 8]
add ebx, 0xc
jmp 0x501db7
mov eax, dword [ebp + 0xc]
mov esi, ebx
add eax, dword [ebx]
mov edx, dword [ebp + 8]
add edx, dword [ebx + 8]
mov esi, dword [esi + 4]
push esi
push edx
push eax
call fcn.0052e5a5
add esp, 0xc
inc edi
add ebx, 0x28
mov eax, dword [ebp - 4]
cmp di, word [eax + 6]
jb 0x501d98
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 [0x542918], edi
cmp dword [ebp - 0x24], 0
je 0x501e0b
call fcn.00502038
dec eax
jne 0x501e0b
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 0x501e44
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x53b2c4
push str.Error_in_GetImgDirEntryRVA
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x50202f
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 0x501e71
mov edx, dword [ebp - 0xc]
add edx, edi
mov dword [ebp - 0xc], edx
jmp 0x501e98
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x53b2e2
push str.Error_in_Get_ImportDesc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x50202f
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x501eae
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x501f97
mov ebx, dword [ebp - 0xc]
mov ebx, dword [ebx + 0xc]
add ebx, dword [0x542918]
push ebx
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x501ed2
push ebx
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x501eff
push 0x10
push 0x53b300
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 0x50202f
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
test eax, eax
je 0x501f0e
mov ebx, eax
add ebx, edi
jmp 0x501f16
mov ebx, dword [ebp - 0xc]
mov ebx, dword [ebx + 0x10]
add ebx, edi
mov esi, dword [ebp - 0xc]
mov esi, dword [esi + 0x10]
add esi, edi
jmp 0x501f89
mov eax, SysReAllocStringLen
test dword [ebx], eax
je 0x501f3f
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 0x501f58
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 0x501f83
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x53b31d
push str.Error_in_set_FuncAddr.
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x50202f
add esi, 4
add ebx, 4
cmp dword [ebx], 0
jne 0x501f20
add dword [ebp - 0xc], 0x14
jmp 0x501e98
push edi
mov edx, dword [ebp - 4]
push edx
call fcn.00501474
add esp, 8
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0xc0], 0
jbe 0x502022
mov ebx, dword [ebp - 4]
mov ebx, dword [ebx + 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 [0x54268c], eax
mov ecx, dword [ebx]
sub ecx, dword [0x542690]
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 [0x54268c]
push ecx
call fcn.0052e470
add esp, 0xc
mov ecx, dword [0x54268c]
mov eax, dword fs:[0x2c]
mov dword [eax], ecx
mov eax, dword [ebx + 8]
sub eax, dword [0x542690]
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 [0x542920], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret