Function at 0x14004e9d0
Capabilities:
Create process on windows
Impersonate user

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov qword [rbp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1403ad830]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov rsi, rcx
mov r8, rcx
lea rdx, [rcx + 0x30]
lea rcx, [rbp + 0x48]
call fcn.140050170
nop
mov rdx, rax
mov rcx, rsi
call fcn.14001d690
nop
lea rcx, [rbp + 0x48]
call fcn.14001d440
mov rcx, rsi
call fcn.140026e10
test eax, eax
jne 0x14004ea53
mov dword [rsi + 0x150], 0xffffff9c
mov eax, 0xffffff9c
jmp 0x14004f14c
xor r14b, r14b
xor r15d, r15d
mov r13d, r15d
lea rcx, [rsi + 0xa8]
call fcn.140026e10
lea r12d, [r15 + 1]
test eax, eax
jle 0x14004eac5
mov dword [rbp - 0x50], reloc.ODBC32.dll_SQLAllocHandle
mov qword [rbp - 0x48], r15
mov dword [rbp - 0x40], r12d
lea rcx, [rsi + 0xa8]
call fcn.14002aa20
mov rcx, rax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x50]
mov edx, 0x40000000
lea r8d, [r15 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
movzx r14d, r14b
cmp rax, 0xffffffffffffffff
cmovne r14d, r12d
xor edx, edx
lea r8d, [rdx + 0x68]
lea rcx, [rbp - 0x30]
call fcn.140285450
mov dword [rbp - 0x30], SQLDescribeColW
mov dword [rbp + 0xc], r12d
movzx eax, word [rsi + 0x28]
mov word [rbp + 0x10], ax
lea rcx, [rsi + 0x78]
call fcn.14001f680
mov r12, 0xffffffffffffffff
test al, al
jne 0x14004eb46
lea rcx, [rsi + 0x78]
call fcn.140026e10
inc eax
movsxd rbx, eax
mov eax, 2
mul rbx
cmovo rax, r12
mov rcx, rax
call fcn.140283754
mov qword [rbp - 0x20], rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call fcn.140285450
lea rcx, [rsi + 0x78]
call fcn.14002aa20
mov r8, rax
mov rdx, rbx
mov rcx, qword [rbp - 0x20]
call fcn.14029b1d4
test r14b, r14b
je 0x14004eb56
or dword [rbp + 0xc], 0x100
mov qword [rbp + 0x28], r13
xor eax, eax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov rcx, rsi
call fcn.140026e10
inc eax
movsxd rcx, eax
mov eax, 2
mul rcx
cmovo rax, r12
mov rcx, rax
call fcn.140283754
mov r12, rax
mov qword [rsp + 0x70], rax
mov rcx, rsi
call fcn.14002aa20
mov r8, r12
sub r8, rax
nop dword [rax]
movzx edx, word [rax]
mov word [r8 + rax], dx
lea rax, [rax + 2]
test dx, dx
jne 0x14004eba0
lea rcx, [rsi + 0x30]
call fcn.140026e10
test eax, eax
jle 0x14004ebca
lea rcx, [rsi + 0x30]
call fcn.14002aa20
mov r15, rax
movzx edi, r14b
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsi + 0x158], eax
xor eax, eax
mov dword [rsi + 0x15c], eax
mov rdx, qword [rsi + 0x58]
test rdx, rdx
jne 0x14004efbe
lea r12, [rsi + 0xd0]
mov rcx, r12
call fcn.140026e10
test eax, eax
jne 0x14004ec6c
lea rax, [rsp + 0x78]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r15
xor r15d, r15d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], edi
xor r9d, r9d
xor r8d, r8d
mov r12, qword [rsp + 0x70]
mov rdx, r12
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x154], eax
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x14004f030
call fcn.140283144
mov qword [rbp - 0x20], r15
jmp 0x14004f030
lea rdx, str.__lowpriv__
mov rcx, r12
call fcn.14001d8d0
test al, al
jne 0x14004ec96
lea rdx, str.__mediumpriv__
mov rcx, r12
call fcn.14001d8d0
test al, al
je 0x14004ee18
lea rcx, [rsi + 0xf8]
call fcn.14001f680
test al, al
je 0x14004ee18
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp - 0x68]
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14004f034
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
mov r9d, 2
xor r8d, r8d
mov edx, 0x2000000
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x14004ee01
mov qword [rsp + 0x68], rbx
movups xmm0, xmmword [str.S_1_16_4096]
movups xmmword [rbp + 0x48], xmm0
movsd xmm1, qword [0x1402d8dc8]
movsd qword [rbp + 0x58], xmm1
xor eax, eax
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x68], rax
lea rdx, str.__mediumpriv__
mov rcx, r12
call fcn.14001d8d0
test al, al
je 0x14004ed4e
movups xmm0, xmmword [str.S_1_16_8192]
movups xmmword [rbp + 0x48], xmm0
movsd xmm1, qword [0x1402d8de0]
movsd qword [rbp + 0x58], xmm1
lea rdx, [rsp + 0x68]
lea rcx, [rbp + 0x48]
call sub.ADVAPI32.dll_ConvertStringSidToSidW
test eax, eax
je 0x14004edf6
xor eax, eax
mov qword [rbp - 0x58], rax
mov dword [rbp - 0x58], 0x20
mov rcx, qword [rsp + 0x68]
mov qword [rbp - 0x60], rcx
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea r9d, [rax + 0x10]
lea r8, [rbp - 0x60]
mov edx, SQLEndTran
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x14004edeb
lea rax, [rsp + 0x78]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r15
xor eax, eax
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [rsp + 0x70]
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x154], eax
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12, qword [rsp + 0x70]
xor r15d, r15d
jmp 0x14004f030
mov qword [rsp + 0x60], rbx
lea rcx, [rsi + 0x120]
call fcn.14001f680
test al, al
je 0x14004ee58
lea rdx, [0x1402d03c4]
lea rcx, [rbp + 0x48]
call fcn.14001c950
nop
lea rdx, [rbp + 0x48]
lea rcx, [rsi + 0x120]
call fcn.14001d690
nop
lea rcx, [rbp + 0x48]
call fcn.14001d440
lea rcx, [rsi + 0xf8]
call fcn.14002aa20
mov rdi, rax
lea rcx, [rsi + 0x120]
call fcn.14002aa20
mov rbx, rax
mov rcx, r12
call fcn.14002aa20
mov rcx, rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9d, 2
mov r8, rdi
mov rdx, rbx
call qword [sym.imp.ADVAPI32.dll_LogonUserW]
test eax, eax
je 0x14004efb0
mov qword [rbp - 0x70], 0
mov ebx, reloc.ODBC32.dll_SQLFreeStmt
lea r8d, [rbx - 0xf]
mov rdx, qword [rsp + 0x60]
lea rcx, [rbp - 0x70]
call sub.USERENV.dll_CreateEnvironmentBlock
mov ecx, 0x410
test eax, eax
cmovne ebx, ecx
mov dword [rsp + 0x68], ebx
lea rdx, [0x1402d03c4]
lea rcx, [rbp + 0x48]
call fcn.14001c950
nop
xor r8d, r8d
lea rdx, [rbp + 0x48]
lea rcx, [rsi + 0x120]
call fcn.140026070
test al, al
je 0x14004ef0a
xor r15d, r15d
mov edi, r15d
jmp 0x14004ef1c
lea rcx, [rsi + 0x120]
call fcn.14002aa20
mov rdi, rax
xor r15d, r15d
lea rcx, [rsi + 0xf8]
call fcn.14002aa20
mov rbx, rax
mov rcx, r12
call fcn.14002aa20
mov rcx, rax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r15
mov rdx, qword [rbp - 0x70]
mov qword [rsp + 0x38], rdx
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x30], eax
mov r12, qword [rsp + 0x70]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r15
mov r9d, 1
mov r8, rbx
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithLogonW]
mov ebx, eax
lea rcx, [rbp + 0x48]
call fcn.14001d440
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x154], eax
mov rcx, qword [rbp - 0x70]
call sub.USERENV.dll_DestroyEnvironmentBlock
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14004f030
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x154], eax
jmp 0x14004f034
mov qword [rsp + 0x60], rax
xor r8d, r8d
lea rcx, [rsp + 0x60]
call sub.USERENV.dll_CreateEnvironmentBlock
lea rax, [rsp + 0x78]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r15
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x400
mov dword [rsp + 0x28], edi
xor r15d, r15d
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov r8, r12
xor edx, edx
mov rcx, qword [rsi + 0x58]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x154], eax
mov rcx, qword [rsp + 0x60]
call sub.USERENV.dll_DestroyEnvironmentBlock
test ebx, ebx
jne 0x14004f06d
test r14b, r14b
je 0x14004f042
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
call fcn.140283144
mov dword [rsi + 0x150], 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsi + 0x15c], eax
mov eax, dword [rsi + 0x150]
jmp 0x14004f14c
mov rax, qword [rbp - 0x78]
mov dword [rsi + 0x14c], eax
mov rcx, qword [rsp + 0x78]
mov qword [rsi + 0x70], rcx
mov r9, qword [rsi + 0xa0]
test r9, r9
je 0x14004f09f
mov r8, qword [rsi + 0x60]
test r8, r8
je 0x14004f09f
mov edx, eax
call r9
mov rcx, qword [rsp + 0x78]
xor bl, bl
mov eax, dword [rsi + 0x2c]
test eax, eax
js 0x14004f0e1
jne 0x14004f128
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [rsp + 0x68], r15d
lea rdx, [rsp + 0x68]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, 0xffffcfc7
test eax, eax
cmovne ecx, dword [rsp + 0x68]
mov dword [rsi + 0x148], ecx
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14b, r14b
je 0x14004f0ff
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsi + 0x15c], eax
mov rcx, r12
call fcn.140283144
test bl, bl
je 0x14004f143
mov dword [rsi + 0x150], 0xfffffed4
mov eax, 0xfffffed4
jmp 0x14004f14c
imul edx, eax, 0x3e8
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14004f0b5
mov bl, 1
jmp 0x14004f0dc
mov dword [rsi + 0x150], r15d
xor eax, eax
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.140283120
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret