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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
mov ebx, dword [ebp + 0x14]
mov ecx, ebx
push esi
push edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x463501
mov edi, dword [ebp + 8]
sub ecx, edx
inc ecx
mov dword [ebp - 0x1c], ecx
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x463516
mov esi, dword [ebp + 0x10]
sub ecx, edx
mov edx, esi
lea eax, [edx + 1]
mov dword [ebp - 0x20], eax
nop word [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x463530
sub edx, dword [ebp - 0x20]
push 1
lea eax, [edx + 5]
add eax, ecx
lea eax, [eax + eax*2]
push eax
call fcn.0040e5e0
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], eax
push edi
push eax
call fcn.00462a90
add esp, 0x18
lea eax, [ebp - 8]
push eax
push str.SoftwareSimonTathamPuTTYSshHostKeys
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x46358a
push dword [ebp - 4]
call fcn.0040e5c0
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x1c]
push 1
push edi
mov dword [ebp - 0xc], edi
call fcn.0040e5e0
add esp, 8
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0xc]
push ecx
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x463749
cmp eax, 0xea
je 0x463749
mov ecx, 0x4cf7b4
mov al, byte [esi]
cmp al, byte [ecx]
jne 0x4635f0
test al, al
je 0x4635ec
mov al, byte [esi + 1]
cmp al, byte [ecx + 1]
jne 0x4635f0
add esi, 2
add ecx, 2
test al, al
jne 0x4635d0
xor eax, eax
jmp 0x4635f5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x463749
mov esi, dword [ebp - 4]
push 0x4d32fc
push esi
call fcn.004981b0
inc esi
add esi, eax
lea eax, [edi + 0xa]
push 1
push eax
call fcn.0040e5e0
add esp, 0x10
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], edi
push ecx
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x46373e
cmp dword [ebp - 0x14], 1
jne 0x46373e
mov ebx, dword [ebp - 0x10]
mov edi, 2
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edi
nop word [eax + eax]
push 0x4cf22c
mov word [ebx], 0x7830
add ebx, 2
push esi
call fcn.004981b0
mov ecx, eax
add esp, 8
cdq
and edx, 3
add eax, edx
lea edx, [ecx - 1]
sar eax, 2
xor edx, 3
mov dword [ebp - 0x24], eax
cmp byte [edx + esi], 0x30
jne 0x4636a2
cmp ecx, 1
jle 0x4636a2
dec ecx
lea eax, [ecx - 1]
xor eax, 3
cmp byte [eax + esi], 0x30
je 0x463690
xor edx, edx
test ecx, ecx
jle 0x4636c6
lea edi, [ebx - 1]
add edi, ecx
nop dword [eax]
mov eax, edx
lea edi, [edi - 1]
xor eax, 3
inc edx
mov al, byte [eax + esi]
mov byte [edi + 1], al
cmp edx, ecx
jl 0x4636b0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x24]
add ebx, ecx
cmp byte [esi + eax*4], 0
lea esi, [esi + eax*4]
je 0x4636d9
inc esi
mov byte [ebx], 0x2c
inc ebx
sub edi, 1
mov byte [ebx], 0
mov dword [ebp - 0x18], edi
jne 0x463660
mov ebx, dword [ebp + 0x14]
mov ecx, ebx
mov esi, dword [ebp - 0x10]
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x463712
test dl, dl
je 0x46370e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x463712
add eax, 2
add ecx, 2
test dl, dl
jne 0x4636f2
xor eax, eax
jmp 0x463717
sbb eax, eax
or eax, 1
test eax, eax
jne 0x46373e
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x463720
sub ecx, edx
lea eax, [ecx + 1]
push eax
push esi
push 1
push 0
push dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x1c]
call fcn.0040e5c0
add esp, 4
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x10]
mov eax, edx
mov cl, byte [eax]
cmp cl, byte [ebx]
jne 0x463777
test cl, cl
je 0x463773
mov cl, byte [eax + 1]
cmp cl, byte [ebx + 1]
jne 0x463777
add eax, 2
add ebx, 2
test cl, cl
jne 0x463757
xor esi, esi
jmp 0x46377c
sbb esi, esi
or esi, 1
push edx
call fcn.0040e5c0
push dword [ebp - 4]
call fcn.0040e5c0
mov eax, dword [ebp - 0x20]
add esp, 8
cmp eax, 0xea
je 0x4637b9
test eax, eax
jne 0x46357e
cmp dword [ebp - 0x14], 1
jne 0x46357e
neg esi
pop edi
sbb esi, esi
and esi, 2
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret