Function at 0x100040b0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov esi, ecx
movzx ebx, byte [esp + 0x34]
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, eax
mov al, 1
cmp cl, bl
je 0x10004321
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x18]
mov edi, eax
and eax, 0xf8000000
cmp eax, 0x28000000
je 0x1000431f
mov dword [esp + 0x18], 0
lea eax, [esp + 0x18]
push eax
push edi
push 4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExA]
test eax, eax
je 0x1000431f
mov ecx, dword [esp + 0x18]
xor eax, eax
cmp ecx, 0x10000000
je 0x10004321
test ecx, ecx
je 0x10004321
and ecx, 0xf8000000
cmp ecx, 0x28000000
je 0x10004321
mov eax, dword [esi]
movzx edx, bl
mov ecx, esi
mov dword [esp + 0x1c], edx
push edx
call dword [eax + 0x20]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
mov dword [esp + 0xc], eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x14]
mov ebp, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x2c]
mov dword [esp + 8], eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x34]
mov dword [esp], eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x28]
mov dword [esp + 4], eax
mov dword [esp + 0x10], ebp
test ebp, ebp
je 0x10004194
test bl, bl
je 0x10004194
mov ecx, dword [esp + 0x10]
push 1
call fcn.100040b0
test al, al
je 0x1000431f
mov dword [esp + 0x14], 0x40
lea eax, [esp + 0x14]
push eax
push 0x40
mov ebp, dword [esp + 0x14]
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1000431f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x24]
movzx eax, al
dec eax
cmp eax, 8
ja case.default.0x100041cb
jmp dword [eax*4 + 0x1001fe18]
call fcn.1000c860
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call fcn.1000ce50
test bl, bl
je 0x100041fe
push dword [esp + 8]
push dword [esp + 8]
call fcn.1000cf20
call fcn.1000c9d0
jmp case.default.0x100041cb
push dword [esp + 8]
push dword [esp + 8]
call fcn.1000d370
call fcn.1000c9d0
jmp case.default.0x100041cb
test bl, bl
je 0x10004263
push ebp
push edi
push dword [esp + 8]
call fcn.10012cd0
add esp, 0xc
push ebp
push dword [esp + 0xc]
push edi
call fcn.10012cd0
jmp 0x10004255
test bl, bl
je 0x10004263
push ebp
push edi
push dword [esp + 8]
call fcn.10012cd0
add esp, 0xc
mov eax, dword [esp + 8]
movzx eax, byte [eax]
push ebp
push eax
push edi
call fcn.10013250
add esp, 0xc
mov eax, dword [esp + 4]
mov ecx, dword [esp]
mov dword [eax], ecx
jmp case.default.0x100041cb
push ebp
push dword [esp + 4]
push edi
call fcn.10012cd0
add esp, 0xc
jmp 0x10004293
test bl, bl
je 0x1000428c
mov eax, dword [edi]
mov ecx, dword [esp]
mov dword [ecx], eax
mov eax, dword [esp + 8]
mov dword [edi], eax
mov eax, dword [esp + 4]
mov dword [eax], ecx
jmp case.default.0x100041cb
mov eax, dword [esp]
mov eax, dword [eax]
mov dword [edi], eax
mov eax, dword [esp + 4]
mov dword [eax], edi
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov byte [esp + 0xc], al
mov ecx, esi
call fcn.100043b0
cmp byte [esp + 0xc], al
je 0x100042d6
mov bh, al
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
and bh, al
xor bh, 1
or bh, byte [esp + 0xc]
jne 0x10004311
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x28]
mov edi, dword [eax]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x18]
cmp edi, eax
sete al
xor byte [esp + 0xc], al
je 0x10004311
cmp dword [esp + 0x10], 0
je 0x1000430d
test bl, bl
jne 0x1000430d
mov ecx, dword [esp + 0x10]
push dword [esp + 0x1c]
call fcn.100040b0
test al, al
je 0x1000431f
mov al, 1
jmp 0x10004321
xor bl, 1
mov eax, dword [esi]
movzx edx, bl
mov ecx, esi
push edx
call dword [eax + 0x20]
xor eax, eax
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret 4