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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push ebx
push esi
mov eax, dword [ebp + 8]
push edi
push dword [ebp + 0xc]
mov esi, ecx
xor edi, edi
push dword [ebp + 0x10]
mov dword [esi + 8], eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, eax
mov dword [ebp + 0xc], ecx
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [esi + 0xc], eax
cmp word [ecx], 0x5a4d
je 0x40ceac
cmp dword [eax], 0x4550
je 0x40ceac
push 0x10
push 0x4d7ab0
push 0x4d7a90
push edi
jmp 0x40d072
mov ecx, dword [eax + 0x50]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, 0x2000
push 0x40
push ebx
push ecx
push dword [eax + 0x34]
mov dword [ebp + 8], ecx
call edi
test eax, eax
mov dword [esi + 4], eax
jne 0x40ced9
push 0x40
push ebx
push dword [ebp + 8]
push eax
call edi
mov dword [esi + 4], eax
push 0x40
push 0x1000
push dword [ebp + 8]
push dword [esi + 4]
call edi
mov eax, dword [esi + 0xc]
push dword [eax + 0x54]
push dword [ebp + 0xc]
push dword [esi + 4]
call fcn.0047c5c0
mov eax, dword [esi + 0xc]
and dword [ebp + 8], 0
add esp, 0xc
movzx ebx, word [eax + 6]
test ebx, ebx
jle 0x40cf51
lea edi, [eax + 0x10c]
mov eax, dword [edi]
mov ecx, dword [ebp + 0xc]
add eax, ecx
cmp dword [edi - 4], 0
mov dword [ebp + 0x10], eax
je 0x40cf46
mov eax, dword [edi - 8]
lea ecx, [ebx - 1]
add eax, dword [esi + 4]
cmp dword [ebp + 8], ecx
jge 0x40cf36
mov ecx, dword [edi + 0x28]
sub ecx, dword [edi]
jmp 0x40cf39
mov ecx, dword [edi - 4]
push ecx
push dword [ebp + 0x10]
push eax
call fcn.0047c5c0
add esp, 0xc
inc dword [ebp + 8]
add edi, 0x28
cmp dword [ebp + 8], ebx
jl 0x40cf11
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx + 0xa0]
test edx, edx
je 0x40cfb2
mov eax, dword [esi + 4]
mov edi, eax
sub edi, dword [ecx + 0x34]
add eax, edx
mov ecx, dword [eax]
test ecx, ecx
je 0x40cfb2
mov edx, dword [eax + 4]
add ecx, dword [esi + 4]
sub edx, 8
shr edx, 1
mov dword [ebp + 0xc], ecx
je 0x40cfb2
test edx, edx
lea ebx, [eax + 8]
jle 0x40cfad
mov ecx, ebx
mov dword [ebp + 8], edx
mov bx, word [ecx]
mov edx, ebx
and dx, 0xf000
cmp dx, 0x3000
jne 0x40cfa6
and ebx, 0xfff
add ebx, dword [ebp + 0xc]
add dword [ebx], edi
inc ecx
inc ecx
dec dword [ebp + 8]
jne 0x40cf8a
add eax, dword [eax + 4]
jmp 0x40cf68
and byte [ebp - 0x100], 0
push 0x3f
pop ecx
xor eax, eax
lea edi, [ebp - 0xff]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esi + 0xc]
mov edi, dword [eax + 0x80]
test edi, edi
je 0x40d07c
add edi, dword [esi + 4]
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40d07c
add eax, dword [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp + 0xc], eax
je 0x40d046
mov ecx, dword [edi + 0x10]
mov eax, dword [esi + 4]
mov edx, dword [edi]
test edx, edx
lea ebx, [ecx + eax]
je 0x40d00a
mov ecx, edx
add eax, ecx
mov dword [ebp + 8], eax
mov eax, dword [eax]
test eax, eax
je 0x40d041
test eax, 0x800000
jne 0x40d024
add eax, dword [esi + 4]
add eax, 2
jmp 0x40d029
xor eax, 0x7fffff
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
add dword [ebp + 8], 4
mov dword [ebx], eax
mov eax, dword [ebp + 8]
add ebx, 4
jmp 0x40d00f
add edi, 0x14
jmp 0x40cfdd
mov eax, dword [edi + 0xc]
add eax, dword [esi + 4]
push eax
lea eax, [ebp - 0x100]
push 0x4d7a78
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x100]
push 0x10
push 0x4d7a00
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x40d09d
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
push 0
push 1
mov eax, dword [eax + 0x28]
push dword [esi + 8]
add eax, ecx
mov dword [esi + 0x10], eax
call eax
mov ecx, esi
call fcn.0040d137
mov eax, dword [esi + 4]
pop edi
pop esi
pop ebx
leave
ret 0xc