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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov eax, dword [0x4b6078]
mov ebx, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
xor eax, esp
mov dword [esp + 0x28], eax
push dword [esp + 0x4c]
call fcn.0047f0f0
add esp, 4
mov edi, eax
call fcn.00456342
push ebx
mov ebx, eax
push dword [esp + 0x4c]
push str._s__d:
push eax
call fcn.00456424
add esp, 0x10
push ebx
push esi
call fcn.00467a26
add esp, 8
lea eax, [esp + 0x24]
push eax
push str.SoftwareSimonTathamPuTTYSshHostKeys
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x46c560
push ebx
call fcn.004563a4
add esp, 4
xor ebx, ebx
inc ebx
jmp 0x46c776
mov dword [esp], edi
inc edi
lea ebp, [esp + 0x20]
xor esi, esi
mov dword [ebp], edi
push esi
push 1
push edi
call fcn.00410b8c
add esp, 0xc
lea ecx, [esp + 0x1c]
push ebp
mov ebp, ecx
mov dword [esp + 8], eax
push eax
push ecx
push esi
mov dword [esp + 0x18], ebx
push dword [ebx]
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
mov dword [esp + 0x10], eax
je 0x46c718
cmp eax, 0xea
je 0x46c718
push 0x4a6886
push dword [esp + 0x4c]
call fcn.0047eec0
add esp, 8
test eax, eax
jne 0x46c718
mov eax, dword [esp + 8]
mov esi, dword [eax]
push 0x4a8ab5
push esi
call fcn.0047ef50
add esp, 8
mov ecx, dword [esp]
xor ebx, ebx
lea esi, [esi + eax + 1]
add ecx, 0xb
xor eax, eax
inc eax
push ebx
push eax
push ecx
call fcn.00410b8c
add esp, 0xc
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], edi
push ecx
mov dword [esp + 0x10], eax
push eax
push ebp
push ebx
push esi
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x46c70c
cmp dword [esp + 0x1c], 1
jne 0x46c70c
mov ebx, dword [esp + 0xc]
mov ebp, dword [esp + 4]
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp], ebp
mov word [ebp], 0x7830
push 0x4a9951
push ebx
call fcn.0047ef50
add esp, 8
mov esi, eax
dec eax
mov ebp, esi
mov edi, ebp
mov edx, eax
cmp ebp, 2
jl 0x46c66b
lea ebp, [edi - 1]
lea eax, [edx - 1]
mov ecx, ebp
xor ecx, 3
cmp byte [ebx + ecx], 0x30
je 0x46c651
mov ebp, dword [esp]
mov eax, esi
mov dword [esp], ebx
sar eax, 0x1f
shr eax, 0x1e
add eax, esi
sar eax, 2
add ebp, 2
test edi, edi
mov dword [esp + 0x18], eax
jle 0x46c6a4
xor esi, esi
mov ecx, edi
mov eax, dword [esp]
mov ebx, ebp
mov ebp, esi
inc esi
xor ebp, 3
mov al, byte [eax + ebp]
mov ebp, ebx
mov byte [ebx + edx], al
dec edx
dec ecx
jne 0x46c68d
mov eax, dword [esp + 0x18]
mov ecx, dword [esp]
add ebp, edi
lea ecx, [ecx + eax*4]
cmp byte [ecx], 0
mov ebx, ecx
je 0x46c6bd
mov byte [ebp], 0x2c
inc ebx
inc ebp
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x4c]
mov byte [ebp], 0
inc ecx
cmp ecx, 2
jne 0x46c631
push eax
push dword [esp + 8]
call fcn.0047eec0
add esp, 8
test eax, eax
jne 0x46c70c
mov esi, dword [esp + 4]
push esi
call fcn.0047f0f0
add esp, 4
inc eax
push eax
push esi
mov eax, 1
push eax
push 0
mov eax, dword [esp + 0x18]
push dword [eax]
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [esp + 0xc]
call fcn.00410c0e
add esp, 4
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [esp + 0x4c]
mov esi, dword [esp + 8]
push esi
call fcn.0047eec0
add esp, 8
mov ebp, eax
push esi
call fcn.00410c0e
add esp, 4
push dword [esp + 8]
call fcn.004563a4
add esp, 4
mov ecx, dword [esp + 0x10]
mov ebx, 2
cmp ecx, 0xea
je 0x46c776
mov eax, dword [esp + 0x1c]
test ebp, ebp
je 0x46c76c
test ecx, ecx
jne 0x46c76c
cmp eax, 1
je 0x46c776
xor eax, 1
xor ebx, ebx
or ecx, eax
setne bl
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0046fa9a
mov eax, ebx
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret