Function at 0x140020d80
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5d8]
sub rsp, 0x6b0
mov qword [rbp - 0x78], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x1402698e0]
xor rax, rsp
mov qword [rbp + 0x5a0], rax
mov edi, 4
xor r13d, r13d
mov qword [rsp + 0x20], r13
lea r9, str.Getting_service_parameters_from_Windows_Registry
mov r8d, 0x400003e8
movzx edx, di
lea rcx, [0x140270ee0]
call fcn.140022050
mov qword [rsp + 0x58], r13
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x68], r13
mov r9d, 0x20019
lea r8, str.SystemCurrentControlSetServices
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x58]
call fcn.140022450
mov ebx, eax
mov qword [rsp + 0x20], r13
mov r8d, 0x400003e8
lea rcx, [0x140270ee0]
test eax, eax
je 0x140020e4d
mov r14d, 1
lea r9, str.Unable_to_open_registry_key_services:_SystemCurrentControlSetServices
movzx edx, r14w
call fcn.140022050
mov r12, qword [rsp + 0x58]
jmp 0x1400218b4
lea r9, str.Opened_registry_key_services:_SystemCurrentControlSetServices
movzx edx, di
call fcn.140022050
mov qword [rsp + 0x70], r13
mov dword [rsp + 0x78], r13d
mov qword [rbp - 0x80], r13
mov r9d, 0x20019
lea r8, [0x1402719a0]
mov r12, qword [rsp + 0x58]
mov rdx, r12
lea rcx, [rsp + 0x70]
call fcn.140022450
mov ebx, eax
lea r8, [0x1402719a0]
test eax, eax
je 0x140020edb
lea rdx, str.Unable_to_open_registry_key_service_name:__s
lea rcx, [rbp + 0x3a0]
call fcn.140025940
mov r14d, 1
mov qword [rsp + 0x20], r13
lea r9, [rbp + 0x3a0]
mov r8d, 0x400003e8
movzx edx, r14w
lea rcx, [0x140270ee0]
call fcn.140022050
mov r15, qword [rsp + 0x70]
jmp 0x1400218a5
lea rdx, str.Opened_registry_key_service_name_:__s
lea rcx, [rbp + 0x1a0]
call fcn.140025940
mov qword [rsp + 0x20], r13
lea r9, [rbp + 0x1a0]
mov r8d, 0x400003e8
movzx edx, di
lea rcx, [0x140270ee0]
call fcn.140022050
mov qword [rsp + 0x40], r13
mov dword [rsp + 0x48], r13d
mov qword [rsp + 0x50], r13
mov r9d, 0x20019
lea r8, str.Parameters
mov r15, qword [rsp + 0x70]
mov rdx, r15
lea rcx, [rsp + 0x40]
call fcn.140022450
mov ebx, eax
test eax, eax
je 0x140020f75
mov r14d, 1
mov qword [rsp + 0x20], r13
lea r9, str.Unable_to_open_registry_key_parameters:_Parameters
mov r8d, 0x400003e8
movzx edx, r14w
lea rcx, [0x140270ee0]
call fcn.140022050
mov rsi, qword [rsp + 0x40]
jmp 0x140021896
mov dword [rsp + 0x34], 0x208
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.DisplayName
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
or rdi, 0xffffffffffffffff
test eax, eax
jne 0x140021050
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x140021017
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x140020ffa
cmp ecx, 2
jbe 0x140021001
cmp ecx, 7
jne 0x140020ffa
test al, 1
jne 0x140020ffa
mov ecx, eax
shr ecx, 1
cmp ecx, 1
jb 0x140020ffa
mov edx, eax
shr rdx, 1
cmp word [rbp + rdx*2 - 0x72], 0
jne 0x140020ffa
cmp ecx, 1
jbe 0x14002101c
cmp word [rbp + rdx*2 - 0x74], 0
je 0x14002101c
mov word [rbp - 0x70], r13w
jmp 0x140021050
test al, 1
jne 0x140020ffa
shr rax, 1
cmp word [rbp + rax*2 - 0x72], 0
je 0x14002101c
mov word [rbp - 0x70], r13w
jmp 0x140021050
mov word [rbp - 0x70], r13w
lea rcx, [rbp - 0x70]
mov rax, rdi
inc rax
cmp word [rcx + rax*2], 0
jne 0x140021023
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [0x140271998]
call fcn.140024bd0
lea rdx, [rbp - 0x70]
lea rcx, [0x140271738]
call fcn.140002df0
mov qword [rsp + 0x20], r13
lea r9, str.Getting_configuration_file_from_Windows_Registry
mov ebx, 4
mov r8d, 0x400003e8
movzx edx, bx
lea rcx, [0x140270ee0]
call fcn.140022050
mov dword [rsp + 0x34], 0x208
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.ConfigurationFile
mov rsi, qword [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea r14d, [rbx - 3]
test eax, eax
jne 0x140021165
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x140021119
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x140021160
cmp ecx, 2
jbe 0x140021109
cmp ecx, 7
jne 0x140021160
test r14b, al
jne 0x140021160
mov ecx, eax
shr ecx, 1
cmp ecx, r14d
jb 0x140021160
mov edx, eax
shr rdx, 1
cmp word [rbp + rdx*2 - 0x72], 0
jne 0x140021160
cmp ecx, r14d
jbe 0x14002111e
cmp word [rbp + rdx*2 - 0x74], 0
jmp 0x14002115e
test r14b, al
jne 0x140021160
shr rax, 1
cmp word [rbp + rax*2 - 0x72], 0
jmp 0x14002115e
mov word [rbp - 0x70], r13w
lea rcx, [rbp - 0x70]
mov rax, rdi
inc rax
cmp word [rcx + rax*2], 0
jne 0x140021125
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [0x140271948]
call fcn.140024bd0
lea rdx, [rbp - 0x70]
lea rcx, [0x140271138]
call fcn.140002df0
mov r9, qword [0x140271948]
movzx edx, bx
jmp 0x140021170
je 0x14002111e
mov word [rbp - 0x70], r13w
lea r9, str.No_ConfigurationFile_entry
movzx edx, r14w
mov qword [rsp + 0x20], r13
mov r8d, 0x400003e8
lea rcx, [0x140270ee0]
call fcn.140022050
mov dword [rsp + 0x34], 0x208
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.TraceFile
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021260
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x140021227
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x140021209
cmp ecx, 2
jbe 0x140021210
cmp ecx, 7
jne 0x140021209
test r14b, al
jne 0x140021209
mov ecx, eax
shr ecx, 1
cmp ecx, r14d
jb 0x140021209
mov edx, eax
shr rdx, 1
cmp word [rbp + rdx*2 - 0x72], 0
jne 0x140021209
cmp ecx, r14d
jbe 0x14002122c
cmp word [rbp + rdx*2 - 0x74], 0
je 0x14002122c
mov word [rbp - 0x70], r13w
jmp 0x140021260
test r14b, al
jne 0x140021209
shr rax, 1
cmp word [rbp + rax*2 - 0x72], 0
je 0x14002122c
mov word [rbp - 0x70], r13w
jmp 0x140021260
mov word [rbp - 0x70], r13w
lea rcx, [rbp - 0x70]
mov rax, rdi
inc rax
cmp word [rcx + rax*2], 0
jne 0x140021233
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [0x140271990]
call fcn.140024bd0
lea rdx, [rbp - 0x70]
lea rcx, [0x140271638]
call fcn.140002df0
mov dword [rsp + 0x34], 0x208
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.DirectorHost
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14002133d
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x140021300
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x1400212e2
cmp ecx, 2
jbe 0x1400212e9
cmp ecx, 7
jne 0x1400212e2
test r14b, al
jne 0x1400212e2
mov ecx, eax
shr ecx, 1
cmp ecx, r14d
jb 0x1400212e2
mov edx, eax
shr rdx, 1
cmp word [rbp + rdx*2 - 0x72], 0
jne 0x1400212e2
cmp ecx, r14d
jbe 0x140021305
cmp word [rbp + rdx*2 - 0x74], 0
je 0x140021305
mov word [rbp - 0x70], r13w
jmp 0x14002133d
test r14b, al
jne 0x1400212e2
shr rax, 1
cmp word [rbp + rax*2 - 0x72], 0
je 0x140021305
mov word [rbp - 0x70], r13w
jmp 0x14002133d
mov word [rbp - 0x70], r13w
lea rcx, [rbp - 0x70]
mov rax, rdi
nop dword [rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x140021310
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [0x140271950]
call fcn.140024bd0
lea rdx, [rbp - 0x70]
lea rcx, [0x140271238]
call fcn.140002df0
mov r8, qword [0x140271950]
lea rdx, str.DirectorHost___s
lea rcx, [rbp + 0x1a0]
call fcn.140025940
mov qword [rsp + 0x20], r13
lea r9, [rbp + 0x1a0]
mov r8d, 0x400003e8
movzx edx, bx
lea rcx, [0x140270ee0]
call fcn.140022050
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x38], ebx
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [0x140271968]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.DirectorPort
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400213c2
cmp dword [rsp + 0x30], ebx
jne 0x1400213c2
mov r8d, dword [0x140271968]
jmp 0x1400213cf
mov r8d, 0x115c
mov dword [0x140271968], r8d
lea rdx, [0x1401cb810]
lea rcx, [0x140271960]
call fcn.140020c10
mov dword [rsp + 0x34], 0x208
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.MatcherHost
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400214bd
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x140021482
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x140021464
cmp ecx, 2
jbe 0x14002146b
cmp ecx, 7
jne 0x140021464
test r14b, al
jne 0x140021464
mov ecx, eax
shr ecx, 1
cmp ecx, r14d
jb 0x140021464
mov edx, eax
shr rdx, 1
cmp word [rbp + rdx*2 - 0x72], 0
jne 0x140021464
cmp ecx, r14d
jbe 0x140021487
cmp word [rbp + rdx*2 - 0x74], 0
je 0x140021487
mov word [rbp - 0x70], r13w
jmp 0x1400214bd
test r14b, al
jne 0x140021464
shr rax, 1
cmp word [rbp + rax*2 - 0x72], 0
je 0x140021487
mov word [rbp - 0x70], r13w
jmp 0x1400214bd
mov word [rbp - 0x70], r13w
lea rcx, [rbp - 0x70]
mov rax, rdi
nop
inc rax
cmp word [rcx + rax*2], 0
jne 0x140021490
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [0x140271958]
call fcn.140024bd0
lea rdx, [rbp - 0x70]
lea rcx, [0x140271338]
call fcn.140002df0
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x38], ebx
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [0x140271be0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.ListenPort
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021507
cmp dword [rsp + 0x30], ebx
jne 0x140021507
mov r8d, dword [0x140271be0]
jmp 0x140021511
mov r8d, r13d
mov dword [0x140271be0], r13d
lea rdx, [0x1401cb810]
lea rcx, [0x140271bd8]
call fcn.140020c10
mov dword [rsp + 0x34], reloc.WS2_32.dll_select
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.ServerId
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400215fd
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x1400215c4
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x1400215a6
cmp ecx, 2
jbe 0x1400215ad
cmp ecx, 7
jne 0x1400215a6
test r14b, al
jne 0x1400215a6
mov ecx, eax
shr ecx, 1
cmp ecx, r14d
jb 0x1400215a6
mov edx, eax
shr rdx, 1
cmp word [rbp + rdx*2 - 0x72], 0
jne 0x1400215a6
cmp ecx, r14d
jbe 0x1400215c9
cmp word [rbp + rdx*2 - 0x74], 0
je 0x1400215c9
mov word [rbp - 0x70], r13w
jmp 0x1400215fd
test r14b, al
jne 0x1400215a6
shr rax, 1
cmp word [rbp + rax*2 - 0x72], 0
je 0x1400215c9
mov word [rbp - 0x70], r13w
jmp 0x1400215fd
mov word [rbp - 0x70], r13w
lea rcx, [rbp - 0x70]
mov rax, rdi
inc rax
cmp word [rcx + rax*2], 0
jne 0x1400215d0
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [0x140271970]
call fcn.140024bd0
lea rdx, [rbp - 0x70]
lea rcx, [0x140271438]
call fcn.140002df0
mov dword [rsp + 0x34], ebx
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.SystemId
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400216d6
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x14002168f
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x1400216d1
cmp ecx, 2
jbe 0x14002167f
cmp ecx, 7
jne 0x1400216d1
test r14b, al
jne 0x1400216d1
mov ecx, eax
shr ecx, 1
cmp ecx, r14d
jb 0x1400216d1
mov edx, eax
shr rdx, 1
cmp word [rbp + rdx*2 - 0x72], 0
jne 0x1400216d1
cmp ecx, r14d
jbe 0x140021694
cmp word [rbp + rdx*2 - 0x74], 0
jmp 0x1400216cf
test r14b, al
jne 0x1400216d1
shr rax, 1
cmp word [rbp + rax*2 - 0x72], 0
jmp 0x1400216cf
mov word [rbp - 0x70], r13w
lea rcx, [rbp - 0x70]
mov rax, rdi
nop dword [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x1400216a0
mov r8d, eax
lea rdx, [rbp - 0x70]
lea rcx, [0x140271978]
call fcn.140024bd0
lea rdx, [rbp - 0x70]
lea rcx, [0x140271538]
call fcn.140002df0
jmp 0x1400216f8
je 0x140021694
mov word [rbp - 0x70], r13w
mov qword [rsp + 0x20], r13
lea r9, str.No_SystemId_entry
mov r8d, 0x400003e8
movzx edx, r14w
lea rcx, [0x140270ee0]
call fcn.140022050
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x38], ebx
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [0x140271988]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.MaximumThreads
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021742
cmp dword [rsp + 0x30], ebx
jne 0x140021742
mov r8d, dword [0x140271988]
jmp 0x14002174f
mov r8d, 8
mov dword [0x140271988], r8d
lea rdx, [0x1401cb810]
lea rcx, [0x140271980]
call fcn.140020c10
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.ProcessLevel
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test eax, eax
jne 0x1400217f9
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x1400217f4
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x1400217d8
cmp ecx, 2
jbe 0x1400217e4
cmp ecx, 7
jne 0x1400217d8
test r14b, al
jne 0x1400217d8
mov ecx, eax
shr ecx, 1
cmp ecx, r14d
jb 0x1400217d8
mov edx, eax
shr rdx, 1
cmp word [rbp + rdx*2 - 0x72], bx
jne 0x1400217d8
cmp ecx, r14d
jbe 0x1400217f9
cmp word [rbp + rdx*2 - 0x74], bx
je 0x1400217f9
mov word [rbp - 0x70], r13w
mov ebx, reloc.WS2_32.dll_listen
jmp 0x14002181e
test r14b, al
jne 0x1400217d8
shr rax, 1
cmp word [rbp + rax*2 - 0x72], 0
jmp 0x1400217d6
mov word [rbp - 0x70], r13w
test ebx, ebx
jne 0x14002181e
lea rax, [rbp - 0x70]
inc rdi
cmp word [rax + rdi*2], 0
jne 0x140021801
mov r8d, edi
lea rdx, [rbp - 0x70]
lea rcx, [0x140271be8]
call fcn.140024bd0
test rsi, rsi
je 0x140021834
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rsi, r13
mov qword [rsp + 0x40], r13
mov dword [rsp + 0x48], r13d
test r15, r15
je 0x14002184f
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r15, r13
mov qword [rsp + 0x70], r13
mov dword [rsp + 0x78], r13d
test r12, r12
je 0x14002186a
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r12, r13
mov qword [rsp + 0x58], r13
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x20], r13
lea r9, str.Finished_getting_service_parameters_from_Windows_Registry
mov edi, 4
mov r8d, 0x400003e8
movzx edx, di
lea rcx, [0x140270ee0]
call fcn.140022050
nop
test rsi, rsi
je 0x1400218a5
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test r15, r15
je 0x1400218b4
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
test r12, r12
je 0x1400218c2
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rbp + 0x5a0]
xor rcx, rsp
call fcn.14019ac00
lea r11, [rsp + 0x6b0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret