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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
mov r15, rdx
mov rdi, rcx
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1000
call fcn.180047780
nop
lea rax, vtable.Patch::UpdateQuestsHook::HookCodeGenerator.0
mov qword [rdi], rax
xor ebx, ebx
mov qword [rbp - 0x49], rbx
mov dword [rbp - 0x41], ebx
mov qword [rbp - 0x59], rbx
mov dword [rbp - 0x51], ebx
mov dword [rsp + 0x20], 0x50
mov r9d, 6
mov r8d, 0xff
lea rdx, [rdi + 0x4d0]
mov rcx, rdi
call fcn.18004e5b0
mov dword [rsp + 0x20], 0x50
mov r9d, 6
mov r8d, 0xff
lea rdx, [rdi + 0x4d8]
mov rcx, rdi
call fcn.18004e5b0
mov dword [rsp + 0x20], 0x50
mov r9d, 6
mov r8d, 0xff
lea rdx, [rdi + 0x508]
mov rcx, rdi
call fcn.18004e5b0
mov dword [rsp + 0x20], 0x50
mov r9d, 6
mov r8d, 0xff
lea rdx, [rdi + 0x510]
mov rcx, rdi
call fcn.18004e5b0
cmp qword [rdi + 0xcf0], rbx
jne 0x180049f1e
cmp byte [rdi + 0xcf8], bl
jne 0x180049f1e
movzx edx, byte [rdi + 0x3b4]
mov ecx, dword [rdi + 0x3b0]
and ecx, 0x3fff
shl ecx, 0x10
mov eax, dword [rbp - 0x19]
and eax, 0x80000040
or ecx, eax
or ecx, 0x40
mov dword [rbp - 0x19], ecx
and dword [rbp - 0x15], 0xffffff00
mov rax, qword [rdi + 0xce8]
and dword [rbp - 0x11], 0x80000000
and dword [rbp - 0xd], 0xffffff00
and dword [rbp - 9], 0x80000000
and dword [rbp - 5], 0xffffff00
mov dword [rbp - 1], ebx
mov qword [rbp + 7], rax
lea rax, [rbp - 0x49]
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], 2
mov dword [rbp + 0x1f], ebx
mov byte [rbp + 0x23], bl
mov byte [rbp + 0x24], dl
mov byte [rbp + 0x25], 1
mov qword [rsp + 0x40], rbx
mov dword [rsp + 0x38], ebx
mov byte [rsp + 0x30], 1
mov dword [rsp + 0x28], 0xff
mov qword [rsp + 0x20], rbx
mov r9d, 2
mov r8d, 0x70
lea rdx, [rbp - 0x19]
mov rcx, rdi
call fcn.18004ec50
mov dword [rsp + 0x20], 0x58
xor r9d, r9d
mov r8d, 0x8f
lea rdx, [rdi + 0x510]
mov rcx, rdi
call fcn.18004e5b0
mov dword [rsp + 0x20], 0x58
xor r9d, r9d
mov r8d, 0x8f
lea rdx, [rdi + 0x508]
mov rcx, rdi
call fcn.18004e5b0
mov dword [rsp + 0x20], 0x58
xor r9d, r9d
mov r8d, 0x8f
lea rdx, [rdi + 0x4d8]
mov rcx, rdi
call fcn.18004e5b0
mov dword [rsp + 0x20], 0x58
xor r9d, r9d
mov r8d, 0x8f
lea rdx, [rdi + 0x4d0]
mov rcx, rdi
call fcn.18004e5b0
cmp qword [rdi + 0xcf0], rbx
jne 0x180049eff
cmp byte [rdi + 0xcf8], bl
jne 0x180049eff
movzx edx, byte [rdi + 0x3b4]
mov ecx, dword [rdi + 0x3b0]
and ecx, 0x3fff
shl ecx, 0x10
mov eax, dword [rbp - 0x19]
and eax, 0x80000040
or ecx, eax
or ecx, 0x40
mov dword [rbp - 0x19], ecx
and dword [rbp - 0x15], 0xffffff00
mov rax, qword [rdi + 0xce8]
and dword [rbp - 0x11], 0x80000000
and dword [rbp - 0xd], 0xffffff00
and dword [rbp - 9], 0x80000000
and dword [rbp - 5], 0xffffff00
mov dword [rbp - 1], ebx
mov qword [rbp + 7], rax
lea rax, [rbp - 0x59]
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], 2
mov dword [rbp + 0x1f], ebx
mov byte [rbp + 0x23], bl
mov byte [rbp + 0x24], dl
mov byte [rbp + 0x25], 1
mov qword [rsp + 0x40], rbx
mov dword [rsp + 0x38], ebx
mov byte [rsp + 0x30], 1
mov dword [rsp + 0x28], 0xff
mov qword [rsp + 0x20], rbx
mov r9d, 4
mov r8d, 0x70
lea rdx, [rbp - 0x19]
mov rcx, rdi
call fcn.18004ec50
lea r14, [rdi + 0x50]
mov rax, qword [r14]
mov r9, qword [rax + 0x40]
mov ecx, dword [rbp - 0x41]
test ecx, ecx
jne 0x180049d1e
mov ecx, dword [r14 + 0x18]
mov dword [rbp - 0x41], ecx
lea eax, [rcx + 1]
mov dword [r14 + 0x18], eax
mov dword [rbp + 0x77], ecx
lea r8, [r14 + 0x60]
lea rdx, [r14 + 0x20]
mov qword [rsp + 0x20], r9
lea r9, [rbp + 0x77]
mov rcx, r14
call fcn.1800462f0
mov qword [rbp - 0x49], r14
lea rcx, [r14 + 0xa0]
lea rax, [rbp - 0x49]
mov qword [rbp + 0x77], rax
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x39]
call fcn.1800469f0
mov rsi, rbx
nop dword [rax]
mov rax, qword [rdi + 0x30]
cmp qword [rdi + 0x40], rax
jb 0x180049d7c
cmp dword [rdi + 0x18], 3
jne 0x180049f5c
mov rcx, rdi
call fcn.18004e0e0
lea rdx, [0x18004c7a0]
mov rcx, rsi
shr rdx, cl
mov rcx, qword [rdi + 0x38]
mov rax, qword [rdi + 0x40]
mov byte [rcx + rax], dl
inc qword [rdi + 0x40]
add rsi, 8
cmp rsi, 0x40
jb 0x180049d60
mov rax, qword [r14]
mov r9, qword [rax + 0x40]
mov ecx, dword [rbp - 0x51]
test ecx, ecx
jne 0x180049dbe
mov ecx, dword [r14 + 0x18]
mov dword [rbp - 0x51], ecx
lea eax, [rcx + 1]
mov dword [r14 + 0x18], eax
mov dword [rbp + 0x77], ecx
lea r8, [r14 + 0x60]
lea rdx, [r14 + 0x20]
mov qword [rsp + 0x20], r9
lea r9, [rbp + 0x77]
mov rcx, r14
call fcn.1800462f0
mov qword [rbp - 0x59], r14
lea rcx, [r14 + 0xa0]
lea rax, [rbp - 0x59]
mov qword [rbp + 0x77], rax
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x39]
call fcn.1800469f0
nop word [rax + rax]
mov rax, qword [rdi + 0x30]
cmp qword [rdi + 0x40], rax
jb 0x180049e1c
cmp dword [rdi + 0x18], 3
jne 0x180049f7b
mov rcx, rdi
call fcn.18004e0e0
mov rdx, r15
mov rcx, rbx
shr rdx, cl
mov rcx, qword [rdi + 0x40]
mov rax, qword [rdi + 0x38]
mov byte [rcx + rax], dl
inc qword [rdi + 0x40]
add rbx, 8
cmp rbx, 0x40
jb 0x180049e00
mov rcx, qword [rdi + 0x58]
mov rax, qword [rcx]
cmp rax, rcx
je 0x180049e63
nop word [rax + rax]
cmp qword [rax + 0x60], 0
jne 0x180049f9a
mov rax, qword [rax]
cmp rax, rcx
jne 0x180049e50
cmp qword [rdi + 0xc0], 0
jne 0x180049f9a
cmp dword [rdi + 0x18], 3
jne 0x180049ead
mov rcx, rdi
call fcn.18004d520
mov rcx, qword [rdi + 0x28]
mov rax, qword [rcx]
call qword [rax + 0x18]
test al, al
je 0x180049ead
lea r9, [rbp + 0x77]
mov r8d, 0x40
mov rdx, qword [rdi + 0x30]
mov rcx, qword [rdi + 0x38]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180049f3d
mov edx, dword [rbp - 0x51]
test edx, edx
je 0x180049ec7
mov rcx, qword [rbp - 0x59]
test rcx, rcx
je 0x180049ec7
lea r8, [rbp - 0x59]
call fcn.18004d950
nop
mov edx, dword [rbp - 0x41]
test edx, edx
je 0x180049ee1
mov rcx, qword [rbp - 0x49]
test rcx, rcx
je 0x180049ee1
lea r8, [rbp - 0x49]
call fcn.18004d950
nop
mov rax, rdi
mov rbx, qword [rsp + 0x118]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edx, 1
lea rcx, [rbp - 0x39]
call fcn.1800499f0
lea rdx, [0x180151508]
lea rcx, [rbp - 0x39]
call fcn.1800b718c
int3
mov edx, 1
lea rcx, [rbp - 0x39]
call fcn.1800499f0
lea rdx, [0x180151508]
lea rcx, [rbp - 0x39]
call fcn.1800b718c
int3
mov edx, 0xe
lea rcx, [rbp - 0x39]
call fcn.1800499f0
lea rdx, [0x180151508]
lea rcx, [rbp - 0x39]
call fcn.1800b718c
int3
mov edx, 2
lea rcx, [rbp - 0x39]
call fcn.1800499f0
lea rdx, [0x180151508]
lea rcx, [rbp - 0x39]
call fcn.1800b718c
int3
mov edx, 2
lea rcx, [rbp - 0x39]
call fcn.1800499f0
lea rdx, [0x180151508]
lea rcx, [rbp - 0x39]
call fcn.1800b718c
int3
mov edx, 0xb
lea rcx, [rbp - 0x39]
call fcn.1800499f0
lea rdx, [0x180151508]
lea rcx, [rbp - 0x39]
call fcn.1800b718c
int3