Function at 0x10040eb0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x107c
call fcn.100438a0
mov eax, dword [0x1004e040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword fs:[0x2c]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push esi
mov esi, dword [0x1004e4d4]
mov dword [ebp - 0x1070], ecx
push edi
mov edi, edx
mov ecx, dword [eax + esi*4]
mov eax, dword [0x1004e53c]
mov dword [ebp - 0x107c], edi
mov dword [ebp - 0x1074], ecx
cmp eax, dword [ecx + 4]
jle 0x10040f40
push 0x1004e53c
call fcn.10042bf6
add esp, 4
cmp dword [0x1004e53c], 0xffffffff
jne 0x10040f40
cmp dword [0x1004e0d0], 0xffffffff
jne 0x10040f33
lea eax, [ebp - 0x1038]
push eax
call ebx
mov eax, dword [ebp - 0x1034]
mov dword [0x1004e0d0], eax
push 0x1004e53c
call fcn.10042ba5
add esp, 4
mov ecx, dword [ebp + 8]
mov edx, 1
mov dword [ebp - 0x106c], edx
test ecx, ecx
je 0x10041245
nop word [eax + eax]
mov edx, dword [ebp - 0x1074]
mov esi, 0x1000
mov eax, dword [0x1004e548]
cmp ecx, esi
cmovb esi, ecx
mov ecx, esi
mov dword [ebp - 0x1078], esi
mov dword [ebp - 0x1060], ecx
cmp eax, dword [edx + 4]
jle 0x10040fd7
push 0x1004e548
call fcn.10042bf6
add esp, 4
cmp dword [0x1004e548], 0xffffffff
jne 0x10040fd1
mov eax, dword [0x1004e0d0]
cmp eax, 0xffffffff
jne 0x10040fbf
lea eax, [ebp - 0x1038]
push eax
call ebx
mov eax, dword [ebp - 0x1034]
mov dword [0x1004e0d0], eax
push 0x1004e548
mov dword [0x1004e54c], eax
call fcn.10042ba5
add esp, 4
mov ecx, dword [ebp - 0x1060]
mov dword [ebp - 0x1008], 0
lea ebx, [ebp - 0x1004]
mov dword [ebp - 0x1064], 0
mov eax, 1
test esi, esi
je 0x100410bb
nop
mov esi, dword [0x1004e54c]
xor edx, edx
mov eax, edi
mov dword [ebp - 0x1068], 1
div esi
push 0xee
sub esi, edx
cmp ecx, esi
cmovle esi, ecx
mov ecx, edi
mov edx, esi
call fcn.10040e20
add esp, 4
test al, al
je 0x1004106d
lea eax, [ebp - 0x1008]
push eax
push 0x40
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10041063
push esi
push eax
push ebx
mov dword [ebp - 0x1068], eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x1064]
mov dword [ebp - 0x1064], eax
jmp 0x1004107b
mov dword [ebp - 0x1064], 1
push esi
push edi
push ebx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x1064]
add esp, 0xc
test eax, eax
je 0x10041097
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x1008]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebp - 0x1060]
add ebx, esi
add edi, esi
sub ecx, esi
mov dword [ebp - 0x1060], ecx
jne 0x10041000
mov eax, dword [ebp - 0x1068]
mov esi, dword [ebp - 0x1078]
mov edx, dword [ebp - 0x1074]
xor ecx, ecx
test eax, eax
mov eax, dword [0x1004e540]
cmovne ecx, dword [ebp - 0x106c]
mov dword [ebp - 0x106c], ecx
mov ecx, esi
mov dword [ebp - 0x1060], ecx
cmp eax, dword [edx + 4]
jle 0x10041137
push 0x1004e540
call fcn.10042bf6
add esp, 4
cmp dword [0x1004e540], 0xffffffff
jne 0x10041131
mov eax, dword [0x1004e0d0]
cmp eax, 0xffffffff
jne 0x1004111f
lea eax, [ebp - 0x105c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x1058]
mov dword [0x1004e0d0], eax
push 0x1004e540
mov dword [0x1004e544], eax
call fcn.10042ba5
add esp, 4
mov ecx, dword [ebp - 0x1060]
mov edi, dword [ebp - 0x1070]
lea ebx, [ebp - 0x1004]
mov dword [ebp - 0x100c], 0
mov eax, 1
mov dword [ebp - 0x1068], 0
test esi, esi
je 0x1004120a
mov esi, dword [0x1004e544]
xor edx, edx
mov eax, edi
mov dword [ebp - 0x1064], 1
div esi
push 0xcc
sub esi, edx
cmp ecx, esi
cmovle esi, ecx
mov ecx, edi
mov edx, esi
call fcn.10040e20
add esp, 4
test al, al
je 0x100411bd
lea eax, [ebp - 0x100c]
push eax
push 0x40
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x100411b3
mov dword [ebp - 0x1064], eax
jmp 0x100411c8
mov dword [ebp - 0x1068], 1
push esi
push ebx
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0x1068], 0
je 0x100411e6
lea eax, [ebp - 0x1014]
push eax
push dword [ebp - 0x100c]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebp - 0x1060]
add edi, esi
add ebx, esi
sub ecx, esi
mov dword [ebp - 0x1060], ecx
jne 0x10041164
mov eax, dword [ebp - 0x1064]
mov esi, dword [ebp - 0x1078]
mov ecx, dword [ebp + 8]
xor edx, edx
mov edi, dword [ebp - 0x107c]
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmovne edx, dword [ebp - 0x106c]
sub ecx, esi
add dword [ebp - 0x1070], esi
add edi, esi
mov dword [ebp - 0x106c], edx
mov dword [ebp + 8], ecx
mov dword [ebp - 0x107c], edi
test ecx, ecx
jne 0x10040f60
mov ecx, dword [ebp - 4]
mov eax, edx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10042a37
mov esp, ebp
pop ebp
ret