Function at 0x140007120
Capabilities:
Enumerate process modules
Execute command
Read file via mapping
Schedule task via at
Terminate process

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x1300]
mov eax, 0x1400
call fcn.1400085b0
sub rsp, rax
mov rax, qword [0x14000c040]
xor rax, rsp
mov qword [rbp + 0x12f0], rax
call qword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov rcx, rax
lea rdx, [rsp + 0x78]
mov rbx, rax
call qword [sym.imp.USER32.dll_GetWindowRect]
mov r8d, dword [rsp + 0x7c]
mov r9d, 0x320
mov edx, dword [rsp + 0x78]
mov rcx, rbx
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0x203
call qword [sym.imp.USER32.dll_MoveWindow]
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
lea rcx, [0x140009578]
call fcn.140005cf0
lea rcx, str._______________________________________________n
call fcn.140005cf0
lea rcx, str.______________________________________________n
call fcn.140005cf0
lea rcx, str._________________________________________________n
call fcn.140005cf0
lea rcx, str.____________________________________________n_n
call fcn.140005cf0
lea r8, str.00:54:45
lea rdx, str.Jun__5_2024
lea rcx, str._OnlineCTR_Client__press_CTRL__C_to_quit__n_Build__s___s__n_n
call fcn.140005cf0
lea rcx, str.Input:_Enter_Your_Online_Name:
call fcn.140005cf0
mov r8d, 0x64
lea rdx, [0x14000c7a0]
lea rcx, [0x140009aa0]
call fcn.140005d50
lea rcx, [0x1400094e8]
mov byte [0x14000c7ab], 0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, [0x140009578]
call fcn.140005cf0
lea rcx, str._______________________________________________n
call fcn.140005cf0
lea rcx, str.______________________________________________n
call fcn.140005cf0
lea rcx, str._________________________________________________n
call fcn.140005cf0
lea rcx, str.____________________________________________n_n
call fcn.140005cf0
lea r8, str.00:54:45
lea rdx, str.Jun__5_2024
lea rcx, str._OnlineCTR_Client__press_CTRL__C_to_quit__n_Build__s___s__n_n
call fcn.140005cf0
lea rdx, [0x14000c7a0]
lea rcx, str._Welcome_to_OnlineCTR__s__n
call fcn.140005cf0
lea rcx, reloc.WS2_32.dll_ioctlsocket
call fcn.140005cf0
xor r13d, r13d
lea r8, [rsp + 0x70]
mov edx, 0x1000
lea rcx, [rbp - 0x70]
mov r14d, r13d
lea r12d, [r13 - 1]
call qword [sym.imp.PSAPI.DLL_EnumProcesses]
mov eax, dword [rsp + 0x70]
shr eax, 2
test eax, eax
je 0x140007699
mov qword [rsp + 0x1430], r15
lea rsi, [rbp - 0x70]
mov r15d, eax
mov ebx, dword [rsi]
test ebx, ebx
je 0x140007356
mov r8d, ebx
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x140007356
lea r9, [rsp + 0x68]
mov r8d, 8
lea rdx, [rsp + 0x60]
mov rcx, rax
call qword [sym.imp.PSAPI.DLL_EnumProcessModules]
test eax, eax
je 0x140007356
mov rdx, qword [rsp + 0x60]
lea r8, [rbp + 0x10e0]
mov r9d, 0x104
mov rcx, rdi
call qword [sym.imp.PSAPI.DLL_GetModuleBaseNameA]
cmp dword [rbp + 0x10e0], 0x6b637564
jne 0x140007356
cmp dword [rbp + 0x10e4], 0x74617473
jne 0x140007356
inc r14d
mov r12d, ebx
add rsi, 4
sub r15, 1
jne 0x1400072e2
mov r15, qword [rsp + 0x1430]
test r14d, r14d
je 0x140007699
lea rcx, str.Client:_DuckStation_detected_n
call fcn.140005cf0
cmp r14d, 1
jle 0x1400073c2
lea rcx, str.Warning:_Multiple_DuckStations_detected_n
call fcn.140005cf0
lea rcx, str.Please_enter_the_PID_manually_n_n
call fcn.140005cf0
lea rcx, str.Input.:_DuckStation_PID:
call fcn.140005cf0
mov r8d, select
lea rdx, [rbp + 0xf90]
lea rcx, [0x140009aa0]
call fcn.140005d50
jmp 0x1400073dd
mov r9d, r12d
lea r8, [0x140009b5c]
mov edx, 0x64
lea rcx, [rbp + 0xf90]
call fcn.140005db0
lea r9, [rbp + 0xf90]
mov edx, 0x64
lea r8, str.duckstation__s
lea rcx, [rbp + 0xfa0]
call fcn.140005db0
lea r9, [rbp + 0xfa0]
mov edx, 0x64
lea r8, [0x140009b70]
lea rcx, [rbp + 0x1010]
call fcn.140005c40
xor edx, edx
lea r8, [rbp + 0x1010]
lea ecx, [rdx + 6]
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
xor r9d, r9d
mov qword [rsp + 0x20], 0x800000
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 6]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [0x14000c818], rax
test rax, rax
jne 0x140007487
lea rcx, str.Error:_Failed_to_open_DuckStation__n_n
call fcn.140005cf0
lea rcx, str.pause
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, [0x1400094e8]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
call main
mov rax, qword [0x14000c818]
lea rcx, [rax + 0xc000]
mov qword [0x14000c810], rcx
call fcn.140005a60
test eax, eax
je 0x1400074e8
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Error:_Failed_to_initialize_ENet__n
call fcn.140005cf0
mov eax, 1
mov rcx, qword [rbp + 0x12f0]
xor rcx, rsp
call fcn.1400077a0
lea r11, [rsp + 0x1400]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret
lea rcx, [0x140005af0]
call fcn.140007c84
lea rcx, str.Client:_Waiting_for_the_OnlineCTR_binary_to_load...
call fcn.140005cf0
lea rsi, [0x140009480]
nop word [rax + rax]
mov rax, qword [0x14000c810]
inc byte [rax + 0x24]
cmp dword [rax], 3
jl 0x140007621
mov rax, qword [0x14000c818]
test dword [rax + 0x96814], 0x2000
je 0x140007621
lea rcx, str._b__b_n
call fcn.140005cf0
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]
lea rcx, str.Client:_Disconnected__ID:_DSELECT_...
call fcn.140005cf0
mov rdi, qword [0x14000c808]
mov eax, dword [rdi + 0x38]
test eax, eax
je 0x140007614
add eax, 0xfffffff9
test eax, 0xfffffffd
je 0x14000760c
mov rcx, rdi
call fcn.140001eb0
xor ecx, ecx
mov word [rsp + 0x30], 0xff44
call qword [sym.imp.WS2_32.dll_htonl]
mov ecx, 0x60
mov dword [rsp + 0x34], eax
call qword [0x14000c0c0]
test rax, rax
jne 0x1400075b9
call qword [0x14000c0d0]
jmp 0x1400075ec
movups xmm0, xmmword [rsp + 0x30]
mov rdx, rax
mov rcx, rdi
movups xmm1, xmmword [rsp + 0x40]
mov dword [rax + 0x20], r13d
movups xmmword [rax + 0x28], xmm0
mov word [rax + 0x24], r13w
movups xmm0, xmmword [rsp + 0x50]
mov qword [rax + 0x58], r13
movups xmmword [rax + 0x38], xmm1
movups xmmword [rax + 0x48], xmm0
call fcn.140002340
mov rbx, qword [rdi + 0x10]
call qword [sym.imp.WINMM.dll_timeGetTime]
sub eax, dword [0x14000c6b0]
xor r8d, r8d
xor edx, edx
mov dword [rbx + 0x40], eax
mov rcx, rbx
call fcn.140005100
mov rcx, rdi
call fcn.140001fe0
mov rax, qword [0x14000c810]
mov dword [rax], 0xffffffff
mov eax, dword [str.___]
lea rcx, [0x140009714]
mov dword [rsp + 0x68], eax
movzx eax, byte [0x140009710]
mov byte [rsp + 0x6c], al
movsxd rax, dword [0x14000c770]
movsx edx, byte [rsp + rax + 0x68]
call fcn.140005cf0
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 eax, dword [0x14000c770]
inc eax
and eax, 0x80000003
jge 0x140007678
dec eax
or eax, 0xfffffffc
inc eax
mov dword [0x14000c770], eax
mov rax, qword [0x14000c810]
movsxd rcx, dword [rax]
test ecx, ecx
js 0x14000768f
call qword [rsi + rcx*8]
call fcn.140007740
jmp 0x140007510
lea rcx, str.Error:_DuckStation_is_not_running__n_n
call fcn.140005cf0
lea rcx, str.pause
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3