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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
cmp dword [ebp + 8], 0
jne 0x4858d9
xor eax, eax
jmp 0x485def
mov eax, dword [ebp + 8]
mov dword [ebp - 0x54], eax
push 0x40
mov ecx, dword [ebp - 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x4858ff
mov edx, dword [ebp - 0x54]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x5a4d
je 0x485906
xor eax, eax
jmp 0x485def
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x54]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x50], edx
push 0xf8
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x485931
mov ecx, dword [ebp - 0x50]
cmp dword [ecx], 0x4550
je 0x485938
xor eax, eax
jmp 0x485def
mov edx, dword [ebp - 0x50]
xor eax, eax
mov ax, word [edx + 0x14]
cmp eax, 0xe0
jne 0x485959
mov ecx, dword [ebp - 0x50]
xor edx, edx
mov dx, word [ecx + 0x18]
cmp edx, 0x10b
je 0x485960
xor eax, eax
jmp 0x485def
mov eax, dword [ebp - 0x50]
xor ecx, ecx
mov cx, word [eax + 6]
cmp ecx, 1
jge 0x485975
xor eax, eax
jmp 0x485def
mov edx, dword [ebp - 0x50]
xor eax, eax
mov ax, word [edx + 0x14]
mov ecx, dword [ebp - 0x50]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 8], edx
mov dword [ebp - 0x60], 0x28
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
xor edx, edx
mov dx, word [ecx + 6]
mov ecx, dword [ebp - 0x60]
imul ecx, edx
add eax, ecx
mov dword [ebp - 0x58], eax
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x40], edx
mov word [ebp - 0x48], 0
jmp 0x4859c3
mov ax, word [ebp - 0x48]
add ax, 1
mov word [ebp - 0x48], ax
mov ecx, dword [ebp - 0x48]
and ecx, 0xffff
mov edx, dword [ebp - 0x50]
xor eax, eax
mov ax, word [edx + 6]
cmp ecx, eax
jae 0x485a2f
mov ecx, dword [ebp - 0x48]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x48]
and edx, 0xffff
imul edx, edx, 0x28
mov eax, dword [ebp - 8]
mov ecx, dword [eax + ecx + 0xc]
mov eax, dword [ebp - 8]
add ecx, dword [eax + edx + 0x10]
cmp dword [ebp - 0x40], ecx
jae 0x485a2d
mov ecx, dword [ebp - 0x48]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x48]
and edx, 0xffff
imul edx, edx, 0x28
mov eax, dword [ebp - 8]
mov ecx, dword [eax + ecx + 0xc]
mov eax, dword [ebp - 8]
add ecx, dword [eax + edx + 0x10]
mov dword [ebp - 0x40], ecx
jmp 0x4859b7
lea ecx, [ebp - 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x40]
xor edx, edx
div dword [ebp - 0x38]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
xor edx, edx
div dword [ebp - 0x38]
test edx, edx
je 0x485a59
mov edx, dword [ebp - 0x44]
add edx, 1
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x44]
imul eax, dword [ebp - 0x38]
mov dword [0x4926c0], eax
push 0x40
push 0x1000
mov ecx, dword [0x4926c0]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x485a8b
xor eax, eax
jmp 0x485def
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0048bbd0
add esp, 0xc
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x5c], 0
mov word [ebp - 0x48], 0
jmp 0x485ac8
mov dx, word [ebp - 0x48]
add dx, 1
mov word [ebp - 0x48], dx
mov eax, dword [ebp - 0x48]
and eax, 0xffff
mov ecx, dword [ebp - 0x50]
xor edx, edx
mov dx, word [ecx + 6]
cmp eax, edx
jge 0x485b38
mov eax, dword [ebp - 0x48]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + eax + 0xc]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x48]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 8]
add edx, dword [ecx + eax + 0x14]
mov dword [ebp - 0x64], edx
mov eax, dword [ebp - 0x48]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + eax + 0x10]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp - 0x64]
push ecx
mov edx, dword [ebp - 0x68]
push edx
call fcn.0048bbd0
add esp, 0xc
jmp 0x485abc
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x54]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x50]
add eax, 0xf8
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x54]
mov dword [0x49461c], ecx
mov edx, dword [ebp - 0x50]
mov eax, dword [edx + 0x80]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x485b88
push 0x8000
push 0
mov ecx, dword [ebp - 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x485def
mov edx, dword [ebp - 0x50]
mov eax, dword [edx + 0x80]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x485ba5
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x54]
mov dword [ebp - 4], ecx
jmp 0x485bbd
push 0x8000
push 0
mov edx, dword [ebp - 0x54]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x485def
mov eax, 1
test eax, eax
je 0x485ce4
mov ecx, dword [ebp - 4]
cmp dword [ecx + 4], 0
jne 0x485be1
mov edx, dword [ebp - 4]
cmp dword [edx + 0xc], 0
jne 0x485be1
jmp 0x485ce4
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xc]
add ecx, dword [0x49461c]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x485c10
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x485c2e
push 0x8000
push 0
mov ecx, dword [ebp - 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x485def
mov edx, dword [ebp - 4]
mov eax, dword [edx]
add eax, dword [ebp - 0x54]
mov dword [ebp - 0x78], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x10]
add edx, dword [ebp - 0x54]
mov dword [ebp - 0x74], edx
mov eax, dword [ebp - 0x78]
cmp dword [eax], 0
je 0x485cd6
mov ecx, dword [ebp - 0x78]
mov edx, dword [ecx]
add edx, dword [ebp - 0x54]
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x7c], 0x80000000
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax]
and ecx, dword [ebp - 0x7c]
test ecx, ecx
je 0x485c8b
mov edx, dword [ebp - 0x78]
mov eax, dword [edx]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x74]
mov dword [edx], eax
jmp 0x485ca1
mov eax, dword [ebp - 0x4c]
add eax, 2
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x74]
mov dword [edx], eax
cmp dword [ebp - 0x74], 0
jne 0x485cbf
push 0x8000
push 0
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x485def
mov ecx, dword [ebp - 0x74]
add ecx, 4
mov dword [ebp - 0x74], ecx
mov edx, dword [ebp - 0x78]
add edx, 4
mov dword [ebp - 0x78], edx
jmp 0x485c45
mov eax, dword [ebp - 4]
add eax, 0x14
mov dword [ebp - 4], eax
jmp 0x485bbd
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 0xa0]
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 0
je 0x485de1
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x54]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
cmp dword [ecx], 0
je 0x485de1
mov edx, dword [ebp - 0x18]
add edx, 8
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
add ecx, dword [eax + 4]
cmp dword [ebp - 0x80], ecx
jae 0x485dd0
mov edx, dword [ebp - 0x80]
xor eax, eax
mov ax, word [edx]
and eax, 0xf000
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0x3000
jne 0x485da7
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x54]
add edx, dword [ecx]
mov eax, dword [ebp - 0x80]
xor ecx, ecx
mov cx, word [eax]
and ecx, 0xfff
add edx, ecx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 0x80]
xor eax, eax
mov ax, word [edx]
and eax, 0xfff
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
add edx, eax
mov eax, dword [0x494604]
mov dword [eax*4 + 0x493664], edx
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x50]
mov eax, dword [ecx]
sub eax, dword [edx + 0x34]
mov ecx, dword [0x494604]
mov dword [ecx*4 + 0x4926c4], eax
mov edx, dword [0x494604]
add edx, 1
mov dword [0x494604], edx
jmp 0x485dc2
cmp dword [ebp - 0x6c], 0
je 0x485dc2
push 0x8000
push 0
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x485def
mov ecx, dword [ebp - 0x80]
add ecx, 2
mov dword [ebp - 0x80], ecx
jmp 0x485d18
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
add eax, dword [edx + 4]
mov dword [ebp - 0x18], eax
jmp 0x485d03
mov ecx, dword [ebp + 0xc]
mov dword [0x494620], ecx
mov eax, 1
mov esp, ebp
pop ebp
ret