Function at 0x140002040
Capabilities:
Enumerate processes on remote desktop session host
Get file size
Read file on windows
Terminate process

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r13
push r15
lea rbp, [rsp - 0x120]
sub rsp, 0x220
mov rax, qword [0x140025008]
xor rax, rsp
mov qword [rbp + 0x110], rax
xor ebx, ebx
movsxd r13, ecx
mov r15, rdx
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x4c]
mov dword [rsp + 0x4c], ebx
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r8d, [rbx + 1]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateProcessesW]
test eax, eax
je 0x140002187
mov r11d, dword [rsp + 0x4c]
mov r9d, ebx
test r11d, r11d
je 0x140002187
mov r10, qword [rsp + 0x40]
mov esi, dword [0x140021688]
movups xmm0, xmmword [0x140021678]
movups xmm1, xmmword [str.HPACCESSORYCENTER]
nop dword [rax]
mov eax, r9d
mov r8, rbx
movups xmmword [rsp + 0x58], xmm1
mov dword [rsp + 0x78], esi
movups xmmword [rsp + 0x68], xmm0
lea rcx, [rax + rax*2]
lea rdi, [rcx*8]
cmp r8, 0x22
jge 0x140002126
mov rax, qword [rdi + r10 + 8]
movzx edx, word [r8 + rax]
lea eax, [rdx - 0x61]
cmp ax, 0x19
lea ecx, [rdx - 0x20]
cmova cx, dx
cmp cx, word [rsp + r8 + 0x58]
jne 0x14000211c
add r8, 2
jmp 0x1400020f0
inc r9d
cmp r9d, r11d
jb 0x1400020d0
jmp 0x14000218c
lea rcx, str.Warning:_HPAccessoryCenter_is_running._HPAccessoryCenter_must_be_closed_tu_run_this_update._r_n
call fcn.140001820
mov rax, qword [rsp + 0x40]
xor edx, edx
mov r8d, dword [rdi + rax + 4]
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140002238
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x140002238
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.Successfully_closed_HPAccessoryCenter_r_n_r_n
call fcn.140001820
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r10, qword [rsp + 0x40]
test r10, r10
je 0x14000219f
mov rcx, r10
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x260], r14
lea rax, [0x140025a30]
mov qword [0x1401a1508], rax
mov dword [0x1401a151c], 0x25
cmp r13d, 2
jl 0x140002637
mov rax, qword [r15 + 8]
cmp byte [rax], 0x2d
jne 0x1400023a9
cmp byte [rax + 1], 0x71
jne 0x1400023a9
cmp byte [rax + 2], bl
jne 0x1400023a9
cmp r13d, 2
jle 0x1400022b5
mov r9d, 2
cmp r13, r9
jbe 0x1400022a0
lea r10, [rbp - 0x80]
nop word [rax + rax]
mov r8, qword [r15 + r9*8]
mov eax, ebx
movsx edx, byte [r8]
cmp dl, 0x30
jl 0x14000224e
cmp dl, 0x39
jg 0x14000224e
mov ecx, edx
add ecx, 0xffffffd0
shl eax, 4
add eax, ecx
mov ecx, 1
add r8, rcx
jmp 0x140002216
lea rcx, str.Error:_Unable_to_close_HPAccessoryCenter._Please_close_manually_and_restart_this_application_r_n
call fcn.140001820
mov eax, 0xffffffff
jmp 0x140002735
cmp dl, 0x61
jl 0x14000226c
cmp dl, 0x66
jg 0x140002288
mov ecx, edx
add ecx, 0xffffffa9
shl eax, 4
add eax, ecx
mov ecx, 1
add r8, rcx
jmp 0x140002216
lea ecx, [rdx - 0x41]
cmp cl, 5
ja 0x140002288
mov ecx, edx
add ecx, 0xffffffc9
shl eax, 4
add eax, ecx
mov ecx, 1
add r8, rcx
jmp 0x140002216
or eax, 0x3f00000
inc r9
mov dword [r10], eax
add r10, 4
cmp r9, r13
jl 0x140002210
lea rax, [rbp - 0x80]
mov qword [0x1401a1508], rax
lea eax, [r13 - 2]
mov dword [0x1401a151c], eax
lea r8, [rsp + 0x48]
mov dword [0x140025ac4], 3
call fcn.1400012c0
mov rsi, rax
mov r14d, ebx
mov eax, dword [rsp + 0x48]
test eax, eax
jle 0x1400023a1
mov r15d, eax
nop
mov rcx, qword [rsi]
cmp dword [rcx + 4], 8
jle 0x140002393
cmp dword [rcx + 8], 8
jle 0x140002393
mov ecx, 0x450
call fcn.1400039d0
xor edx, edx
mov qword [rsp + 0x50], rax
mov r8d, 0x450
mov rcx, rax
mov rdi, rax
call fcn.1400053d0
mov rcx, qword [rsi]
mov dl, 1
mov qword [rdi + 0x18], rcx
mov rcx, rdi
mov qword [rdi], rbx
mov qword [rdi + 8], rbx
mov dword [rdi + 0x10], 0xffffffff
mov word [rdi + 0x14], bx
mov byte [rdi + 0x20], bl
mov dword [rdi + 0x24], ebx
mov qword [rdi + 0x28], rbx
mov qword [rdi + 0x30], rbx
mov qword [rdi + 0x38], rbx
mov byte [rdi + 0x40], 1
mov dword [rdi + 0x44], ebx
call fcn.140002910
cmp byte [rdi + 0x15], bl
je 0x14000235d
inc r14d
mov rcx, qword [rdi]
test rcx, rcx
je 0x14000236a
call fcn.140007a00
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140002378
call fcn.140007a00
mov rcx, qword [rdi + 0x18]
test rcx, rcx
je 0x140002386
call fcn.140001750
mov edx, 0x450
mov rcx, rdi
call fcn.140003a0c
add rsi, 8
sub r15, 1
jne 0x1400022e0
mov eax, r14d
jmp 0x14000272d
cmp r13d, 2
jne 0x140002481
cmp byte [rax], 0x2f
mov rcx, rax
jne 0x1400023ca
cmp byte [rax + 1], 0x3f
jne 0x1400023ca
cmp byte [rax + 2], bl
je 0x140002637
cmp byte [rax], 0x2d
jne 0x1400023e6
cmp byte [rax + 1], 0x68
jne 0x1400023e6
cmp byte [rax + 2], bl
jne 0x1400023e6
call fcn.1400019b0
xor eax, eax
jmp 0x14000272d
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x48]
call fcn.140002760
test al, al
je 0x14000246c
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x50]
call fcn.1400018e0
test al, al
je 0x14000246c
mov rcx, qword [r15 + 8]
mov rax, 0xffffffffffffffff
nop word [rax + rax]
cmp byte [rcx + rax + 1], bl
lea rax, [rax + 1]
jne 0x140002420
mov r8, qword [rsp + 0x50]
mov edx, dword [rsp + 0x48]
mov byte [rax + rcx - 1], bl
mov rcx, qword [r15 + 8]
call fcn.140002850
mov rdx, qword [r15 + 8]
test al, al
jne 0x140002459
lea rcx, str.Error_writing_the__s_file_r_n
call fcn.140001820
jmp 0x140002728
lea rcx, str.file__s_generated_r_n
call fcn.140001820
xor eax, eax
jmp 0x14000272d
mov rdx, qword [r15 + 8]
lea rcx, str.Error_reading_the__s_file_r_n
call fcn.140001820
jmp 0x140002728
lea eax, [r13 - 4]
cmp eax, 1
ja 0x140002637
mov rcx, qword [r15 + 0x18]
xor r9d, r9d
mov qword [rsp + 0x30], rbx
xor r8d, r8d
mov dword [rsp + 0x28], ebx
mov edx, 0x80000000
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14000251e
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov ecx, eax
mov dword [rsp + 0x60], edi
call fcn.140007a14
mov qword [rsp + 0x58], rax
mov rsi, rbx
test edi, edi
je 0x140002533
lea rdx, [rax + rsi]
mov dword [rsp + 0x48], ebx
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rbx
mov r8d, edi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140002515
mov eax, dword [rsp + 0x48]
add rsi, rax
sub edi, eax
je 0x140002533
mov rax, qword [rsp + 0x58]
jmp 0x1400024e1
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [r15 + 0x18]
lea rcx, str.Error_reading__s_r_n
call fcn.140001820
jmp 0x140002728
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [r15 + 8]
mov r8d, ebx
mov rdx, qword [r15 + 0x10]
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x64], xmm0
movzx eax, byte [rdx]
cmp al, 0x30
jl 0x140002573
cmp al, 0x39
ja 0x140002573
movzx eax, al
lea r8d, [r8 + r8*4]
inc rdx
lea r8d, [r8 - 0x18]
lea r8d, [rax + r8*2]
movzx eax, byte [rdx]
cmp al, 0x30
jge 0x140002556
mov r9, qword [r15 + 0x18]
lea rdx, [rsp + 0x64]
lea rcx, str.Updating_limited_to__s__d___s__r_n
mov dword [rsp + 0x78], r8d
call fcn.140001820
mov dword [0x1401a1518], 1
lea rax, [rsp + 0x58]
mov qword [0x1401a1510], rax
cmp r13d, 5
jne 0x14000262b
mov rdx, qword [r15 + 0x20]
movsx ecx, byte [rdx]
cmp cl, 0x30
jl 0x1400025d2
cmp cl, 0x39
jg 0x1400025d2
mov eax, ecx
add eax, 0xffffffd0
shl ebx, 4
add ebx, eax
mov eax, 1
add rdx, rax
jmp 0x1400025b1
cmp cl, 0x61
jl 0x1400025f0
cmp cl, 0x66
jg 0x14000260b
mov eax, ecx
add eax, 0xffffffa9
shl ebx, 4
add ebx, eax
mov eax, 1
add rdx, rax
jmp 0x1400025b1
lea eax, [rcx - 0x41]
cmp al, 5
ja 0x14000260b
mov eax, ecx
add eax, 0xffffffc9
shl ebx, 4
add ebx, eax
mov eax, 1
add rdx, rax
jmp 0x1400025b1
or ebx, 0x3f00000
mov dword [0x1401a151c], 1
lea rax, [rsp + 0x50]
mov dword [rsp + 0x50], ebx
mov qword [0x1401a1508], rax
xor ecx, ecx
call fcn.140003800
jmp 0x14000272d
mov dword [0x1401a1518], 0x11
lea rax, [0x140183e10]
mov qword [0x1401a1510], rax
cmp r13d, 1
je 0x14000262b
mov rdx, qword [r15]
lea rcx, str.usage_1:__s_r_n
call fcn.140001820
lea rcx, str.Update_all_updatable_devices:_r_n
call fcn.140001820
mov edi, dword [0x1401a1518]
sub edi, 1
js 0x1400026bc
movsxd rax, edi
lea rbx, [rax + rax*4]
shl rbx, 3
mov rsi, rbx
nop dword [rax]
mov rax, qword [0x1401a1510]
lea rcx, str.___s:_d_r_n
mov r8d, dword [rbx + rax + 0x20]
lea rdx, [rax + 0xc]
add rdx, rsi
call fcn.140001820
add rsi, 0xffffffffffffffd8
lea rbx, [rbx - 0x28]
sub edi, 1
jns 0x140002690
mov rdx, qword [r15]
lea rcx, str._r_nusage_2:__s_product_name_fwVersion_decimal__filename.FW__pid_hex_:_optional__r_n
call fcn.140001820
lea rcx, str.Updates_the_FW_of_a_device_called_product_name_using_provided_USB_pid_if_the_installed_FW_is_lower_than_the_provided_fw_version_r_n_r_n
call fcn.140001820
mov rdx, qword [r15]
lea rcx, str.usage_3:__s_filename.FW2_r_n
call fcn.140001820
lea rcx, str.Exctract_the_.FW_from_a_.FW2_file__for_use_in_usage_2__r_n_r_n
call fcn.140001820
mov rdx, qword [r15]
lea rcx, str.usage_4:__s__h_r_n
call fcn.140001820
lea rcx, str.produced_a_.h_file_from_all_the_.fw_and_.fw2_files_in_the_current_directory_to_integrate_in_the_application_r_n_r_n
call fcn.140001820
mov rdx, qword [r15]
lea rcx, str.usage_4:__s__q__pid_in_hex__list__r_n
call fcn.140001820
lea rcx, str.Query_all_HPAC_devices_for_their_current_FW_version._if_no_pid_are_supplied__scann_all_known_pid__else_only_the_requested_ones_r_n_r_n
call fcn.140001820
mov eax, 0xffffffff
mov r14, qword [rsp + 0x260]
mov rcx, qword [rbp + 0x110]
xor rcx, rsp
call fcn.1400039b0
mov rbx, qword [rsp + 0x268]
add rsp, 0x220
pop r15
pop r13
pop rdi
pop rsi
pop rbp
ret