Function at 0x404110
Capabilities:
Access pe header
Execute shellcode via indirect call
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x435048
push 0x40d8b0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x437040]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x30], 0
xor esi, esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x2c], esi
xor eax, eax
mov dword [ebp - 4], eax
mov dword [ecx], eax
mov dword [ebp - 0x30], edx
mov ecx, 0x5a4d
cmp word [edx], cx
jne 0x4041bd
mov esi, dword [edx + 0x3c]
add esi, edx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x2c], esi
cmp dword [esi], 0x4550
jne 0x4041bd
test byte [esi + 0x38], 1
jne 0x4041bd
mov ecx, 0x14c
cmp word [esi + 4], cx
je 0x4041a1
mov eax, 0x4000000e
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0xfffffffe
jmp 0x4041f4
mov ecx, 0x2000
test word [esi + 0x16], cx
jne 0x4041c5
mov eax, 0xc00000bb
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0xfffffffe
jmp 0x4041f4
mov eax, 0xc000007b
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0xfffffffe
jmp 0x4041f4
test eax, eax
js 0x404523
cmp eax, 0x4000000e
je 0x404523
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test byte [esi + 0x5e], 0x40
jne 0x40422c
push 0x40
push 0x2000
push dword [esi + 0x50]
push dword [esi + 0x34]
call edi
mov ebx, eax
mov dword [ebp - 0x28], ebx
test ebx, ebx
jne 0x404246
push 0x40
push 0x2000
push dword [esi + 0x50]
push ebx
call edi
mov ebx, eax
mov dword [ebp - 0x28], ebx
test ebx, ebx
je 0x404276
mov eax, dword [0x438ce4]
mov ecx, dword [eax + 0x1c]
mov eax, dword [esi + 0x54]
add eax, 0x2f
add eax, ecx
neg ecx
and eax, ecx
push 4
push 0x1000
push eax
push ebx
call edi
test eax, eax
jne 0x40428d
push 0x8000
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xc0000017
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x30]
mov edi, dword [eax + 0x3c]
add edi, ebx
mov dword [ebp - 0x40], edi
push dword [esi + 0x54]
push eax
push ebx
call fcn.0040da80
add esp, 0xc
mov dword [edi + 0x34], ebx
mov ecx, dword [ebx + 0x3c]
movzx eax, word [ecx + ebx + 6]
lea eax, [eax + eax*4]
lea eax, [eax + 0x1f]
lea edx, [ecx + eax*8]
mov dword [ebp - 0x38], edx
movzx eax, word [edi + 0x14]
xor ecx, ecx
movzx esi, word [edi + 6]
test esi, esi
je 0x4042e5
add edx, 0x30
add eax, 0x24
add eax, edi
cmp dword [eax], edx
jb 0x404471
inc ecx
add eax, 0x28
cmp ecx, esi
jl 0x4042d2
mov edx, dword [ebp - 0x38]
lea esi, [edx + ebx]
push 0x30
push 0
push esi
call fcn.0040e000
add esp, 0xc
mov eax, dword [edi + 0x34]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x24], eax
mov dword [esi], 0x11ffee00
mov dword [esi + 4], 0xaabbcc
mov eax, dword [edi + 0x54]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esi + 0x14], eax
mov dword [esi + 0x20], 1
xor esi, esi
mov dword [ebp - 0x1c], esi
test esi, esi
js 0x4044b4
movzx esi, word [edi + 0x14]
add esi, 0x28
mov dword [ebp - 0x38], 0
xor eax, eax
cmp ax, word [edi + 6]
jae 0x4043a3
add esi, edi
mov ecx, dword [edi + 0x38]
mov eax, dword [esi - 8]
dec eax
add eax, ecx
neg ecx
and eax, ecx
cmp eax, dword [esi]
jb 0x404488
push 4
push 0x1000
push eax
mov eax, dword [esi - 4]
add eax, dword [edi + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, eax
test ecx, ecx
je 0x40447b
mov eax, dword [esi]
test eax, eax
je 0x404391
push eax
mov eax, dword [esi + 4]
add eax, dword [ebp - 0x34]
push eax
push ecx
call fcn.0040da80
add esp, 0xc
mov edx, dword [ebp - 0x38]
inc edx
mov dword [ebp - 0x38], edx
add esi, 0x28
movzx eax, word [edi + 6]
cmp edx, eax
jb 0x404346
mov esi, dword [ebp - 0x1c]
test esi, esi
js 0x4044b4
mov ecx, dword [edi + 0x34]
mov eax, dword [ebp - 0x24]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0x38], ecx
je 0x40444a
mov eax, dword [edi + 0xa0]
lea edx, [eax + ebx]
mov ecx, dword [edi + 0xa4]
test ecx, ecx
je 0x40444a
test eax, eax
je 0x40444a
add eax, ecx
add eax, ebx
cmp edx, eax
jae 0x40444a
cmp dword [edx], 0
jbe 0x404447
lea esi, [edx + 8]
xor edi, edi
mov ecx, dword [edx + 4]
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x404430
nop
movzx eax, word [esi]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x404420
and eax, 0xfff
add eax, dword [edx]
mov ecx, dword [ebp - 0x38]
add dword [eax + ebx], ecx
inc edi
add esi, 2
mov ecx, dword [edx + 4]
lea eax, [ecx - 8]
shr eax, 1
cmp edi, eax
jb 0x404400
add edx, ecx
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx + 0xa4]
add eax, dword [ecx + 0xa0]
add eax, ebx
cmp edx, eax
jb 0x4043e7
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x44]
mov dword [eax], ebx
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 0xc00000bb
jmp 0x404323
mov esi, 0xc0000017
mov dword [ebp - 0x1c], esi
jmp 0x4043a6
mov dword [ebp - 0x1c], 0xc000007b
jmp 0x4044b4
push ebx
mov edi, dword [sym.imp.ntdll.dll_RtlImageNtHeader]
call edi
test eax, eax
je 0x4044ed
mov ecx, dword [ebx + 0x3c]
movzx eax, word [ecx + ebx + 6]
lea esi, [eax*4 + 0x1f]
add esi, eax
lea esi, [ecx + esi*8]
add esi, ebx
cmp dword [esi], 0x11ffee00
jne 0x4044ed
cmp dword [esi + 4], 0xaabbcc
jne 0x4044ed
cmp dword [esi + 0x10], ebx
je 0x4044ef
xor esi, esi
push ebx
call edi
test esi, esi
je 0x404520
mov al, byte [esi + 0xc]
and al, 6
cmp al, 2
je 0x404520
cmp dword [esi + 0x18], 0
je 0x40450c
mov ecx, esi
call fcn.00407150
cmp dword [esi + 0x10], 0
je 0x404520
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret