Function at 0x140053838
Capabilities:
Impersonate user

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x710
mov rax, qword [0x14009e140]
xor rax, rsp
mov qword [rsp + 0x700], rax
xor r14d, r14d
mov ebp, edx
mov r12, rcx
mov r13, r14
mov ebx, r14d
mov rcx, qword [str.P5_n_]
lea rdi, str.P5_n_
cmp rcx, rdi
je 0x1400538a4
test byte [rcx + 0x1c], 4
je 0x1400538a4
cmp byte [rcx + 0x19], 5
jb 0x1400538a4
mov rcx, qword [rcx + 0x10]
lea edx, [r14 + 0x2e]
lea r8, [0x140008f48]
call fcn.14000ffa8
mov ecx, 0x50
call fcn.140076a54
mov rsi, rax
cmp rax, r14
jne 0x1400538f0
mov rcx, qword [str.P5_n_]
cmp rcx, rdi
je 0x1400538e6
test byte [rcx + 0x1c], 4
je 0x1400538e6
mov edi, 2
cmp byte [rcx + 0x19], dil
jb 0x1400538e6
mov rcx, qword [rcx + 0x10]
lea edx, [rdi + 0x2d]
lea r8, [0x140008f48]
call fcn.14000ffa8
mov eax, 8
jmp 0x140053d15
mov edi, 0x50
xor edx, edx
mov rcx, rax
mov r8, rdi
call sub.msvcrt.dll_memset
lea rcx, [0x1400a3fb0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [rsi], edi
mov eax, dword [0x1400a4040]
mov dword [rsi + 0x40], eax
mov eax, dword [0x1400a4020]
mov edi, 2
mov dword [rsi + 0x20], eax
mov eax, dword [0x1400a4004]
mov dword [rsi + 4], eax
mov eax, dword [0x1400a4008]
mov qword [rsi + 0x10], r14
mov dword [rsi + 8], eax
mov rcx, qword [0x1400a4018]
cmp rcx, r14
je 0x14005398e
call fcn.140077860
mov qword [rsi + 0x18], rax
cmp rax, r14
jne 0x14005398e
lea ebx, [rdi + 6]
mov rcx, qword [str.P5_n_]
lea rbp, str.P5_n_
cmp rcx, rbp
je 0x140053cb1
test byte [rcx + 0x1c], 4
je 0x140053cb1
cmp byte [rcx + 0x19], dil
jb 0x140053cb1
lea edx, [rdi + 0x2e]
jmp 0x140053b03
mov rcx, qword [0x1400a4028]
cmp rcx, r14
je 0x1400539e0
call fcn.140077860
mov qword [rsi + 0x28], rax
cmp rax, r14
jne 0x1400539e0
mov ebx, 8
mov rcx, qword [str.P5_n_]
lea rbp, str.P5_n_
cmp rcx, rbp
je 0x140053cb1
test byte [rcx + 0x1c], 4
je 0x140053cb1
cmp byte [rcx + 0x19], dil
jb 0x140053cb1
lea edx, [rbx + 0x29]
jmp 0x140053b03
mov rcx, qword [0x1400a4030]
cmp rcx, r14
je 0x140053a32
call fcn.140077860
mov qword [rsi + 0x30], rax
cmp rax, r14
jne 0x140053a32
mov ebx, 8
mov rcx, qword [str.P5_n_]
lea rbp, str.P5_n_
cmp rcx, rbp
je 0x140053cb1
test byte [rcx + 0x1c], 4
je 0x140053cb1
cmp byte [rcx + 0x19], dil
jb 0x140053cb1
lea edx, [rbx + 0x2a]
jmp 0x140053b03
lea rdx, [0x14000a050]
mov r9d, 0x2001f
xor r8d, r8d
mov rcx, 0xffffffff80000002
call fcn.14007ac98
mov r13, rax
cmp rax, r14
jne 0x140053aa6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [str.P5_n_]
lea rbp, str.P5_n_
cmp rcx, rbp
je 0x140053cb1
test byte [rcx + 0x1c], 4
je 0x140053cb1
cmp byte [rcx + 0x19], dil
jb 0x140053cb1
mov rcx, qword [rcx + 0x10]
lea r8, [0x140008f48]
mov edx, 0x33
mov r9d, eax
call fcn.1400100e0
jmp 0x140053cb1
lea r8, [0x140009d60]
lea rdx, [0x14000a090]
mov r9d, 1
mov rcx, rax
mov qword [rsp + 0x20], r14
call fcn.1400865c4
mov qword [rsi + 0x38], rax
cmp rax, r14
jne 0x140053b18
mov ebx, 8
mov rcx, qword [str.P5_n_]
lea rbp, str.P5_n_
cmp rcx, rbp
je 0x140053cb1
test byte [rcx + 0x1c], 4
je 0x140053cb1
cmp byte [rcx + 0x19], dil
jb 0x140053cb1
lea edx, [rbx + 0x2c]
mov rcx, qword [rcx + 0x10]
lea r8, [0x140008f48]
call fcn.14000ffa8
jmp 0x140053cb1
cmp ebp, r14d
je 0x140053ca6
cmp dword [0x1400a4008], edi
jne 0x140053ca6
mov rcx, qword [0x1400a4048]
cmp rcx, r14
jne 0x140053c47
lea rcx, [rsp + 0x2f2]
xor edx, edx
mov r8d, 0x400
mov word [rsp + 0x2f0], r14w
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0x42]
xor edx, edx
mov r8d, 0x2a0
mov word [rsp + 0x40], r14w
call sub.msvcrt.dll_memset
mov rcx, qword [0x1400a4030]
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x2f0]
mov r8d, 0x201
mov dword [rsp + 0x20], 0x151
call qword [sym.imp.credui.dll_CredUIParseUserNameW]
mov ebx, eax
cmp eax, r14d
je 0x140053bd7
mov rcx, qword [str.P5_n_]
lea rbp, str.P5_n_
cmp rcx, rbp
je 0x140053cb1
test byte [rcx + 0x1c], 4
je 0x140053cb1
cmp byte [rcx + 0x19], dil
jb 0x140053cb1
mov edx, 0x35
jmp 0x140053c88
mov r8, qword [rsi + 0x38]
lea rax, [rsp + 0x38]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x2f0]
mov r9d, edi
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_LogonUserW]
cmp eax, r14d
jne 0x140053c3b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [str.P5_n_]
lea rbp, str.P5_n_
cmp rcx, rbp
je 0x140053cb1
test byte [rcx + 0x1c], 4
je 0x140053cb1
cmp byte [rcx + 0x19], dil
jb 0x140053cb1
mov edx, 0x36
jmp 0x140053c88
mov rcx, qword [rsp + 0x38]
mov qword [0x1400a4048], rcx
lea r8, [rsp + 0x30]
mov edx, 3
call qword [sym.imp.ADVAPI32.dll_DuplicateToken]
cmp eax, r14d
jne 0x140053c9d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [str.P5_n_]
lea rbp, str.P5_n_
cmp rcx, rbp
je 0x140053cb1
test byte [rcx + 0x1c], 4
je 0x140053cb1
cmp byte [rcx + 0x19], dil
jb 0x140053cb1
mov edx, 0x37
mov rcx, qword [rcx + 0x10]
lea r8, [0x140008f48]
mov r9d, eax
call fcn.1400100e0
jmp 0x140053cb1
mov rax, qword [rsp + 0x30]
mov qword [rsi + 0x48], rax
mov qword [r12], rsi
lea rbp, str.P5_n_
lea rcx, [0x1400a3fb0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp r13, r14
je 0x140053d01
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, r14d
je 0x140053d01
mov rcx, qword [str.P5_n_]
cmp rcx, rbp
je 0x140053d01
test byte [rcx + 0x1c], 4
je 0x140053d01
cmp byte [rcx + 0x19], dil
jb 0x140053d01
mov rcx, qword [rcx + 0x10]
lea r8, [0x140008f48]
mov edx, 0x38
mov r9d, eax
call fcn.1400100e0
cmp ebx, r14d
je 0x140053d13
mov edx, 1
mov rcx, rsi
call fcn.140053d48
mov eax, ebx
mov rcx, qword [rsp + 0x700]
xor rcx, rsp
call fcn.14008c5b0
lea r11, [rsp + 0x710]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret