Function at 0x5017a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rbp
sub rsp, 0xc0
mov rbp, rsp
mov qword [rbp + 0x40], 0
mov qword [rbp + 0x38], 0
mov qword [rbp + 0x50], 0
mov qword [rbp + 0x48], rbp
mov dword [rbp + 0xd0], ecx
mov qword [rbp + 0xd8], rdx
mov qword [rbp + 0xe0], r8
mov qword [rbp + 0xe8], r9
nop
mov qword [rbp + 0xa8], 0
nop
mov rcx, qword [rbp + 0xf0]
call fcn.00410360
cmp qword [rbp + 0xe0], 0
je 0x501a3e
mov rax, qword [rbp + 0xe0]
lea rcx, [rax + 8]
lea rdx, [rbp + 0xa0]
mov r8d, 8
xor r9, r9
call fcn.0043bee0
test al, al
je 0x501a3e
lea rcx, [rbp + 0x50]
call fcn.004103b0
mov rcx, qword [rbp + 0xa0]
mov rdx, rax
lea r8, [rbp + 0x5b]
lea r9, [0x00501b80]
mov byte [rsp + 0x20], 1
call fcn.004acc30
test al, al
je 0x501a3e
mov rcx, qword [rbp + 0xf0]
mov rdx, qword [rbp + 0x50]
call fcn.004121e0
mov dword [rbp + 0x5c], 2
mov rax, qword [rbp + 0xe0]
mov rax, qword [rax + 8]
mov rax, qword [rax]
movsxd rcx, dword [rbp + 0x5c]
mov rax, qword [rax + rcx*8]
mov qword [rbp + 0xb0], rax
cmp qword [rbp + 0xb0], 0
je 0x501a3e
mov rax, qword [rbp + 0xb0]
lea rcx, [0x00501680]
cmp qword [rax + 0xc], rcx
je 0x501a3e
lea rcx, [rbp + 0x88]
lea rdx, [rbp + 0x60]
call fcn.004aad20
call sub.kernel32.dll_GetCurrentProcessId
lea rcx, [rbp + 0x38]
mov edx, eax
mov r8d, 1
mov r9b, 0x30
call fcn.00425bd0
lea rcx, [rbp + 0x40]
lea rdx, [0x00501b94]
mov r8, qword [rbp + 0x38]
call fcn.004111e0
mov rcx, qword [rbp + 0x40]
call fcn.004115a0
lea rcx, [rbp + 0x88]
xor rdx, rdx
mov r8, rax
call fcn.0041f450
mov qword [rbp + 0xb8], rax
cmp qword [rbp + 0xb8], 0
je 0x501a3e
nop
mov rcx, qword [rbp + 0xb8]
or edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
nop
mov rax, qword [rbp + 0xb0]
lea rcx, [0x00501680]
cmp qword [rax + 0xc], rcx
je 0x501a1a
xor rcx, rcx
mov edx, 0x18
mov r8d, 0x1000
mov r9d, 0x40
call sub.kernel32.dll_VirtualAlloc
mov qword [rbp + 0xb0], rax
mov rax, qword [rbp + 0xb0]
mov word [rax], 0xba48
mov rax, qword [rbp + 0xb0]
mov word [rax + 0xa], 0xb848
mov rax, qword [rbp + 0xb0]
mov dword [rax + 0x14], 0xe0ff48
mov rax, qword [rbp + 0xb0]
mov rcx, qword [rbp + 0xe0]
mov rcx, qword [rcx + 8]
mov rcx, qword [rcx]
movsxd rdx, dword [rbp + 0x5c]
mov rcx, qword [rcx + rdx*8]
mov qword [rax + 2], rcx
mov rax, qword [rbp + 0xb0]
lea rcx, [0x00501680]
mov qword [rax + 0xc], rcx
mov rax, qword [rbp + 0xe0]
mov rax, qword [rax + 8]
mov rax, qword [rax]
movsxd rcx, dword [rbp + 0x5c]
lea rax, [rax + rcx*8]
mov qword [rbp + 0xa0], rax
mov rcx, qword [rbp + 0xa0]
mov rdx, qword [rbp + 0xb0]
mov r8, qword [rbp + 0xb0]
call fcn.004f59c0
call sub.kernel32.dll_GetCurrentProcess
mov rcx, rax
xor rdx, rdx
xor r8, r8
call sub.kernel32.dll_FlushInstructionCache
nop
mov rcx, qword [rbp + 0xb8]
call sub.kernel32.dll_ReleaseMutex
nop
mov rcx, qword [rbp + 0xb8]
call sub.kernel32.dll_CloseHandle
jmp 0x501a3e
mov rax, qword [rbp + 0xf8]
mov qword [rax], 0
mov ecx, 0x10
call fcn.004089b0
mov rcx, qword [rbp + 0xe8]
mov qword [rcx], rax
mov rax, qword [rbp + 0xe8]
mov rax, qword [rax]
mov rcx, qword [rbp + 0xd8]
mov qword [rax], rcx
mov rax, qword [rbp + 0xe8]
mov rax, qword [rax]
mov rcx, qword [rbp + 0xe0]
mov qword [rax + 8], rcx
xor rcx, rcx
call sub.kernel32.dll_SetLastError
nop
lea rcx, [rbp + 0x38]
mov edx, 2
call fcn.00410470
lea rcx, [rbp + 0x50]
call fcn.004103b0
lea rsp, [rbp + 0xc0]
pop rbp
ret