Function at 0x1400021f0
Capabilities:
Enumerate process modules
Execute command
Initialize winsock library
Read file via mapping
Schedule task via at
Terminate process

Disassembly:
push rbx
mov eax, 0x1570
call fcn.1400032a0
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x1550], rax
mov qword [rsp + 0x1580], rbp
lea rcx, str.May_13_2024
mov qword [rsp + 0x1560], r15
call fcn.140001080
lea rcx, reloc.WS2_32.dll_ioctlsocket
call fcn.140001080
lea rcx, str.17:36:58
call fcn.140001080
lea rcx, [0x14000443c]
call fcn.140001080
lea rcx, str.Enter_Your_Name:
call fcn.140001080
mov r8d, 0x64
lea rdx, [0x1400066c0]
lea rcx, [0x140004374]
call fcn.1400010e0
lea rcx, reloc.WS2_32.dll_ioctlsocket
mov byte [0x1400066cb], 0
call fcn.140001080
call qword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov rcx, rax
lea rdx, [rsp + 0x40]
mov rbx, rax
call qword [sym.imp.USER32.dll_GetWindowRect]
mov r8d, dword [rsp + 0x44]
mov r9d, 0x1e0
mov edx, dword [rsp + 0x40]
mov rcx, rbx
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0x113
call qword [sym.imp.USER32.dll_MoveWindow]
xor ebp, ebp
lea r8, [rsp + 0x38]
mov edx, 0x1000
lea rcx, [rsp + 0x1f0]
lea r15d, [rbp - 1]
call qword [sym.imp.PSAPI.DLL_EnumProcesses]
mov eax, dword [rsp + 0x38]
shr eax, 2
test eax, eax
je 0x1400023f9
mov qword [rsp + 0x1588], rsi
lea rsi, [rsp + 0x1f0]
mov qword [rsp + 0x1568], r14
mov r14d, eax
mov qword [rsp + 0x1590], rdi
mov ebx, dword [rsi]
test ebx, ebx
je 0x14000238e
mov r8d, ebx
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x14000238e
lea r9, [rsp + 0x3c]
mov r8d, 8
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.PSAPI.DLL_EnumProcessModules]
test eax, eax
je 0x14000238e
mov rdx, qword [rsp + 0x30]
lea r8, [rsp + 0x1340]
mov r9d, 0x104
mov rcx, rdi
call qword [sym.imp.PSAPI.DLL_GetModuleBaseNameA]
cmp dword [rsp + 0x1340], 0x6b637564
jne 0x14000238e
cmp dword [rsp + 0x1344], 0x74617473
jne 0x14000238e
inc ebp
mov r15d, ebx
add rsi, 4
sub r14, 1
jne 0x140002318
mov r14, qword [rsp + 0x1568]
mov rdi, qword [rsp + 0x1590]
mov rsi, qword [rsp + 0x1588]
test ebp, ebp
je 0x1400023f9
cmp ebp, 1
jle 0x14000241a
lea rcx, str.Multiple_ducks_detected_n
call fcn.140001080
lea rcx, str.Please_use_PID_manually_n_n
call fcn.140001080
lea rcx, str.Enter_DuckStation_PID:
call fcn.140001080
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x11f0]
lea rcx, [0x140004374]
call fcn.1400010e0
jmp 0x140002436
lea rcx, str.DuckStation_not_found_n
call fcn.140001080
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]
mov r9d, r15d
lea r8, [0x1400044c8]
mov edx, 0x64
lea rcx, [rsp + 0x11f0]
call fcn.140001140
lea r9, [rsp + 0x11f0]
mov edx, 0x64
lea r8, str.duckstation__s
lea rcx, [rsp + 0x1200]
call fcn.140001140
lea r9, [rsp + 0x1200]
mov edx, 0x64
lea r8, [0x1400044e0]
lea rcx, [rsp + 0x1270]
call fcn.140001020
xor edx, edx
lea r8, [rsp + 0x1270]
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 r15, qword [rsp + 0x1560]
mov rbp, qword [rsp + 0x1580]
mov qword [0x140006790], rax
test rax, rax
jne 0x1400024ee
lea rcx, str.Error:_Failed_to_open_DuckStation_nTry_again_n
call fcn.140001080
lea rcx, str.pause
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, [0x140004518]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
call main
mov ecx, 0x202
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x140002537
mov rax, qword [0x140006790]
lea rbx, [0x140004550]
add rax, 0xc000
mov qword [0x140006788], rax
nop dword [rax]
movsxd rcx, dword [rax]
inc dword [rax + 0x20]
call qword [rbx + rcx*8]
call 0x140002570
mov rax, qword [0x140006788]
jmp 0x140002520
mov edx, eax
lea rcx, str.WSAStartup_failed_with_error:__d_n
call fcn.140001080
lea rcx, str.pause
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
xor eax, eax
mov rcx, qword [rsp + 0x1550]
xor rcx, rsp
call fcn.1400025c0
add rsp, 0x1570
pop rbx
ret