Function at 0x140105240
Capabilities:
Allocate or change rwx memory
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], r8
push rdi
push r15
sub rsp, 0x78
mov eax, dword ds:[rdx + 0xf0]
mov r10, rdx
mov r15, rcx
test eax, eax
je 0x1401055e5
cmp dword [rdx + 0xf4], 0
je 0x1401055e5
mov qword ds:[r11 + 8], rbx
xor edi, edi
mov qword [r11 - 0x20], rsi
mov ebx, eax
mov qword [r11 - 0x30], r13
mov edx, edi
movzx r11d, word [r10 + 6]
lea r13, [rcx + 0xc]
add r13, rax
mov qword [rsp + 0x30], r13
mov r9d, dword [r13]
add r9, rcx
test r11d, r11d
je 0x1401052df
movzx esi, word [r10 + 0x14]
nop word [rax + rax]
mov eax, edx
lea rcx, [rax + rax*4]
lea r8, [rsi + rcx*8]
mov ecx, dword [r8 + r10 + 0x24]
lea rax, [rcx + r15]
cmp r9, rax
jb 0x1401052d8
mov eax, dword [r8 + r10 + 0x28]
add rax, rcx
add rax, r15
cmp r9, rax
jb 0x1401052e9
inc edx
cmp edx, r11d
jb 0x1401052b0
mov eax, 0xc0000049
jmp 0x1401055cb
mov edx, dword [r8 + r10 + 0x20]
mov rax, rcx
add rax, r15
je 0x1401052df
test rdx, rdx
je 0x1401052df
mov qword [rsp + 0x40], rax
lea r8, [rsp + 0x38]
lea rax, [rsp + 0x98]
mov qword [rsp + 0x38], rdx
mov r9d, 4
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x50], r14
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
mov r14d, eax
test eax, eax
js 0x1401055c6
nop
cmp dword [rbx + r15 + 4], edi
je 0x140105596
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0x60], r12
nop word [rax + rax]
mov ebp, dword [r13 - 8]
lea rdx, [0x1401c86f8]
mov ebx, dword [r13 - 4]
add rbp, r15
mov r12d, dword [r13]
add rbx, r15
mov esi, dword [r13 + 4]
mov rcx, rbp
mov byte [rsp + 0xa0], dil
add r12, r15
mov qword [rsp + 0x48], rbx
add rsi, r15
call fcn.14016b210
nop dword [rax + rax]
test eax, eax
jne 0x140105579
lea rdx, [0x1401c86f8]
mov rcx, rbp
call fcn.140183a40
test eax, eax
jne 0x1401053ca
mov rbx, qword [sym.ProcessHacker.exe_PhInstanceHandle]
mov r14d, edi
jmp 0x14010545e
mov rbx, qword [rbx]
test rbx, rbx
je 0x1401053da
mov r14d, edi
jmp 0x140105469
mov rdx, 0xffffffffffffffff
inc rdx
cmp byte [rdx + rbp], dil
jne 0x1401053e1
mov rcx, rbp
call sym.ProcessHacker.exe_PhZeroExtendToUtf16Ex
mov rbp, rax
mov rcx, qword [rax + 8]
call fcn.1401047c0
mov rbx, rax
test rax, rax
jne 0x14010543d
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
test rax, rax
je 0x140105425
mov byte [rsp + 0xa0], 1
mov r14d, edi
jmp 0x14010543d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test eax, eax
jle 0x14010543d
movzx r14d, ax
or r14d, 0xc0070000
lea rcx, [rbp - 0x10]
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140105455
call fcn.140106290
test r14d, r14d
js 0x14010558c
nop
test rbx, rbx
je 0x14010558c
mov rax, qword [rsi]
test rax, rax
je 0x140105556
sub r12, rsi
mov r13d, 0x5a4d
test rax, rax
jns 0x1401054e7
movzx edx, word [rsi]
cmp word [rbx], r13w
jne 0x14010553a
mov ecx, dword ds:[rbx + 0x3c]
lea eax, [rcx - 1]
cmp eax, 0xffffffe
ja 0x14010553a
cmp dword [rcx + rbx], 0x4550
jne 0x14010553a
lea r8, [rbx + 0x88]
add r8, rcx
mov eax, dword [r8]
test eax, eax
je 0x14010553a
cmp dword [r8 + 4], edi
je 0x14010553a
mov word [rsp + 0x28], dx
lea r9, [rbx + rax]
mov rcx, rbx
mov qword [rsp + 0x20], rdi
call fcn.140104bd0
jmp 0x14010553d
lea rdx, [rax + 2]
cmp word [rbx], r13w
jne 0x14010553a
mov ecx, dword [rbx + 0x3c]
lea eax, [rcx - 1]
cmp eax, 0xffffffe
ja 0x14010553a
cmp dword [rcx + rbx], 0x4550
jne 0x14010553a
lea r8, [rbx + 0x88]
add r8, rcx
mov eax, dword [r8]
test eax, eax
je 0x14010553a
cmp dword [r8 + 4], edi
je 0x14010553a
lea r9, [rbx + rax]
mov word [rsp + 0x28], di
lea rax, [rdx + r15]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140104bd0
jmp 0x14010553d
mov rax, rdi
mov qword [rsi + r12], rax
add rsi, 8
mov rax, qword [rsi]
test rax, rax
jne 0x140105481
mov r13, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x48]
mov rax, rbx
xchg qword [rcx], rax
cmp rax, rbx
jne 0x140105579
cmp byte [rsp + 0xa0], dil
je 0x140105579
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
add r13, 0x20
mov qword [rsp + 0x30], r13
cmp dword [r13 - 8], edi
jne 0x140105360
mov rbp, qword [rsp + 0x70]
mov r12, qword [rsp + 0x60]
mov r9d, dword ds:[rsp + 0x98]
lea rax, [rsp + 0x98]
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x40]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
mov r14, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x90]
mov r13, qword [rsp + 0x58]
add rsp, 0x78
pop r15
pop rdi
ret
xor edi, edi
mov eax, edi
add rsp, 0x78
pop r15
pop rdi
ret