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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x12f0]
mov eax, 0x13f0
call fcn.1400086d0
sub rsp, rax
mov rax, qword [0x14000c040]
xor rax, rsp
mov qword [rbp + 0x12e0], rax
call qword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov rcx, rax
lea rdx, [rsp + 0x70]
mov rbx, rax
call qword [sym.imp.USER32.dll_GetWindowRect]
mov r8d, dword [rsp + 0x74]
mov r9d, 0x320
mov edx, dword [rsp + 0x70]
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, [0x140009538]
call fcn.140005dc0
lea rcx, str._______________________________________________n
call fcn.140005dc0
lea rcx, str.______________________________________________n
call fcn.140005dc0
lea rcx, str._________________________________________________n
call fcn.140005dc0
lea rcx, str.____________________________________________n_n
call fcn.140005dc0
lea r8, str.15:09:56
lea rdx, str.Jul__8_2024
lea rcx, str._OnlineCTR_Client__press_CTRL__C_to_quit__n_Build__s___s__n_n
call fcn.140005dc0
lea rcx, str.Input:_Enter_Your_Online_Name:
call fcn.140005dc0
mov r8d, 0x64
lea rdx, [0x14000c7a0]
lea rcx, [0x140009a48]
call fcn.140005e20
lea rcx, [0x1400094e8]
mov byte [0x14000c7a9], 0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, [0x140009538]
call fcn.140005dc0
lea rcx, str._______________________________________________n
call fcn.140005dc0
lea rcx, str.______________________________________________n
call fcn.140005dc0
lea rcx, str._________________________________________________n
call fcn.140005dc0
lea rcx, str.____________________________________________n_n
call fcn.140005dc0
lea r8, str.15:09:56
lea rdx, str.Jul__8_2024
lea rcx, str._OnlineCTR_Client__press_CTRL__C_to_quit__n_Build__s___s__n_n
call fcn.140005dc0
lea rdx, [0x14000c7a0]
lea rcx, str._Welcome_to_OnlineCTR__s__n
call fcn.140005dc0
lea rcx, reloc.WS2_32.dll_ioctlsocket
call fcn.140005dc0
xor r13d, r13d
lea r8, [rsp + 0x58]
mov edx, 0x1000
lea rcx, [rbp - 0x80]
mov r14d, r13d
lea r12d, [r13 - 1]
call qword [sym.imp.PSAPI.DLL_EnumProcesses]
mov eax, dword [rsp + 0x58]
shr eax, 2
test eax, eax
je 0x1400077de
mov qword [rsp + 0x1420], rsi
lea rsi, [rbp - 0x80]
mov qword [rsp + 0x1428], r15
mov r15d, eax
mov ebx, dword [rsi]
test ebx, ebx
je 0x1400073a9
mov r8d, ebx
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x1400073a9
lea r9, [rsp + 0x50]
mov r8d, 8
lea rdx, [rsp + 0x60]
mov rcx, rax
call qword [sym.imp.PSAPI.DLL_EnumProcessModules]
test eax, eax
je 0x1400073a9
mov rdx, qword [rsp + 0x60]
lea r8, [rbp + 0x10d0]
mov r9d, 0x104
mov rcx, rdi
call qword [sym.imp.PSAPI.DLL_GetModuleBaseNameA]
cmp dword [rbp + 0x10d0], 0x6b637564
jne 0x1400073a9
cmp dword [rbp + 0x10d4], 0x74617473
jne 0x1400073a9
inc r14d
mov r12d, ebx
add rsi, 4
sub r15, 1
jne 0x140007335
mov r15, qword [rsp + 0x1428]
mov rsi, qword [rsp + 0x1420]
test r14d, r14d
je 0x1400077de
lea rcx, str.Client:_DuckStation_detected_n
call fcn.140005dc0
cmp r14d, 1
jle 0x14000741d
lea rcx, str.Warning:_Multiple_DuckStations_detected_n
call fcn.140005dc0
lea rcx, str.Please_enter_the_PID_manually_n_n
call fcn.140005dc0
lea rcx, str.Input.:_DuckStation_PID:
call fcn.140005dc0
mov r8d, select
lea rdx, [rbp + 0xf80]
lea rcx, [0x140009a48]
call fcn.140005e20
jmp 0x140007438
mov r9d, r12d
lea r8, [0x140009b0c]
mov edx, 0x64
lea rcx, [rbp + 0xf80]
call fcn.140005e80
lea r9, [rbp + 0xf80]
mov edx, 0x64
lea r8, str.duckstation__s
lea rcx, [rbp + 0xf90]
call fcn.140005e80
lea r9, [rbp + 0xf90]
mov edx, 0x64
lea r8, [0x140009b20]
lea rcx, [rbp + 0x1000]
call fcn.140005d10
xor edx, edx
lea r8, [rbp + 0x1000]
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 0x1400074e2
lea rcx, str.Error:_Failed_to_open_DuckStation__n_n
call fcn.140005dc0
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.140005b30
test eax, eax
je 0x14000753f
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.140005dc0
mov eax, 1
mov rcx, qword [rbp + 0x12e0]
xor rcx, rsp
call fcn.1400078c0
mov rbx, qword [rsp + 0x1430]
add rsp, 0x13f0
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret
lea rcx, [0x140005bc0]
call fcn.140007da4
lea rcx, str.Client:_Waiting_for_the_OnlineCTR_binary_to_load...
call fcn.140005dc0
mov rax, qword [0x14000c810]
lea rdi, [0x140009480]
inc byte [rax + 0x28]
cmp dword [rax], 2
jl 0x1400075c5
mov rax, qword [0x14000c818]
test dword [rax + 0x96814], 0x2000
je 0x1400075c5
lea rcx, str._b__b_n
call fcn.140005dc0
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.140005dc0
call fcn.140002150
mov rax, qword [0x14000c810]
mov qword [0x14000c808], r13
mov dword [rax], 0xffffffff
mov eax, dword [str.___]
lea rcx, [0x1400096d4]
mov dword [rsp + 0x50], eax
movzx eax, byte [0x1400096d0]
mov byte [rsp + 0x54], al
movsxd rax, dword [0x14000c770]
movsx edx, byte [rsp + rax + 0x50]
call fcn.140005dc0
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 0x14000761c
dec eax
or eax, 0xfffffffc
inc eax
mov dword [0x14000c770], eax
call fcn.140007880
mov rax, qword [0x14000c810]
movsxd rcx, dword [rax]
test ecx, ecx
js 0x14000763f
call qword [rdi + rcx*8]
mov rax, qword [0x14000c810]
xor r8d, r8d
xor ecx, ecx
cmp dword [rax + 0x11c], 0x1e
lea edx, [r8 + 1]
jne 0x140007667
mov qword [rsp + 0x60], 0xfffffffffffdb610
call qword [sym.imp.KERNEL32.dll_CreateWaitableTimerW]
lea rdx, [rsp + 0x60]
jmp 0x14000767b
mov qword [rsp + 0x68], 0xffffffffffff8ad0
call qword [sym.imp.KERNEL32.dll_CreateWaitableTimerW]
lea rdx, [rsp + 0x68]
mov dword [rsp + 0x28], r13d
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r13
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetWaitableTimer]
mov edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [0x14000c820], r13
je 0x1400077cb
xor r8d, r8d
lea rdx, [rsp + 0x30]
call fcn.140005780
test eax, eax
jle 0x1400077cb
mov ecx, dword [rsp + 0x30]
sub ecx, 2
je 0x1400076f1
cmp ecx, 1
jne 0x140007780
mov rcx, qword [rsp + 0x48]
call fcn.140005ee0
jmp 0x140007780
lea rcx, [0x1400094e8]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, [0x140009538]
call fcn.140005dc0
lea rcx, str._______________________________________________n
call fcn.140005dc0
lea rcx, str.______________________________________________n
call fcn.140005dc0
lea rcx, str._________________________________________________n
call fcn.140005dc0
lea rcx, str.____________________________________________n_n
call fcn.140005dc0
lea r8, str.15:09:56
lea rdx, str.Jul__8_2024
lea rcx, str._OnlineCTR_Client__press_CTRL__C_to_quit__n_Build__s___s__n_n
call fcn.140005dc0
lea rdx, [0x14000c7a0]
lea rcx, str._Welcome_to_OnlineCTR__s__n
call fcn.140005dc0
lea rcx, str._nClient:_Connection_Dropped__Server_Full_or_Server_Offline_...
call fcn.140005dc0
mov rax, qword [0x14000c810]
mov dword [rax], 0xffffffff
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x1400077b6
mov rax, qword [rbx + 0x20]
test rax, rax
je 0x140007798
mov rcx, rbx
call rax
test byte [rbx + 8], 4
jne 0x1400077ad
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x1400077ad
call qword [0x14000c0c8]
mov rcx, rbx
call qword [0x14000c0c8]
xor r8d, r8d
lea rdx, [rsp + 0x30]
call fcn.140005780
test eax, eax
jg 0x1400076d0
mov rax, qword [0x14000c810]
mov dword [rax + 0x118], r13d
jmp 0x140007565
lea rcx, str.Error:_DuckStation_is_not_running__n_n
call fcn.140005dc0
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