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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x16c
mov eax, dword [0x61de38]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
push eax
mov dword [ebp - 0x11c], ecx
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x148], ebx
mov dword [ebp - 0x114], 0
call dword [sym.imp.KERNEL32.dll_IsBadCodePtr]
test eax, eax
jne 0x418b15
mov esi, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push 0x40
push ebx
call esi
test eax, eax
jne 0x418b15
mov eax, 0x5a4d
cmp word [ebx], ax
jne 0x418b15
mov eax, dword [ebx + 0x3c]
add eax, ebx
push 0xf8
push eax
mov dword [ebp - 0x128], eax
call esi
test eax, eax
jne 0x418b15
mov eax, dword [ebp - 0x128]
cmp dword [eax], 0x4550
jne 0x418b15
mov esi, dword [eax + 0x80]
add esi, ebx
cmp esi, eax
je 0x418b15
push 0x104
lea eax, [ebp - 0x108]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x418b15
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4187d0
sub ecx, edx
lea eax, [ebp - 0x108]
add eax, ecx
mov edi, eax
dec eax
cmp byte [eax], 0x5c
je 0x4187f7
lea ecx, [ebp - 0x108]
cmp eax, ecx
jne 0x4187e1
mov edi, ecx
jmp 0x4187ff
test edi, edi
je 0x418b15
mov eax, dword [esi + 0xc]
test eax, eax
je 0x418820
add eax, ebx
push edi
push eax
call fcn.0057503d
add esp, 8
test eax, eax
je 0x418820
mov eax, dword [esi + 0x20]
add esi, 0x14
test eax, eax
jne 0x418806
cmp dword [esi + 0xc], 0
mov edi, dword [sym.imp.KERNEL32.dll_VirtualQuery]
je 0x4188d8
mov esi, dword [esi + 0x10]
add esi, ebx
mov ebx, dword [ebp + 0x10]
mov eax, dword [esi]
test eax, eax
je 0x4188db
cmp eax, ebx
je 0x418855
mov eax, dword [esi + 4]
add esi, 4
test eax, eax
jne 0x418842
jmp 0x4188db
push 0x1c
lea eax, [ebp - 0x144]
push eax
push esi
call edi
mov edi, dword [ebp - 0x138]
lea eax, [ebp - 0x130]
mov ebx, dword [ebp - 0x144]
push eax
push 0x40
push edi
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x41889b
lea eax, [ebp - 0x130]
or ecx, 0xffffffff
push eax
push 0x40
push edi
push ebx
call fcn.004183b0
test eax, eax
je 0x4188d2
mov eax, dword [ebp - 0x120]
push 0
mov dword [esi], eax
mov esi, dword [ebp - 0x130]
mov edi, dword [ebp - 0x138]
mov ebx, dword [ebp - 0x144]
push esi
push edi
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x4188d2
push eax
push esi
push edi
push ebx
or ecx, 0xffffffff
call fcn.004183b0
mov edi, dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 0x16c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x164]
cmp eax, dword [ebp - 0x160]
jae 0x418af7
jmp 0x418903
mov ebx, dword [ebp + 0x10]
push 0x1c
lea ecx, [ebp - 0x144]
push ecx
push eax
call edi
mov ecx, dword [ebp - 0x128]
mov edx, dword [ebp - 0x144]
mov dword [ebp - 0x10c], edx
mov eax, dword [ecx + 0x50]
add eax, dword [ebp - 0x148]
cmp edx, eax
ja 0x418ae2
lea ecx, [ebp - 0x144]
call fcn.004185e0
test eax, eax
je 0x418ae2
mov esi, dword [ebp - 0x138]
lea eax, [ebp - 0x130]
push eax
push 0x40
push esi
push edx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x418982
lea eax, [ebp - 0x130]
or ecx, 0xffffffff
push eax
push 0x40
push esi
push dword [ebp - 0x10c]
call fcn.004183b0
test eax, eax
je 0x418adc
mov eax, dword [ebp - 0x138]
xor ecx, ecx
mov edx, dword [ebp - 0x144]
mov dword [ebp - 0x10c], edx
mov dword [ebp - 0x124], ecx
add eax, 0xfffffffb
je 0x418ae2
mov eax, dword [ebp - 0x120]
mov esi, ebx
sub eax, edx
mov ebx, edx
sub eax, 5
sub esi, dword [ebp - 0x120]
mov dword [ebp - 0x110], eax
mov edi, eax
mov dword [ebp - 0x118], esi
mov al, byte [ebx]
cmp al, 0xe8
je 0x418a3c
cmp al, 0xe9
je 0x418a3c
mov eax, dword [ebp + 0x10]
cmp dword [ebx], eax
jne 0x418ab1
lea eax, [ebp + 0x10]
cmp ebx, eax
je 0x418ab1
mov eax, dword [ebp - 0x11c]
mov esi, dword [eax + 8]
mov eax, dword [esi]
cmp eax, esi
je 0x418a02
cmp dword [eax + 8], ebx
je 0x418a02
mov eax, dword [eax]
cmp eax, esi
jne 0x4189f7
xor edx, edx
lea ecx, [eax + 8]
cmp eax, esi
cmovne edx, ecx
test edx, edx
jne 0x418aa5
mov eax, dword [ebp - 0x11c]
mov ecx, dword [ebp - 0x114]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x418a2b
cmp ecx, eax
jae 0x418aa5
mov eax, dword [ebp - 0x120]
inc ecx
mov dword [ebp - 0x114], ecx
mov dword [ebx], eax
jmp 0x418aa5
mov eax, dword [ebp - 0x110]
lea edi, [edx + 1]
add edi, ecx
add eax, esi
cmp dword [edi], eax
jne 0x418b0d
mov eax, dword [ebp - 0x11c]
mov esi, dword [eax + 8]
mov eax, dword [esi]
cmp eax, esi
je 0x418a6b
cmp dword [eax + 8], edi
je 0x418a6b
mov eax, dword [eax]
cmp eax, esi
jne 0x418a60
xor edx, edx
lea ecx, [eax + 8]
cmp eax, esi
cmovne edx, ecx
test edx, edx
jne 0x418a9f
mov eax, dword [ebp - 0x11c]
mov ecx, dword [ebp - 0x114]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x418a90
cmp ecx, eax
jae 0x418a9f
mov eax, dword [ebp - 0x110]
inc ecx
mov dword [ebp - 0x114], ecx
mov dword [edi], eax
mov edi, dword [ebp - 0x110]
mov esi, dword [ebp - 0x118]
mov edx, dword [ebp - 0x10c]
inc dword [ebp - 0x124]
dec edi
mov eax, dword [ebp - 0x138]
inc ebx
mov ecx, dword [ebp - 0x124]
add eax, 0xfffffffb
mov dword [ebp - 0x110], edi
cmp ecx, eax
jb 0x4189c8
mov edi, dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov edx, dword [ebp - 0x144]
mov eax, dword [ebp - 0x138]
inc eax
add eax, edx
cmp eax, dword [ebp - 0x160]
jb 0x418900
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055c6fa
mov esp, ebp
pop ebp
ret 0x14
mov edi, dword [ebp - 0x110]
jmp 0x418ab1
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055c6fa
mov esp, ebp
pop ebp
ret 0x14