Function at 0x415a40
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call
Get system information on windows
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
cmp dword [ebp + 8], 0
jne 0x415a59
mov eax, 1
jmp 0x415fc9
mov eax, dword [ebp + 8]
mov dword [ebp - 0x78], eax
push 0x40
mov ecx, dword [ebp - 0x78]
push ecx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x415a7d
mov edx, dword [ebp - 0x78]
movzx eax, word [edx]
cmp eax, 0x5a4d
je 0x415a87
mov eax, 2
jmp 0x415fc9
mov ecx, dword [ebp - 0x78]
mov edx, dword [ebp - 0x78]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x1c], edx
push 0xf8
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x415ab2
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx], 0x4550
je 0x415abc
mov eax, 3
jmp 0x415fc9
mov edx, dword [ebp - 0x1c]
movzx eax, word [edx + 0x14]
cmp eax, 0xe0
jne 0x415ad9
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + 0x18]
cmp edx, 0x10b
je 0x415ae3
mov eax, 4
jmp 0x415fc9
mov eax, dword [ebp - 0x1c]
movzx ecx, word [eax + 6]
cmp ecx, 1
jge 0x415af9
mov eax, 5
jmp 0x415fc9
mov edx, dword [ebp - 0x1c]
movzx eax, word [edx + 0x14]
mov ecx, dword [ebp - 0x1c]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x7c], edx
mov dword [ebp - 4], 0x28
mov eax, dword [ebp - 0x7c]
sub eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + 6]
imul edx, dword [ebp - 4]
add eax, edx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x34], 0
xor ecx, ecx
mov word [ebp - 0x18], cx
jmp 0x415b48
mov dx, word [ebp - 0x18]
add dx, 1
mov word [ebp - 0x18], dx
movzx eax, word [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + 6]
cmp eax, edx
jae 0x415bb9
movzx eax, word [ebp - 0x18]
imul eax, eax, 0x28
movzx ecx, word [ebp - 0x18]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx + eax + 0xc]
mov edx, dword [ebp - 0x7c]
add eax, dword [edx + ecx + 0x10]
cmp dword [ebp - 0x10], eax
jae 0x415b97
movzx eax, word [ebp - 0x18]
imul eax, eax, 0x28
movzx ecx, word [ebp - 0x18]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx + eax + 0xc]
mov edx, dword [ebp - 0x7c]
add eax, dword [edx + ecx + 0x10]
mov dword [ebp - 0x10], eax
movzx eax, word [ebp - 0x18]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x7c]
mov ecx, dword [ecx + 0x88]
cmp ecx, dword [edx + eax + 0xc]
jne 0x415bb7
movzx edx, word [ebp - 0x18]
mov dword [ebp - 0x34], edx
jmp 0x415b3c
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x10]
xor edx, edx
div dword [ebp - 0x68]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x10]
xor edx, edx
div dword [ebp - 0x68]
test edx, edx
je 0x415be3
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
imul edx, dword [ebp - 0x68]
mov dword [ebp - 0x48], edx
push 0x40
push 0x1000
mov eax, dword [ebp - 0x48]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x415c13
mov eax, 6
jmp 0x415fc9
mov ecx, dword [ebp - 0x40]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0041cec0
add esp, 0xc
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x14], 0
xor ecx, ecx
mov word [ebp - 0x18], cx
jmp 0x415c50
mov dx, word [ebp - 0x18]
add dx, 1
mov word [ebp - 0x18], dx
movzx eax, word [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + 6]
cmp eax, edx
jge 0x415cae
movzx eax, word [ebp - 0x18]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + eax + 0xc]
mov dword [ebp - 0x24], edx
movzx eax, word [ebp - 0x18]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ebp + 8]
add edx, dword [ecx + eax + 0x14]
mov dword [ebp - 0x3c], edx
movzx eax, word [ebp - 0x18]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx + eax + 0x10]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call fcn.0041cec0
add esp, 0xc
jmp 0x415c44
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x78], eax
mov ecx, dword [ebp - 0x78]
mov edx, dword [ebp - 0x78]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
add eax, 0xf8
mov dword [ebp - 0x7c], eax
mov ecx, dword [ebp - 0x78]
mov dword [0x59fdc0], ecx
cmp dword [ebp - 0x34], 0
je 0x415d1e
call fcn.00415a10
cmp eax, 1
jne 0x415d1e
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax + edx + 0xc]
add ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x7c]
mov dword [eax + edx + 0xc], ecx
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx + ecx + 0x14]
add eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x7c]
mov dword [edx + ecx + 0x14], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x80]
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 0
jne 0x415d4b
push 0x8000
push 0
mov edx, dword [ebp - 0x78]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 7
jmp 0x415fc9
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x80]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x415d68
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x78]
mov dword [ebp - 8], edx
jmp 0x415d83
push 0x8000
push 0
mov eax, dword [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 8
jmp 0x415fc9
mov ecx, 1
test ecx, ecx
je 0x415ec2
mov edx, dword [ebp - 8]
cmp dword [edx + 4], 0
jne 0x415da7
mov eax, dword [ebp - 8]
cmp dword [eax + 0xc], 0
jne 0x415da7
jmp 0x415ec2
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xc]
add edx, dword [0x59fdc0]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
push eax
push 0
call fcn.0040ea20
add esp, 8
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x415dd7
jmp 0x415eb4
mov ecx, dword [ebp - 8]
cmp dword [ecx], 0
je 0x415def
mov edx, dword [ebp - 8]
mov eax, dword [edx]
add eax, dword [ebp - 0x78]
mov dword [ebp - 0x84], eax
jmp 0x415dfe
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x10]
add edx, dword [ebp - 0x78]
mov dword [ebp - 0x84], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x10]
add ecx, dword [ebp - 0x78]
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x84]
cmp dword [edx], 0
je 0x415eb4
mov dword [ebp - 0x88], 0x80000000
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax]
and ecx, dword [ebp - 0x88]
je 0x415e52
mov edx, dword [ebp - 0x84]
mov eax, dword [edx]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x80]
mov dword [edx], eax
jmp 0x415e76
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x78]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
add edx, 2
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x80]
mov dword [ecx], eax
cmp dword [ebp - 0x80], 0
jne 0x415e97
push 0x8000
push 0
mov edx, dword [ebp - 0x78]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xa
jmp 0x415fc9
mov eax, dword [ebp - 0x80]
add eax, 4
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x84]
add ecx, 4
mov dword [ebp - 0x84], ecx
jmp 0x415e0a
mov edx, dword [ebp - 8]
add edx, 0x14
mov dword [ebp - 8], edx
jmp 0x415d83
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0xa0]
mov dword [ebp - 0x38], ecx
cmp dword [ebp - 0x38], 0
je 0x415f98
mov edx, dword [ebp - 0x38]
add edx, dword [ebp - 0x78]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
cmp dword [eax], 0
je 0x415f98
mov ecx, dword [ebp - 0x38]
add ecx, 8
mov dword [ebp - 0x8c], ecx
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x38]
add eax, dword [edx + 4]
cmp dword [ebp - 0x8c], eax
jae 0x415f87
mov ecx, dword [ebp - 0x8c]
movzx edx, word [ecx]
and edx, 0xf000
mov dword [ebp - 0x44], edx
cmp dword [ebp - 0x44], 0x3000
jne 0x415f55
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x78]
add ecx, dword [eax]
mov edx, dword [ebp - 0x8c]
movzx eax, word [edx]
and eax, 0xfff
add ecx, eax
mov dword [ebp - 0x74], ecx
mov ecx, dword [ebp - 0x74]
mov edx, dword [ebp - 0x78]
add edx, dword [ecx]
mov eax, dword [ebp - 0x1c]
sub edx, dword [eax + 0x34]
mov ecx, dword [ebp - 0x74]
mov dword [ecx], edx
jmp 0x415f73
cmp dword [ebp - 0x44], 0
je 0x415f73
push 0x8000
push 0
mov edx, dword [ebp - 0x78]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xa
jmp 0x415fc9
mov eax, dword [ebp - 0x8c]
add eax, 2
mov dword [ebp - 0x8c], eax
jmp 0x415ef9
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x38]
add edx, dword [ecx + 4]
mov dword [ebp - 0x38], edx
jmp 0x415ee1
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x28]
add ecx, dword [ebp - 0x78]
mov dword [0x59fdac], ecx
mov dword [ebp - 0x70], 0
mov edx, dword [ebp - 0x70]
push edx
push 1
mov eax, dword [ebp - 0x78]
push eax
call dword [0x59fdac]
mov ecx, dword [ebp + 0xc]
mov dword [0x59fdbc], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret