Function at 0x10031500
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Patch process command line

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x214
mov eax, dword [0x10097060]
xor eax, esp
mov dword [esp + 0x210], eax
push ebx
push esi
push edi
jmp 0x1003152f
push 0x10089bd0
push 0x10089be0
call fcn.1007a120
call fcn.10023de0
mov dword [0x1009a048], eax
jmp 0x10031558
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
lea eax, [esp + 0x10]
push eax
push 0x10099de8
xor esi, esi
push 6
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
mov ecx, dword [esp + 0x10]
push 0x104
push 0x10099e40
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push 4
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], eax
push ecx
add eax, 0x3c
mov dword [esp + 0x24], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push eax
call edi
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
lea eax, [eax + edx + 0x50]
push 4
lea edx, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x24], eax
call esi
push eax
call edi
push str.NtQueryInformationProcess
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [esp + 0x1c]
push ecx
push 0x18
lea edx, [esp + 0x30]
mov ebx, eax
xor eax, eax
push edx
push eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x2c], eax
call esi
push eax
call ebx
push 0x1d6
lea eax, [esp + 0x46]
push 0
push eax
mov byte [esp + 0x4c], 0
mov byte [esp + 0x4d], 0
call fcn.100696f0
mov eax, dword [esp + 0x38]
add esp, 0xc
test eax, eax
mov dword [esp + 0x20], 0
je 0x10031662
lea ecx, [esp + 0x20]
push ecx
push 0x1d8
lea edx, [esp + 0x48]
push edx
push eax
call esi
push eax
call edi
mov edx, dword [esp + 0x4c]
mov eax, dword [edx + 0xc]
mov ecx, dword [esp + 0x10]
add edx, 0xc
cmp eax, edx
je 0x10031694
cmp dword [eax + 0x18], ecx
je 0x10031681
mov eax, dword [eax]
cmp eax, edx
jne 0x10031674
jmp 0x10031694
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x4c]
mov eax, dword [edx + 0x14]
add edx, 0x14
cmp eax, edx
je 0x100316c2
cmp dword [eax + 0x10], ecx
je 0x100316af
mov eax, dword [eax]
cmp eax, edx
jne 0x100316a2
jmp 0x100316c2
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x4c]
mov eax, dword [edx + 0x1c]
add edx, 0x1c
cmp eax, edx
je 0x100316f0
cmp dword [eax + 8], ecx
je 0x100316dd
mov eax, dword [eax]
cmp eax, edx
jne 0x100316d0
jmp 0x100316f0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [esp + 0x10]
test ecx, ecx
mov esi, ecx
je 0x10031737
lea eax, [esp + 0x24]
push eax
push 0x40
push 0x1000
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10031737
push 0x1000
push 0
push esi
call fcn.100696f0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.100673c5
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x21c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.100673c5
mov esp, ebp
pop ebp
ret