Function at 0x140005140
Capabilities:
Check os version

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x418
mov qword [rsp + 0x1e0], 0xfffffffffffffffe
mov rax, qword [0x140051080]
xor rax, rsp
mov qword [rsp + 0x400], rax
mov dword [rsp + 0x80], 0
mov qword [rsp + 0x90], 0
mov qword [rsp + 0xc8], 0
cmp qword [rsp + 0x430], 0
jne 0x1400051e2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9d, 4
mov r8d, 0x206
lea rdx, str.d:_basecodeepm13.5_20190424_spacerecall_spacerecall_spacerecall_adjustprivileges.hpp
lea rcx, str.file:__S__line:__d__error__Ox_x__lasterr___d
call fcn.140003ac0
mov dword [rsp + 0x80], 4
jmp 0x140005d0e
lea rax, [rsp + 0x2e0]
mov rdi, rax
xor eax, eax
mov ecx, 0x114
rep stosb byte [rdi], al
mov dword [rsp + 0x2e0], 0x114
lea rcx, [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x1400052ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x208]
call fcn.140003c40
mov qword [rsp + 0x1a0], rax
mov rax, qword [rsp + 0x1a0]
mov qword [rsp + 0x1a8], rax
mov rcx, qword [rsp + 0x1a8]
call fcn.1400081b0
mov rdx, rax
lea rcx, str.GetVersionEx___failed__err___s
call fcn.140003ac0
nop
lea rcx, [rsp + 0x208]
call fcn.1400082c0
xor eax, eax
cmp eax, 1
je 0x1400052ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9d, 1
mov r8d, 0x20e
lea rdx, str.d:_basecodeepm13.5_20190424_spacerecall_spacerecall_spacerecall_adjustprivileges.hpp
lea rcx, str.file:__S__line:__d__error__Ox_x__lasterr___d
call fcn.140003ac0
mov dword [rsp + 0x80], 1
jmp 0x140005d0e
lea rcx, [rsp + 0x90]
call qword [sym.imp.Secur32.dll_LsaConnectUntrusted]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
je 0x140005369
mov ecx, dword [rsp + 0x70]
call fcn.140003bd0
mov edx, eax
lea rcx, [rsp + 0x228]
call fcn.140003c40
mov qword [rsp + 0x120], rax
mov rax, qword [rsp + 0x120]
mov qword [rsp + 0x128], rax
mov rcx, qword [rsp + 0x128]
call fcn.1400081b0
mov r8, rax
mov edx, dword [rsp + 0x70]
lea rcx, str.GetVersionEx___failed__Status__0x_x____s
call fcn.140003ac0
nop
lea rcx, [rsp + 0x228]
call fcn.1400082c0
xor eax, eax
cmp eax, 1
je 0x140005369
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9d, 1
mov r8d, 0x215
lea rdx, str.d:_basecodeepm13.5_20190424_spacerecall_spacerecall_spacerecall_adjustprivileges.hpp
lea rcx, str.file:__S__line:__d__error__Ox_x__lasterr___d
call fcn.140003ac0
mov dword [rsp + 0x80], 1
jmp 0x140005d0e
lea rax, [rsp + 0xe8]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
mov eax, 0x25
mov word [rsp + 0xe8], ax
movzx eax, word [rsp + 0xe8]
inc rax
mov word [rsp + 0xea], ax
lea rcx, [rsp + 0x8e]
call fcn.1400018f0
movzx ecx, word [rsp + 0xea]
mov r8, rax
mov edx, ecx
lea rcx, [rsp + 0x108]
call fcn.140007a30
nop
movzx eax, word [rsp + 0xe8]
mov qword [rsp + 0x130], rax
xor edx, edx
lea rcx, [rsp + 0x108]
call fcn.140007960
lea rcx, str.MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
mov rdi, rax
mov rsi, rcx
mov rax, qword [rsp + 0x130]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
xor edx, edx
lea rcx, [rsp + 0x108]
call fcn.140007960
mov qword [rsp + 0xf0], rax
mov dword [rsp + 0x88], 0
lea r8, [rsp + 0x88]
lea rdx, [rsp + 0xe8]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.Secur32.dll_LsaLookupAuthenticationPackage]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
je 0x1400054f8
mov ecx, dword [rsp + 0x70]
call fcn.140003bd0
mov edx, eax
lea rcx, [rsp + 0x248]
call fcn.140003c40
mov qword [rsp + 0x138], rax
mov rax, qword [rsp + 0x138]
mov qword [rsp + 0x140], rax
mov rcx, qword [rsp + 0x140]
call fcn.1400081b0
mov r8, rax
mov edx, dword [rsp + 0x70]
lea rcx, str.LsaLookupAuthenticationPackage___failed__Status__0x_x____s
call fcn.140003ac0
nop
lea rcx, [rsp + 0x248]
call fcn.1400082c0
xor eax, eax
cmp eax, 1
je 0x1400054f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9d, 1
mov r8d, 0x225
lea rdx, str.d:_basecodeepm13.5_20190424_spacerecall_spacerecall_spacerecall_adjustprivileges.hpp
lea rcx, str.file:__S__line:__d__error__Ox_x__lasterr___d
call fcn.140003ac0
mov dword [rsp + 0x80], 1
lea rcx, [rsp + 0x108]
call fcn.140007a00
jmp 0x140005d0e
cmp qword [rsp + 0x438], 0
jne 0x140005508
jmp 0x1400056af
lea rdx, [0x1400497b8]
mov rcx, qword [rsp + 0x438]
call fcn.14001f270
test eax, eax
jne 0x140005525
jmp 0x1400056af
lea rdx, str.NT_AUTHORITY
mov rcx, qword [rsp + 0x438]
call fcn.14001f270
test eax, eax
jne 0x140005542
jmp 0x1400056af
lea rdx, str.NT_SERVICE
mov rcx, qword [rsp + 0x438]
call fcn.14001f270
test eax, eax
jne 0x14000555f
jmp 0x1400056af
lea rdx, str.BUILTIN
mov rcx, qword [rsp + 0x438]
call fcn.14001f270
test eax, eax
jne 0x14000557c
jmp 0x1400056af
cmp dword [rsp + 0x2e4], 6
jae 0x14000558b
jmp 0x1400056af
cmp dword [rsp + 0x2e4], 6
jne 0x1400055a4
cmp dword [rsp + 0x2e8], 2
jae 0x1400055a4
jmp 0x1400056af
mov dword [rsp + 0xe0], 0
mov qword [rsp + 0x148], 0
lea rax, [rsp + 0x1e8]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov dword [rsp + 0x1e8], 0xc
mov dword [rsp + 0x1ec], 0x20
mov dword [rsp + 0xe4], 0xc
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x198]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x148]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0xe4]
lea r8, [rsp + 0x1e8]
mov edx, dword [rsp + 0x88]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.Secur32.dll_LsaCallAuthenticationPackage]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
je 0x1400056a5
mov ecx, dword [rsp + 0x70]
call fcn.140003bd0
mov edx, eax
lea rcx, [rsp + 0x268]
call fcn.140003c40
mov qword [rsp + 0x150], rax
mov rax, qword [rsp + 0x150]
mov qword [rsp + 0x158], rax
mov rcx, qword [rsp + 0x158]
call fcn.1400081b0
mov r8, rax
mov edx, dword [rsp + 0x70]
lea rcx, str.LsaCallAuthenticationPackage___failed__Status__0x_x____s
call fcn.140003ac0
nop
lea rcx, [rsp + 0x268]
call fcn.1400082c0
xor eax, eax
test eax, eax
jne 0x1400054f8
mov eax, dword [rsp + 0x80]
and eax, 0xfff
test eax, eax
je 0x1400056d1
lea rcx, [rsp + 0x108]
call fcn.140007a00
jmp 0x140005d0e
mov rax, qword [rsp + 0x430]
mov qword [rsp + 0x160], rax
mov qword [rsp + 0xa8], 0xffffffffffffffff
inc qword [rsp + 0xa8]
mov rax, qword [rsp + 0x160]
mov rcx, qword [rsp + 0xa8]
cmp word [rax + rcx*2], 0
jne 0x1400056ed
mov rax, qword [rsp + 0xa8]
lea rax, [rax + rax + 0x2a]
mov dword [rsp + 0x84], eax
cmp qword [rsp + 0x438], 0
je 0x140005781
mov rax, qword [rsp + 0x438]
mov qword [rsp + 0x168], rax
mov qword [rsp + 0xb0], 0xffffffffffffffff
inc qword [rsp + 0xb0]
mov rax, qword [rsp + 0x168]
mov rcx, qword [rsp + 0xb0]
cmp word [rax + rcx*2], 0
jne 0x140005747
mov rax, qword [rsp + 0xb0]
mov ecx, dword [rsp + 0x84]
lea rax, [rcx + rax*2 + 2]
mov dword [rsp + 0x84], eax
lea rcx, [rsp + 0x8c]
call fcn.1400018f0
mov ecx, dword [rsp + 0x84]
mov r8, rax
mov edx, ecx
lea rcx, [rsp + 0x1c8]
call fcn.140007a30
nop
xor edx, edx
lea rcx, [rsp + 0x1c8]
call fcn.140007960
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov dword [rax], 0xc
mov rax, qword [rsp + 0x78]
add rax, 0x28
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x430]
mov qword [rsp + 0x170], rax
mov qword [rsp + 0xb8], 0xffffffffffffffff
inc qword [rsp + 0xb8]
mov rax, qword [rsp + 0x170]
mov rcx, qword [rsp + 0xb8]
cmp word [rax + rcx*2], 0
jne 0x1400057f4
mov rax, qword [rsp + 0xb8]
movzx eax, ax
shl rax, 1
mov rcx, qword [rsp + 0x78]
mov word [rcx + 8], ax
mov rax, qword [rsp + 0x78]
movzx eax, word [rax + 8]
add rax, 2
mov rcx, qword [rsp + 0x78]
mov word [rcx + 0xa], ax
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x98]
mov qword [rax + 0x10], rcx
mov rax, qword [rsp + 0x78]
movzx eax, word [rax + 8]
mov rcx, qword [rsp + 0x78]
mov rdi, qword [rcx + 0x10]
mov rsi, qword [rsp + 0x430]
mov ecx, eax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x78]
movzx eax, word [rax + 0xa]
mov rcx, qword [rsp + 0x98]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x98], rax
cmp qword [rsp + 0x438], 0
je 0x140005953
mov rax, qword [rsp + 0x438]
mov qword [rsp + 0x178], rax
mov qword [rsp + 0xc0], 0xffffffffffffffff
inc qword [rsp + 0xc0]
mov rax, qword [rsp + 0x178]
mov rcx, qword [rsp + 0xc0]
cmp word [rax + rcx*2], 0
jne 0x1400058b9
mov rax, qword [rsp + 0xc0]
movzx eax, ax
shl rax, 1
mov rcx, qword [rsp + 0x78]
mov word [rcx + 0x18], ax
mov rax, qword [rsp + 0x78]
movzx eax, word [rax + 0x18]
add rax, 2
mov rcx, qword [rsp + 0x78]
mov word [rcx + 0x1a], ax
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x98]
mov qword [rax + 0x20], rcx
mov rax, qword [rsp + 0x78]
movzx eax, word [rax + 0x18]
mov rcx, qword [rsp + 0x78]
mov rdi, qword [rcx + 0x20]
mov rsi, qword [rsp + 0x438]
mov ecx, eax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x78]
movzx eax, word [rax + 0x1a]
mov rcx, qword [rsp + 0x98]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x98], rax
lea rax, [rsp + 0xd0]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
mov eax, 0xf
mov word [rsp + 0xd0], ax
movzx eax, word [rsp + 0xd0]
inc rax
mov word [rsp + 0xd2], ax
lea rcx, [rsp + 0x8d]
call fcn.1400018f0
movzx ecx, word [rsp + 0xd2]
mov r8, rax
mov edx, ecx
lea rcx, [rsp + 0x1b0]
call fcn.140007a30
nop
movzx eax, word [rsp + 0xd0]
mov qword [rsp + 0x180], rax
xor edx, edx
lea rcx, [rsp + 0x1b0]
call fcn.140007960
lea rcx, str.S4U_for_Windows
mov rdi, rax
mov rsi, rcx
mov rax, qword [rsp + 0x180]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
xor edx, edx
lea rcx, [rsp + 0x1b0]
call fcn.140007960
mov qword [rsp + 0xd8], rax
lea rax, [rsp + 0x1f8]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
lea r8, str.S4UWin
mov edx, 8
lea rcx, [rsp + 0x1f8]
call fcn.140020394
lea rcx, [rsp + 0x200]
call qword [sym.imp.ADVAPI32.dll_AllocateLocallyUniqueId]
mov dword [rsp + 0xa4], 0
lea rax, [rsp + 0x100]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
lea rax, [rsp + 0x2a8]
mov rdi, rax
xor eax, eax
mov ecx, 0x30
rep stosb byte [rdi], al
mov dword [rsp + 0xa0], 0
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x2a8]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x448]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x100]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0xa4]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x1f8]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x440]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x84]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x88]
mov r8d, 4
lea rdx, [rsp + 0xd0]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.Secur32.dll_LsaLogonUser]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
je 0x140005bcd
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x2a8]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x448]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x100]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0xa4]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x1f8]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x440]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x84]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x88]
mov r8d, 3
lea rdx, [rsp + 0xd0]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.Secur32.dll_LsaLogonUser]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
je 0x140005cdb
cmp qword [rsp + 0x438], 0
jne 0x140005bf4
lea rax, [0x140049828]
mov qword [rsp + 0xf8], rax
jmp 0x140005c04
mov rax, qword [rsp + 0x438]
mov qword [rsp + 0xf8], rax
mov ecx, dword [rsp + 0x70]
call fcn.140003bd0
mov edx, eax
lea rcx, [rsp + 0x288]
call fcn.140003c40
mov qword [rsp + 0x188], rax
mov rax, qword [rsp + 0x188]
mov qword [rsp + 0x190], rax
mov rcx, qword [rsp + 0x190]
call fcn.1400081b0
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x70]
mov r8, qword [rsp + 0xf8]
mov rdx, qword [rsp + 0x430]
lea rcx, str.LsaLogonUser__s___s__failed__Status__0x_x____s
call fcn.140003ac0
nop
lea rcx, [rsp + 0x288]
call fcn.1400082c0
xor eax, eax
cmp eax, 1
je 0x140005cdb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9d, 1
mov r8d, 0x2a1
lea rdx, str.d:_basecodeepm13.5_20190424_spacerecall_spacerecall_spacerecall_adjustprivileges.hpp
lea rcx, str.file:__S__line:__d__error__Ox_x__lasterr___d
call fcn.140003ac0
mov dword [rsp + 0x80], 1
lea rcx, [rsp + 0x1b0]
call fcn.140007a00
nop
lea rcx, [rsp + 0x1c8]
call fcn.140007a00
nop
lea rcx, [rsp + 0x108]
call fcn.140007a00
jmp 0x140005d0e
lea rcx, [rsp + 0x1b0]
call fcn.140007a00
nop
lea rcx, [rsp + 0x1c8]
call fcn.140007a00
nop
lea rcx, [rsp + 0x108]
call fcn.140007a00
xor eax, eax
test eax, eax
jne 0x14000519e
cmp qword [rsp + 0xc8], 0
je 0x140005d27
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.Secur32.dll_LsaFreeReturnBuffer]
cmp qword [rsp + 0x90], 0
je 0x140005d40
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_LsaClose]
mov eax, dword [rsp + 0x80]
mov rcx, qword [rsp + 0x400]
xor rcx, rsp
call fcn.140017790
add rsp, 0x418
pop rdi
pop rsi
ret