Function at 0x104b1c0
Capabilities:
Impersonate user

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xfa0
mov rax, qword [0x010667f0]
xor rax, rsp
mov qword [rsp + 0xf90], rax
movzx eax, word [0x01001c50]
mov word [rsp + 0x50], ax
lea rax, [rsp + 0x52]
mov rdi, rax
xor eax, eax
mov ecx, 0x3fe
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0xb80], ax
lea rax, [rsp + 0xb82]
mov rdi, rax
xor eax, eax
mov ecx, 0x3fe
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0x780], ax
lea rax, [rsp + 0x782]
mov rdi, rax
xor eax, eax
mov ecx, 0x3fe
rep stosb byte [rdi], al
mov dword [rsp + 0x450], 0
mov rdx, qword [rsp + 0xfb8]
mov rcx, qword [rsp + 0xfb0]
call fcn.01029690
mov dword [rsp + 0x450], eax
cmp dword [rsp + 0x450], 0
je 0x104b3a8
cmp dword [rsp + 0x450], 2
jne 0x104b2cb
mov r9d, 0x200
lea r8, [rsp + 0x50]
mov edx, 0x1b5
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
mov rax, qword [rsp + 0xfb8]
mov r9d, dword [rax + 0x4f0]
lea r8, [rsp + 0x50]
mov edx, 0x200
lea rcx, [rsp + 0x780]
call fcn.01016110
jmp 0x104b336
mov r9d, 0x200
lea r8, [rsp + 0x50]
mov edx, 0x1b3
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
mov rax, qword [rsp + 0xfb8]
add rax, 0x10c
mov rcx, qword [rsp + 0xfb8]
add rcx, 0x656
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xfb8]
mov eax, dword [rax + 0x4f0]
mov dword [rsp + 0x20], eax
mov r9, rcx
lea r8, [rsp + 0x50]
mov edx, 0x200
lea rcx, [rsp + 0x780]
call fcn.01016110
mov r9d, 0x200
lea r8, [rsp + 0x50]
mov edx, 0xdb
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, [rsp + 0x780]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0xfb8]
mov r9d, dword [rax]
lea r8, [rsp + 0x50]
mov edx, 0xfa0
mov rax, qword [rsp + 0xfb8]
mov rcx, qword [rax + 0x990]
call fcn.01016110
mov rax, qword [rsp + 0xfb8]
mov rax, qword [rax + 0x990]
mov word [rax + 0x1f3e], 0
xor eax, eax
jmp 0x104b813
lea r8, [rsp + 0x460]
mov rax, qword [rsp + 0xfb8]
mov edx, dword [rax + 0x4f0]
mov rcx, qword [rsp + 0xfb0]
call fcn.01029480
test eax, eax
je 0x104b751
lea rdx, [rsp + 0x460]
mov rcx, qword [rsp + 0xfb0]
call fcn.0102a380
test eax, eax
je 0x104b686
mov qword [rsp + 0xf80], 0
lea rax, [rsp + 0xf80]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9d, 8
lea r8, [rsp + 0x670]
lea rdx, [rsp + 0x568]
lea rcx, [rsp + 0x460]
call qword [sym.imp.ADVAPI32.dll_LogonUserW]
test eax, eax
je 0x104b4e7
mov rax, qword [rsp + 0xfb8]
add rax, 0x778
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0xf80]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x104b4e7
mov rax, qword [rsp + 0xfb8]
add rax, 0x780
lea r8, [rsp + 0x460]
mov edx, 0x84
mov rcx, rax
call fcn.0105ab90
mov rax, qword [rsp + 0xfb8]
add rax, 0x888
lea r8, [rsp + 0x568]
mov edx, 0x84
mov rcx, rax
call fcn.0105ab90
mov edx, 0x31c
lea rcx, [rsp + 0x460]
call fcn.0102a890
mov rcx, qword [rsp + 0xf80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x104b813
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xf88], eax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x1ff
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x400
mov r8d, dword [rsp + 0xf88]
xor edx, edx
mov ecx, 0x3000
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
cmp dword [rsp + 0xf88], 0x569
jne 0x104b592
mov r9d, 0x200
lea r8, [rsp + 0xb80]
mov edx, 0x1b6
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x460]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x568]
lea r8, [rsp + 0xb80]
mov edx, 0x200
lea rcx, [rsp + 0x780]
call fcn.01016110
jmp 0x104b5eb
mov r9d, 0x200
lea r8, [rsp + 0xb80]
mov edx, 0x1b1
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x460]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x568]
lea r8, [rsp + 0xb80]
mov edx, 0x200
lea rcx, [rsp + 0x780]
call fcn.01016110
mov r9d, 0x200
lea r8, [rsp + 0x50]
mov edx, 0xdb
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, [rsp + 0x780]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0xfb8]
mov r9d, dword [rax]
lea r8, [rsp + 0x50]
mov edx, 0xfa0
mov rax, qword [rsp + 0xfb8]
mov rcx, qword [rax + 0x990]
call fcn.01016110
mov rax, qword [rsp + 0xfb8]
mov rax, qword [rax + 0x990]
mov word [rax + 0x1f3e], 0
mov edx, 0x31c
lea rcx, [rsp + 0x460]
call fcn.0102a890
cmp qword [rsp + 0xf80], 0
je 0x104b681
mov rcx, qword [rsp + 0xf80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x104b74c
mov r9d, 0x200
lea r8, [rsp + 0xb80]
mov edx, 0x1b1
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, [0x01006710]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x460]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x568]
lea r8, [rsp + 0xb80]
mov edx, 0x200
lea rcx, [rsp + 0x780]
call fcn.01016110
mov r9d, 0x200
lea r8, [rsp + 0x50]
mov edx, 0xdb
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, [rsp + 0x780]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0xfb8]
mov r9d, dword [rax]
lea r8, [rsp + 0x50]
mov edx, 0xfa0
mov rax, qword [rsp + 0xfb8]
mov rcx, qword [rax + 0x990]
call fcn.01016110
mov rax, qword [rsp + 0xfb8]
mov rax, qword [rax + 0x990]
mov word [rax + 0x1f3e], 0
jmp 0x104b811
mov r9d, 0x200
lea r8, [rsp + 0x50]
mov edx, 0x1b2
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
mov rax, qword [rsp + 0xfb8]
mov r9d, dword [rax + 0x4f0]
lea r8, [rsp + 0x50]
mov edx, 0x200
lea rcx, [rsp + 0x780]
call fcn.01016110
mov r9d, 0x200
lea r8, [rsp + 0x50]
mov edx, 0xdb
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, [rsp + 0x780]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0xfb8]
mov r9d, dword [rax]
lea r8, [rsp + 0x50]
mov edx, 0xfa0
mov rax, qword [rsp + 0xfb8]
mov rcx, qword [rax + 0x990]
call fcn.01016110
mov rax, qword [rsp + 0xfb8]
mov rax, qword [rax + 0x990]
mov word [rax + 0x1f3e], 0
mov edx, 0x31c
lea rcx, [rsp + 0x460]
call fcn.0102a890
xor eax, eax
mov rcx, qword [rsp + 0xf90]
xor rcx, rsp
call fcn.01059ab0
add rsp, 0xfa0
pop rdi
ret