Function at 0x140001720
Capabilities:
Enumerate processes
Get common file path
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f0]
sub rsp, 0x2f0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x1e0], rax
cmp ecx, 2
jle 0x140001770
lea rcx, str._Usage:_EnvReader.exe__PID__OR_EnvReader.exe
call fcn.140001010
xor eax, eax
jmp 0x140001f05
xor esi, esi
cmp ecx, 2
jne 0x1400017ca
mov rcx, qword [rdx + 8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov edi, eax
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x80], xmm0
mov qword [rbp - 0x70], rax
mov edx, edi
lea rcx, [rbp - 0x80]
call fcn.140001230
nop
mov rax, qword [rbp - 0x78]
mov rdx, qword [rbp - 0x80]
sub rax, rdx
sar rax, 5
test rax, rax
jne 0x140001869
lea rcx, str._Vector_was_returned_empty__an_error_has_occured_or_there_were_no_JX_variables.
call fcn.140001010
mov edi, 1
jmp 0x140001eb5
lea rcx, str.___No_process_id_specified__attempting_to_locate_runelite_process..._n
call fcn.140001010
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140001800
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._Error_obtaining_the_process_snapshot._Error:__u_n
call fcn.140001010
jmp 0x140001853
mov dword [rbp - 0x60], 0x238
mov edi, esi
lea rdx, [rbp - 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x14000184b
nop word [rax + rax]
lea rdx, [rbp - 0x34]
lea rcx, str.RuneLite.exe
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x140001848
lea rdx, [rbp - 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x140001820
jmp 0x14000184b
mov edi, dword [rbp - 0x58]
test edi, edi
jne 0x140001783
lea rcx, str._Could_not_find_runelite_process_pid._n
call fcn.140001010
mov eax, 1
jmp 0x140001f05
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
mov qword [rsp + 0x70], rsi
mov r13d, esi
movabs r15, 0x7fffffffffffffff
movabs r12, 0x8000000000000000
test rax, rax
je 0x140001ab0
mov r12, rsi
nop word [rax + rax]
lea r8, [rdx + r12]
mov rdx, r8
cmp qword [r8 + 0x18], 7
jbe 0x1400018b1
mov rdx, qword [r8]
mov r8, qword [r8 + 0x10]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140002460
mov rcx, rax
lea rdx, [0x140002100]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov rdx, qword [rbp - 0x80]
add rdx, r12
mov rax, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 7
jbe 0x1400018ef
mov rcx, qword [rdx]
mov rdi, rcx
lea r14, [rcx + rax*2]
jmp 0x1400018f6
lea r14, [rdx + rax*2]
mov rdi, rdx
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], rsi
cmp rdi, r14
jne 0x14000191b
mov qword [rsp + 0x58], 0xf
mov byte [rsp + 0x40], 0
jmp 0x140001a09
mov rax, r14
sub rax, rdi
sar rax, 1
mov ebx, 0xf
mov qword [rsp + 0x58], rbx
cmp rax, r15
ja 0x140001f35
cmp rax, rbx
jbe 0x1400019c0
mov rbx, rax
or rbx, 0xf
cmp rbx, r15
jbe 0x14000195f
mov rbx, r15
movabs rax, 0x8000000000000000
add rax, 0x27
jmp 0x140001986
cmp rbx, 0x16
mov eax, 0x16
cmovb rbx, rax
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x1400019a8
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140001f47
mov rcx, rax
call fcn.140002bc0
mov rcx, rax
test rax, rax
je 0x140001b41
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x1400019b6
test rcx, rcx
je 0x1400019b4
call fcn.140002bc0
jmp 0x1400019b6
xor eax, eax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x58], rbx
lea rcx, [rsp + 0x40]
cmp rbx, 0xf
cmova rcx, qword [rsp + 0x40]
movzx eax, byte [rdi]
mov byte [rsi + rcx], al
mov rsi, qword [rsp + 0x50]
inc rsi
mov qword [rsp + 0x50], rsi
add rdi, 2
cmp rdi, r14
je 0x1400019f2
mov rbx, qword [rsp + 0x58]
jmp 0x1400019c0
lea rax, [rsp + 0x40]
cmp qword [rsp + 0x58], 0xf
cmova rax, qword [rsp + 0x40]
mov byte [rax + rsi], 0
xor esi, esi
mov rdx, qword [rsp + 0x68]
cmp rdx, qword [rsp + 0x70]
je 0x140001a38
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [rdx], xmm0
movups xmm1, xmmword [rsp + 0x50]
movups xmmword [rdx + 0x10], xmm1
mov edx, 0xf
mov byte [rsp + 0x40], 0
add qword [rsp + 0x68], 0x20
jmp 0x140001a4c
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140002630
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x140001a84
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001a7f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001b41
call fcn.140002bfc
inc r13d
add r12, 0x20
mov rcx, qword [rbp - 0x78]
mov rdx, qword [rbp - 0x80]
sub rcx, rdx
sar rcx, 5
movsxd rax, r13d
cmp rax, rcx
jb 0x1400018a0
movabs r12, 0x8000000000000000
xor r9d, r9d
xor r8d, r8d
lea r14, [0x140007700]
mov rdx, r14
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
mov edi, 1
test eax, eax
je 0x140001e40
mov rdx, r14
lea rcx, str.___Got_path_to_users_desktop:__s_n
call fcn.140001010
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], rsi
mov rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp byte [r14 + rbx], 0
jne 0x140001b00
cmp rbx, r15
ja 0x140001f41
mov qword [rsp + 0x58], 0xf
cmp rbx, 0xf
ja 0x140001b48
mov qword [rsp + 0x50], rbx
mov r8, rbx
mov rdx, r14
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsp + rbx + 0x40], 0
jmp 0x140001bd4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rax, rbx
or rax, 0xf
cmp rax, r15
jbe 0x140001b78
lea rax, [r12 + 0x27]
mov rcx, rax
call fcn.140002bc0
test rax, rax
je 0x140001dd4
lea rsi, [rax + 0x27]
and rsi, 0xffffffffffffffe0
mov qword [rsi - 8], rax
jmp 0x140001bb1
mov r15, rax
cmp rax, 0x16
mov eax, 0x16
cmovb r15, rax
lea rcx, [r15 + 1]
cmp rcx, 0x1000
jb 0x140001ba4
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140001f3b
jmp 0x140001b59
test rcx, rcx
je 0x140001bb1
call fcn.140002bc0
mov rsi, rax
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], r15
mov r8, rbx
mov rdx, r14
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsi + rbx], 0
xor esi, esi
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x58]
mov rax, rdx
sub rax, rcx
cmp rax, 0x17
jb 0x140001c20
lea rax, [rcx + 0x17]
mov qword [rsp + 0x50], rax
lea rbx, [rsp + 0x40]
cmp rdx, 0xf
cmova rbx, qword [rsp + 0x40]
add rbx, rcx
mov r8d, 0x17
lea rdx, str.credentials.properties
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + 0x17], 0
jmp 0x140001c3f
mov qword [rsp + 0x20], 0x17
lea r9, str.credentials.properties
mov edx, 0x17
lea rcx, [rsp + 0x40]
call fcn.140002260
lea rdx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0xf
cmova rdx, qword [rsp + 0x40]
lea rcx, str.___File_path_will_be:__s_n
call fcn.140001010
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0xf
cmova rcx, qword [rsp + 0x40]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], edi
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jne 0x140001cae
lea rcx, str._File_already_exists_on_desktop__Exiting..._n
call fcn.140001010
jmp 0x140001dfa
mov ecx, esi
mov dword [rsp + 0x78], ecx
mov rax, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x60]
sub rax, rdx
sar rax, 5
test rax, rax
je 0x140001d84
xor ebx, ebx
lea rcx, [rdx + rbx]
mov rdx, qword [rcx + 0x10]
mov r8, qword [rcx + 0x18]
mov rax, r8
sub rax, rdx
cmp rax, 1
jb 0x140001d01
lea rax, [rdx + 1]
mov qword [rcx + 0x10], rax
cmp r8, 0xf
jbe 0x140001cf9
mov rcx, qword [rcx]
mov word [rcx + rdx], 0xa
jmp 0x140001d15
mov qword [rsp + 0x20], rdi
lea r9, [0x1400049d8]
mov rdx, rdi
call fcn.140002260
mov rcx, qword [rsp + 0x60]
add rcx, rbx
mov rdx, rcx
cmp qword [rcx + 0x18], 0xf
jbe 0x140001d2d
mov rdx, qword [rcx]
mov rcx, rdx
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rcx + r8], 0
jne 0x140001d34
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x78]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140001ddb
inc esi
add rbx, 0x20
mov rcx, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x60]
sub rcx, rdx
sar rcx, 5
movsxd rax, esi
cmp rax, rcx
jb 0x140001cd0
mov ecx, dword [rsp + 0x78]
mov edx, ecx
lea rcx, str.___Wrote__d_bytes_to_the_file_on_the_desktop_
call fcn.140001010
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x140001e3a
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001e35
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001e35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._Error_writing_to_the_file_on_desktop._Error:__u_n
call fcn.140001010
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x140001e55
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001e2e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001dd4
call fcn.140002bfc
jmp 0x140001e55
call fcn.140002bfc
xor esi, esi
mov edi, esi
jmp 0x140001e55
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._Could_not_get_path_to_users_folder._Error:__u_n
call fcn.140001010
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140001eb5
mov rdx, qword [rsp + 0x68]
call fcn.140002140
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x60]
sub rdx, rcx
and rdx, 0xffffffffffffffe0
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001ea2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001ea2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002bfc
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rsi
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x140001f03
mov rdx, qword [rbp - 0x78]
call fcn.1400021d0
mov rdx, qword [rbp - 0x70]
mov rcx, qword [rbp - 0x80]
sub rdx, rcx
and rdx, 0xffffffffffffffe0
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001efe
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001efe
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002bfc
mov eax, edi
mov rcx, qword [rbp + 0x1e0]
xor rcx, rsp
call fcn.140002ba0
lea r11, [rsp + 0x2f0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140001210
nop
call fcn.140001170
int3
call fcn.140001210
int3
call fcn.140001170
int3