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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [0x42b238]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x24], eax
push dword [esp + 0x48]
call fcn.004a7f30
add esp, 4
mov dword [esp], eax
push edi
call fcn.004a7f30
add esp, 4
mov esi, eax
push ebp
call fcn.004a7f30
add esp, 4
add eax, esi
xor ebx, ebx
inc ebx
lea eax, [eax + eax*2 + 0xf]
push ebx
push eax
call fcn.0043f807
add esp, 8
mov esi, eax
mov edx, edi
mov ecx, esi
push ebp
push dword [esp + 0x44]
call fcn.00494acb
add esp, 8
lea eax, [esp + 0x20]
push eax
push str.SoftwareSimonTathamPuTTYSshHostKeys
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4948bf
push esi
call fcn.0043f9d4
add esp, 4
jmp 0x494ab8
mov eax, dword [esp]
lea edi, [esp + 0x1c]
lea ebx, [eax + 1]
mov dword [edi], ebx
push 1
push ebx
call fcn.0043f807
add esp, 8
lea ecx, [esp + 0x18]
push edi
mov dword [esp + 8], eax
push eax
push ecx
push 0
push esi
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
mov dword [esp + 0xc], eax
je 0x4948fd
cmp eax, 0xea
jne 0x494906
mov ebp, dword [esp + 0x48]
jmp 0x494a60
push 0x40b35e
push dword [esp + 0x48]
call fcn.004a7d00
add esp, 8
mov ebp, dword [esp + 0x48]
test eax, eax
jne 0x494a60
push 0x40eca9
push esi
call fcn.004a7d90
add esp, 8
mov dword [esp + 8], esi
mov ecx, dword [esp + 8]
lea esi, [ecx + eax + 1]
mov ecx, dword [esp]
add ecx, 0xb
xor eax, eax
inc eax
push eax
push ecx
call fcn.0043f807
add esp, 8
mov dword [esp + 0x1c], ebx
mov ebx, eax
push edi
push ebx
lea eax, [esp + 0x20]
push eax
push 0
push esi
mov esi, dword [esp + 0x1c]
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
mov dword [esp + 0xc], eax
jne 0x494a57
cmp dword [esp + 0x18], 1
jne 0x494a57
mov edi, dword [esp + 4]
xor eax, eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov word [edi], 0x7830
push 0x40a072
push ebx
call fcn.004a7d90
add esp, 8
mov esi, eax
mov dword [esp], edi
lea eax, [edi + esi + 1]
mov ebp, esi
mov edi, ebp
mov edx, eax
cmp edi, 2
jl 0x4949cb
lea ebp, [edi - 1]
lea eax, [edx - 1]
mov ecx, ebp
xor ecx, 3
cmp byte [ebx + ecx], 0x30
je 0x4949b1
mov eax, esi
add dword [esp], 2
sar eax, 0x1f
shr eax, 0x1e
add eax, esi
sar eax, 2
test edi, edi
jle 0x4949f2
xor esi, esi
mov ecx, esi
inc esi
xor ecx, 3
mov cl, byte [ebx + ecx]
mov byte [edx], cl
dec edx
cmp edi, esi
jne 0x4949e2
mov ecx, dword [esp]
lea ebx, [ebx + eax*4]
mov ebp, dword [esp + 0x48]
add ecx, edi
cmp byte [ebx], 0
mov edi, ecx
je 0x494a0a
mov byte [edi], 0x2c
inc ebx
inc edi
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 8]
mov byte [edi], 0
inc eax
cmp eax, 2
jne 0x49498f
push ebp
push dword [esp + 8]
call fcn.004a7d00
add esp, 8
mov ebx, dword [esp + 0x14]
test eax, eax
jne 0x494a57
mov edi, dword [esp + 4]
push edi
call fcn.004a7f30
add esp, 4
inc eax
push eax
push edi
mov eax, 1
push eax
push 0
push esi
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push ebx
call fcn.0043f9d4
add esp, 4
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
mov edi, dword [esp + 8]
push edi
call fcn.004a7d00
add esp, 8
mov ebp, eax
push edi
call fcn.0043f9d4
add esp, 4
push esi
call fcn.0043f9d4
add esp, 4
mov ecx, dword [esp + 0xc]
mov ebx, 2
cmp ecx, 0xea
je 0x494ab8
mov eax, dword [esp + 0x18]
test ebp, ebp
je 0x494aae
test ecx, ecx
jne 0x494aae
cmp eax, 1
je 0x494ab8
xor eax, 1
xor ebx, ebx
or ecx, eax
setne bl
mov ecx, dword [esp + 0x24]
call fcn.00497c4a
mov eax, ebx
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret