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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406afd
add esp, 8
mov edx, dword [ebp + 8]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x68]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x64], ecx
push 0xf8
mov edx, dword [ebp - 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x4045b4
mov eax, dword [ebp - 0x64]
cmp dword [eax], 0x4550
je 0x4045bb
xor eax, eax
jmp 0x404a53
mov ecx, dword [ebp - 0x64]
xor edx, edx
mov dx, word [ecx + 0x14]
mov eax, dword [ebp - 0x64]
lea ecx, [eax + edx + 0x18]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0xc], 0x28
mov edx, dword [ebp - 0x14]
sub edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov cx, word [eax + 6]
mov eax, dword [ebp - 0xc]
imul eax, ecx
add edx, eax
mov dword [ebp - 0x6c], edx
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x10], 0
mov word [ebp - 0x58], 0
jmp 0x404610
mov dx, word [ebp - 0x58]
add dx, 1
mov word [ebp - 0x58], dx
mov eax, dword [ebp - 0x58]
and eax, 0xffff
mov ecx, dword [ebp - 0x64]
xor edx, edx
mov dx, word [ecx + 6]
cmp eax, edx
jae 0x4046a9
mov eax, dword [ebp - 0x58]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x58]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + eax + 0xc]
mov edx, dword [ebp - 0x14]
add eax, dword [edx + ecx + 0x10]
cmp dword [ebp - 0x50], eax
jae 0x40467b
mov eax, dword [ebp - 0x58]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x58]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + eax + 0xc]
mov edx, dword [ebp - 0x14]
add eax, dword [edx + ecx + 0x10]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x58]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x88]
cmp ecx, dword [edx + eax + 0xc]
jne 0x4046a4
mov edx, dword [ebp - 0x58]
and edx, 0xffff
mov dword [ebp - 0x10], edx
jmp 0x404604
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x50]
xor edx, edx
div dword [ebp - 0x48]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x50]
xor edx, edx
div dword [ebp - 0x48]
test edx, edx
je 0x4046d3
mov ecx, dword [ebp - 0x54]
add ecx, 1
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0x54]
imul edx, dword [ebp - 0x48]
mov eax, dword [ebp + 0x14]
mov dword [eax], edx
push 0x40
push 0x1000
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x404718
push 0x10
push 0x401494
push 0x40149c
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x404a53
mov eax, dword [ebp - 0x6c]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.0040c910
add esp, 0xc
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0
mov word [ebp - 0x58], 0
jmp 0x404755
mov ax, word [ebp - 0x58]
add ax, 1
mov word [ebp - 0x58], ax
mov ecx, dword [ebp - 0x58]
and ecx, 0xffff
mov edx, dword [ebp - 0x64]
xor eax, eax
mov ax, word [edx + 6]
cmp ecx, eax
jge 0x4047c9
mov ecx, dword [ebp - 0x58]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
add eax, dword [edx + ecx + 0xc]
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x58]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
add eax, dword [edx + ecx + 0x14]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x58]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + ecx + 0x10]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x60]
push eax
call fcn.0040c910
add esp, 0xc
jmp 0x404749
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x68]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
add ecx, 0xf8
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x68]
mov dword [0x40ffe4], edx
cmp dword [ebp - 0x10], 0
je 0x40483a
call fcn.00404aa9
cmp eax, 1
jne 0x40483a
mov eax, dword [ebp - 0x10]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + eax + 0xc]
add edx, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x14]
mov dword [ecx + eax + 0xc], edx
mov edx, dword [ebp - 0x10]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + edx + 0x14]
add ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x14]
mov dword [eax + edx + 0x14], ecx
mov ecx, dword [ebp - 0x64]
mov edx, dword [ecx + 0x80]
mov dword [ebp - 0x70], edx
cmp dword [ebp - 0x70], 0
jne 0x404878
push 0x8000
push 0
mov eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x10
push 0x4014b4
push 0x4014bc
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x404a53
mov ecx, dword [ebp - 0x64]
mov edx, dword [ecx + 0x28]
mov eax, dword [ebp - 0x64]
add edx, dword [eax + 0x34]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], edx
mov edx, dword [ebp - 0x64]
mov eax, dword [edx + 0x80]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4048a6
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0x68]
mov dword [ebp - 8], ecx
jmp 0x4048d2
push 0x8000
push 0
mov edx, dword [ebp - 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x10
push 0x4014d8
push 0x4014e0
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x404a53
mov eax, 1
test eax, eax
je 0x404a35
mov ecx, dword [ebp - 8]
cmp dword [ecx + 4], 0
jne 0x4048f6
mov edx, dword [ebp - 8]
cmp dword [edx + 0xc], 0
jne 0x4048f6
jmp 0x404a35
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0xc]
add ecx, dword [0x40ffe4]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x404925
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x404957
push 0x10
push 0x4014f8
push 0x401500
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0x8000
push 0
mov ecx, dword [ebp - 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x404a53
mov edx, dword [ebp - 8]
cmp dword [edx], 0
je 0x40496c
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x68]
mov dword [ebp - 0x78], ecx
jmp 0x404978
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x10]
add eax, dword [ebp - 0x68]
mov dword [ebp - 0x78], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x10]
add edx, dword [ebp - 0x68]
mov dword [ebp - 0x74], edx
mov eax, dword [ebp - 0x78]
cmp dword [eax], 0
je 0x404a27
mov dword [ebp - 0x7c], 0x80000000
mov ecx, dword [ebp - 0x78]
mov edx, dword [ecx]
and edx, dword [ebp - 0x7c]
test edx, edx
je 0x4049c0
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x74]
mov dword [ecx], eax
jmp 0x4049e1
mov edx, dword [ebp - 0x78]
mov eax, dword [edx]
add eax, dword [ebp - 0x68]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
add ecx, 2
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x74]
mov dword [ecx], eax
cmp dword [ebp - 0x74], 0
jne 0x404a10
push 0x8000
push 0
mov edx, dword [ebp - 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x10
push 0x401518
push 0x401520
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x404a53
mov eax, dword [ebp - 0x74]
add eax, 4
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x78]
add ecx, 4
mov dword [ebp - 0x78], ecx
jmp 0x404984
mov edx, dword [ebp - 8]
add edx, 0x14
mov dword [ebp - 8], edx
jmp 0x4048d2
mov eax, dword [ebp - 0x68]
push eax
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.00403930
add esp, 8
mov edx, dword [ebp + 0xc]
mov dword [0x40ffdc], edx
mov eax, 1
mov esp, ebp
pop ebp
ret