Function at 0x140080124
Capabilities:
Encode data using xor
Query or enumerate registry value
Set registry value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov rdi, r9
mov rbp, r8
mov esi, edx
mov rbx, rcx
mov rax, qword [0x1400d80e0]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rcx, r9
call fcn.140094270
mov r15, rax
call fcn.140064aef
mov r12, rax
lea rdx, str._s__d:
mov rcx, rax
mov r8, rbp
mov r9d, esi
call fcn.140064bfe
mov rcx, rbx
mov rdx, r12
call fcn.14007a3ea
lea rdx, str.SoftwareSimonTathamPuTTYSshHostKeys
lea r8, [rsp + 0x58]
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x1400801b0
mov rcx, r12
call fcn.140064b6c
mov esi, 1
jmp 0x14008040b
lea esi, [r15 + 1]
lea r13, [rsp + 0x54]
mov dword [r13], esi
movsxd rcx, esi
mov edx, 1
xor r8d, r8d
call fcn.140012388
mov r14, rax
mov rdx, qword [r12]
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
test eax, eax
je 0x1400803ba
cmp ebx, 0xea
je 0x1400803ba
lea rdx, [0x1400c3fca]
mov rcx, rbp
call fcn.1400939b0
test eax, eax
jne 0x1400803ba
mov rbp, qword [r12]
lea rdx, [0x1400c63e1]
mov rcx, rbp
call fcn.140093a20
lea rbx, [rax + rbp]
inc rbx
add r15d, 0xb
movsxd rcx, r15d
mov edx, 1
xor r8d, r8d
call fcn.140012388
mov rbp, rax
mov dword [rsp + 0x54], esi
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
mov rdx, rbx
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
test eax, eax
jne 0x1400803b2
cmp dword [rsp + 0x50], 1
jne 0x1400803b2
mov dword [rsp + 0x34], ebx
mov qword [rsp + 0x48], rdi
mov r13b, 1
mov r15, r14
mov qword [rsp + 0x38], rbp
mov r14, rbp
mov qword [rsp + 0x40], r15
mov word [r15], 0x7830
mov rcx, r14
lea rdx, [0x1400c75bb]
call fcn.140093a20
mov rsi, 0xffffffffffffffff
xor edi, edi
mov ecx, eax
mov r10d, ecx
mov rbx, rsi
mov rdx, rdi
lea ecx, [r10 - 1]
movsxd rbp, ecx
xor rbp, 3
cmp byte [r14 + rbp], 0x30
jne 0x1400802ed
lea rsi, [rbx - 1]
lea rdi, [rdx - 1]
cmp r10d, 1
jg 0x1400802c4
lea r8, [r15 + 2]
lea r9d, [rax + 3]
test eax, eax
cmovns r9d, eax
sar r9d, 2
test r10d, r10d
jle 0x140080331
lea ecx, [rax - 1]
lea rsi, [r15 + rcx]
add rsi, 3
mov eax, eax
neg rax
xor ebp, ebp
mov edi, ebp
xor rdi, 3
mov cl, byte [r14 + rdi]
mov byte [rsi + rbx], cl
inc rbp
dec rbx
dec rdx
cmp rax, rdx
jne 0x140080316
movsxd rax, r10d
add r8, rax
movsxd rax, r9d
lea r14, [r14 + rax*4]
cmp byte [r14], 0
je 0x14008034e
inc r14
mov byte [r8], 0x2c
inc r8
mov byte [r8], 0
mov r15, r8
test r13b, 1
mov r13d, 0
jne 0x1400802a4
mov r14, qword [rsp + 0x40]
mov rcx, r14
mov rdi, qword [rsp + 0x48]
mov rdx, rdi
call fcn.1400939b0
test eax, eax
mov ebx, dword [rsp + 0x34]
mov rbp, qword [rsp + 0x38]
jne 0x1400803b2
mov rcx, r14
call fcn.140094270
inc eax
mov rdx, qword [r12]
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
xor r8d, r8d
mov r9d, 1
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, rbp
call fcn.140012402
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, r14
mov rdx, rdi
call fcn.1400939b0
mov edi, eax
mov rcx, r14
call fcn.140012402
mov rcx, r12
call fcn.140064b6c
mov esi, 2
cmp ebx, 0xea
je 0x14008040b
mov eax, dword [rsp + 0x50]
test ebx, ebx
jne 0x140080400
cmp eax, 1
jne 0x140080400
test edi, edi
jne 0x14008040b
xor eax, 1
xor esi, esi
or ebx, eax
setne sil
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140084030
mov eax, esi
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret