Function at 0x14004aff0
Capabilities:
Acquire debug privileges

Disassembly:
push rbp
push rbx
push rdi
push r12
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov rax, qword [0x1400f0158]
xor rax, rsp
mov qword [rbp - 0x20], rax
mov rax, qword [rcx]
mov r12, r9
mov r15d, r8d
mov rbx, rdx
mov rdi, rcx
cmp qword [rax + 0x10], 0
jne 0x14004b02f
xor al, al
jmp 0x14004b2de
mov qword [rsp + 0x108], rsi
mov qword [rsp + 0x100], r13
xor r13d, r13d
mov qword [rsp + 0x40], r13
mov qword [rsp + 0xf8], r14
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x40]
lea edx, [r13 + 0x28]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea esi, [r13 + 1]
test eax, eax
jne 0x14004b085
call fcn.140005b40
lea rdx, str.Failed_to_set_dump_privileges__cant_get_process_token_
mov rcx, rax
call fcn.14001eb20
jmp 0x14004b0ea
lea r8, [rsp + 0x54]
mov dword [rsp + 0x50], esi
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x50]
mov r9d, select
mov qword [rsp + 0x28], r13
xor edx, edx
mov dword [rsp + 0x5c], 2
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x14004b0df
call fcn.140005b40
lea rdx, str.Failed_to_set_dump_privileges__cant_adjust_token_privileges_
mov rcx, rax
call fcn.14001eb20
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rdi]
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x14004b1d9
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x10006
mov dword [rsp + 0x44], ntohl
call rdx
xorps xmm0, xmm0
lea rdx, str._i._i._i
movups xmmword [rsp + 0x60], xmm0
mov rsi, rax
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movzx ecx, word [rax + 4]
movzx r9d, word [rax + 2]
movzx r8d, word [rax]
mov dword [rsp + 0x20], ecx
lea rcx, [rsp + 0x60]
call fcn.14004b300
movzx edx, word [rsp + 0x40]
movzx r8d, word [rsp + 0x44]
movzx ecx, word [rsp + 0x42]
cmp dx, word [rsi]
ja 0x14004b18c
jne 0x14004b171
cmp cx, word [rsi + 2]
ja 0x14004b18c
jne 0x14004b171
cmp r8w, word [rsi + 4]
ja 0x14004b18c
call fcn.140005b40
lea r8, [rsp + 0x60]
mov rcx, rax
lea rdx, str.DbgHelp_API_version_is__s
call fcn.14001eb20
jmp 0x14004b1d9
xorps xmm0, xmm0
mov eax, r8d
mov r8d, edx
mov dword [rsp + 0x20], eax
mov r9d, ecx
lea rdx, str._i._i._i
lea rcx, [rbp - 0x60]
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
call fcn.14004b300
call fcn.140005b40
lea r9, [rbp - 0x60]
mov rcx, rax
lea r8, [rsp + 0x60]
lea rdx, str.Failed_to_set_DbgHelp_API_version___s_should_be__s_
call fcn.14001eb20
cmp qword [rbx + 0x18], 8
mov rcx, rbx
mov r14, qword [rdi]
jb 0x14004b1e9
mov rcx, qword [rbx]
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14004b240
call fcn.140005b40
cmp qword [rbx + 0x18], 8
jb 0x14004b227
mov rbx, qword [rbx]
mov r8, rbx
lea rdx, str.Failed_to_open_minidump_file_for_writing:__s
mov rcx, rax
call fcn.14001eb20
xor bl, bl
jmp 0x14004b2c3
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
mov ecx, 0x1fffff
mov r8d, eax
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r10, qword [r14 + 0x10]
mov r9d, 0x40
mov rdi, rax
mov dword [rsp + 0x50], r15d
lea rax, [0x14004af90]
mov qword [rsp + 0x54], r12
mov qword [rsp + 0x40], rax
mov r8, rsi
lea rax, [rsp + 0x40]
mov dword [rsp + 0x5c], 1
mov qword [rsp + 0x30], rax
mov edx, ebx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], r13
mov rcx, rdi
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x48], r14
call r10
test eax, eax
mov rcx, rdi
setne bl
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14, qword [rsp + 0xf8]
movzx eax, bl
mov r13, qword [rsp + 0x100]
mov rsi, qword [rsp + 0x108]
mov rcx, qword [rbp - 0x20]
xor rcx, rsp
call fcn.140071b40
add rsp, 0x110
pop r15
pop r12
pop rdi
pop rbx
pop rbp
ret