Function at 0x140004010
Capabilities:
Create process on windows
Spoof parent pid

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x140011040]
xor rax, rsp
mov qword [rbp + 0x68], rax
mov r14, rdx
mov rsi, rcx
xor r15d, r15d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp - 0x70]
mov edx, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x14000406e
lea rcx, str.Privilege_escalation_failed__n
call fcn.140001940
xor al, al
jmp 0x14000440c
lea rcx, [rbp + 0x40]
call fcn.140009800
nop
lea r8, str.WuwaCommandLine
call fcn.140004970
mov rdi, rax
cmp byte [rbp + 0x60], 0
je 0x140004114
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
mov r8d, 0xc
lea rdx, str.explorer.exe
lea rcx, [rsp + 0x60]
call fcn.140003520
nop
lea rcx, [rsp + 0x60]
call fcn.140009400
mov ebx, eax
mov rdx, qword [rsp + 0x78]
cmp rdx, 0xf
jbe 0x140004104
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400040ff
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400043e2
call fcn.14000a6f4
test ebx, ebx
jne 0x140004166
lea rcx, str.Cant_find_explorer_pid_
call fcn.140001940
xor dil, dil
cmp byte [rbp + 0x60], 0
je 0x140004408
mov rdx, qword [rbp + 0x58]
cmp rdx, 0xf
jbe 0x140004408
inc rdx
mov rcx, qword [rbp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004403
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004403
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
cmp byte [rbp + 0x60], 0
je 0x14000442f
lea rdx, [rbp + 0x40]
lea rcx, [rbp + 0x20]
call fcn.1400045b0
nop
lea rdx, [rbp + 0x20]
mov r10, qword [rbp + 0x20]
mov r11, qword [rbp + 0x38]
cmp r11, 0xf
cmova rdx, r10
mov r9, qword [rbp + 0x30]
cmp r9, 1
jb 0x1400041c4
lea rax, [r9 - 1]
mov rcx, r9
cmp rax, r9
cmovb rcx, rax
add rcx, rdx
nop dword [rax]
cmp byte [rcx], 0x5c
je 0x1400041bf
cmp rcx, rdx
je 0x1400041c4
dec rcx
jmp 0x1400041b0
sub rcx, rdx
jmp 0x1400041cb
mov rcx, 0xffffffffffffffff
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
movsxd r8, ecx
cmp r9, r8
cmovb r8, r9
lea rdx, [rbp + 0x20]
cmp r11, 0xf
cmova rdx, r10
lea rcx, [rsp + 0x60]
call fcn.140003520
mov rdx, qword [rbp + 0x38]
cmp rdx, 0xf
jbe 0x14000423b
inc rdx
mov rcx, qword [rbp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004236
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004236
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000a6f4
movups xmm0, xmmword [rsp + 0x60]
movups xmmword [rbp + 0x20], xmm0
movups xmm1, xmmword [rsp + 0x70]
movups xmmword [rbp + 0x30], xmm1
mov r8d, ebx
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x80], r15
lea r9, [rbp - 0x80]
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
mov rcx, qword [rbp - 0x80]
call fcn.14000a80c
mov rbx, rax
lea r9, [rbp - 0x80]
xor r8d, r8d
mov edx, 1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], 8
lea r9, [rbp - 0x78]
xor edx, edx
mov r8d, 0x20000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
test eax, eax
jne 0x1400042da
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.UpdateProcThreadAttribute_failed_____d_._n
call fcn.140001940
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x4c], xmm0
movups xmmword [rbp - 0x3c], xmm0
movups xmmword [rbp - 0x2c], xmm0
movups xmmword [rbp - 0x1c], xmm0
movups xmmword [rbp - 0xc], xmm0
movups xmmword [rbp + 4], xmm0
mov dword [rbp + 0x14], eax
mov dword [rbp - 0x50], 0x70
mov qword [rbp + 0x18], rbx
movups xmmword [rbp - 0x68], xmm0
mov qword [rbp - 0x58], rax
lea rax, [rbp + 0x20]
cmp qword [rbp + 0x38], 0xf
cmova rax, qword [rbp + 0x20]
lea rdx, [rbp + 0x40]
cmp qword [rbp + 0x58], 0xf
cmova rdx, qword [rbp + 0x40]
lea rcx, [rbp - 0x68]
mov qword [rsp + 0x50], rcx
lea rcx, [rbp - 0x50]
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x30], 0x80004
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov r8, rdi
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
setne dil
test eax, eax
je 0x140004386
call fcn.1400048d0
mov rax, qword [rbp - 0x60]
mov qword [r14], rax
mov rax, qword [rbp - 0x68]
mov qword [rsi], rax
jmp 0x14000439e
lea rcx, str.Failed_to_create_game_process._n
call fcn.140001940
lea rcx, str.If_you_have_problem_with_GenshinImpact.exe_path._You_can_change_it_manually_in_cfg.ini._n
call fcn.140001940
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
mov rcx, rbx
call fcn.14000a6f4
nop
mov rdx, qword [rbp + 0x38]
cmp rdx, 0xf
jbe 0x1400043ee
inc rdx
mov rcx, qword [rbp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400043e9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400043e9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000a6f4
mov qword [rbp + 0x30], r15
mov qword [rbp + 0x38], 0xf
mov byte [rbp + 0x20], 0
jmp 0x140004117
call fcn.14000a6f4
movzx eax, dil
mov rcx, qword [rbp + 0x68]
xor rcx, rsp
call fcn.14000a450
mov rbx, qword [rsp + 0x1b0]
add rsp, 0x170
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
call fcn.140002080
nop
int3