Function at 0x1400015a0
Capabilities:
Allocate or change rwx memory
Contain obfuscated stackstrings
Link many functions at runtime
Read file via mapping

Disassembly:
push rbp
push rbx
push rsi
push r13
lea rbp, [rsp - 0x3f]
sub rsp, 0x98
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x2f], rax
lea rcx, str.___Detecting_ntdll_hooks_n
call fcn.140001540
lea rcx, [0x1400034f8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtAllocateVirtualMemory
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor esi, esi
mov dword [rbp + 7], 0xb8d18b4c
mov ebx, esi
lea rcx, [0x1400034f8]
mov r13d, 1
mov eax, dword [rax]
cmp eax, dword [rbp + 7]
cmovne ebx, r13d
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtProtectVirtualMemory
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [rbp + 7], 0xb8d18b4c
mov eax, dword [rax]
cmp eax, dword [rbp + 7]
je 0x140001630
inc ebx
lea rcx, [0x1400034f8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtCreateThreadEx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [rbp + 7], 0xb8d18b4c
mov eax, dword [rax]
cmp eax, dword [rbp + 7]
je 0x14000165d
inc ebx
lea rcx, [0x1400034f8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtQueryInformationThread
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [rbp + 7], 0xb8d18b4c
mov eax, dword [rax]
cmp eax, dword [rbp + 7]
je 0x14000168a
inc ebx
test ebx, ebx
je 0x1400019a3
mov qword [rsp + 0xc0], rdi
lea rcx, str.___Unhooking_ntdll_from_a_fresh_memory_alloc_n
mov qword [rsp + 0xc8], r12
mov qword [rsp + 0xd0], r14
mov qword [rsp + 0x90], r15
call fcn.140001540
movdqa xmm0, xmmword [str.C:WindowsSyste_]
movdqu xmmword [rbp + 0xf], xmm0
mov dword [rbp + 0x1f], 0x5c32336d
mov dword [rbp + 0x23], 0x6c64746e
mov dword [rbp + 0x27], 0x6c642e6c
mov word [rbp + 0x2b], 0x6c
mov dword [rbp - 0x19], 0x7865742e
mov word [rbp - 0x15], 0x74
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xorps xmm0, xmm0
lea rcx, [0x1400034f8]
mov rbx, rax
xor eax, eax
mov qword [rbp - 1], rax
movups xmmword [rbp - 0x11], xmm0
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov r9d, 0x18
lea r8, [rbp - 0x11]
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_K32GetModuleInformation]
mov r15, qword [rbp - 0x11]
lea rcx, [rbp + 0xf]
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov dword [rsp + 0x28], esi
mov r8d, r13d
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x28], rsi
xor r9d, r9d
mov rcx, rax
mov dword [rsp + 0x20], esi
xor edx, edx
mov r8d, 0x1000002
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
xor r9d, r9d
mov qword [rsp + 0x20], rsi
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
movsxd r14, dword [r15 + 0x3c]
movzx edi, si
add r14, r15
mov r12, rax
cmp si, word [r14 + 6]
jae 0x140001840
nop dword [rax]
nop word [rax + rax]
movzx ecx, word [r14 + 0x14]
lea r8, [rbp - 0x19]
movzx eax, di
add rcx, r14
lea rbx, [rax*4 + 3]
add rbx, rax
lea rbx, [rcx + rbx*8]
mov rax, rbx
sub r8, rbx
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x1400017e7
inc rax
test ecx, ecx
jne 0x1400017d4
test edx, edx
jne 0x140001832
mov ecx, dword [rbx + 0xc]
lea r9, [rbp + 7]
mov edx, dword [rbx + 8]
add rcx, r15
mov r8d, 0x40
mov dword [rbp + 7], esi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [rbx + 0xc]
mov r8d, dword [rbx + 8]
lea rdx, [rax + r12]
lea rcx, [rax + r15]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [rbx + 0xc]
lea r9, [rbp + 7]
mov edx, dword [rbx + 8]
add rcx, r15
mov r8d, dword [rbp + 7]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
inc di
cmp di, word [r14 + 6]
jb 0x1400017b0
lea rcx, str.___Redefining_Nt_functions_n
call fcn.140001540
lea rcx, [0x1400034f8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtAllocateVirtualMemory
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.NtWriteVirtualMemory
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.NtProtectVirtualMemory
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.NtCreateThreadEx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.NtQueryInformationThread
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, str.___Detecting_hooks_in_new_ntdll_module_n
call fcn.140001540
lea rcx, [0x1400034f8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtAllocateVirtualMemory
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [rbp + 7], 0xb8d18b4c
lea rcx, [0x1400034f8]
mov eax, dword [rax]
cmp eax, dword [rbp + 7]
cmovne esi, r13d
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtProtectVirtualMemory
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r15, qword [rsp + 0x90]
mov r14, qword [rsp + 0xd0]
mov r12, qword [rsp + 0xc8]
mov eax, dword [rax]
mov rdi, qword [rsp + 0xc0]
mov dword [rbp + 7], 0xb8d18b4c
cmp eax, dword [rbp + 7]
je 0x140001932
inc esi
lea rcx, [0x1400034f8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtCreateThreadEx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [rbp + 7], 0xb8d18b4c
mov eax, dword [rax]
cmp eax, dword [rbp + 7]
je 0x14000195f
inc esi
lea rcx, [0x1400034f8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtQueryInformationThread
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [rbp + 7], 0xb8d18b4c
mov eax, dword [rax]
cmp eax, dword [rbp + 7]
je 0x14000198c
inc esi
lea rcx, str.____Unhooking_failed_n
test esi, esi
jne 0x14000199e
lea rcx, str.___Unhooking_works_n
call fcn.140001540
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140001f90
add rsp, 0x98
pop r13
pop rsi
pop rbx
pop rbp
ret