Function at 0x502740
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.004104c0
cmp qword [rbp + 0xe0], 0
je 0x5029de
mov rax, qword [rbp + 0xe0]
lea rcx, [rax + 8]
lea rdx, [rbp + 0xa0]
mov r8d, 8
xor r9, r9
call fcn.0043c670
test al, al
je 0x5029de
lea rcx, [rbp + 0x50]
call fcn.00410510
mov rcx, qword [rbp + 0xa0]
mov rdx, rax
lea r8, [rbp + 0x5b]
lea r9, [0x00502b20]
mov byte [rsp + 0x20], 1
call fcn.004adbd0
test al, al
je 0x5029de
mov rcx, qword [rbp + 0xf0]
mov rdx, qword [rbp + 0x50]
call fcn.004123a0
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 0x5029de
mov rax, qword [rbp + 0xb0]
lea rcx, [0x00502620]
cmp qword [rax + 0xc], rcx
je 0x5029de
lea rcx, [rbp + 0x88]
lea rdx, [rbp + 0x60]
call fcn.004abcc0
call sub.kernel32.dll_GetCurrentProcessId
lea rcx, [rbp + 0x38]
mov edx, eax
mov r8d, 1
mov r9b, 0x30
call fcn.00426360
lea rcx, [rbp + 0x40]
lea rdx, [0x00502b34]
mov r8, qword [rbp + 0x38]
call fcn.004113a0
mov rcx, qword [rbp + 0x40]
call fcn.00411760
lea rcx, [rbp + 0x88]
xor rdx, rdx
mov r8, rax
call fcn.0041f9c0
mov qword [rbp + 0xb8], rax
cmp qword [rbp + 0xb8], 0
je 0x5029de
nop
mov rcx, qword [rbp + 0xb8]
or edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
nop
mov rax, qword [rbp + 0xb0]
lea rcx, [0x00502620]
cmp qword [rax + 0xc], rcx
je 0x5029ba
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, [0x00502620]
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.004f6960
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 0x5029de
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.004105d0
lea rcx, [rbp + 0x50]
call fcn.00410510
lea rsp, [rbp + 0xc0]
pop rbp
ret