Function at 0x442850
Capabilities:
Delete registry value
Get common file path
Get file size
Query or enumerate registry value
Read file on windows
Set current directory
Set registry value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, 1
push esi
push ebx
sub esp, 0x19c
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
inc eax
mov dword [ebp - 0x174], eax
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.00403a80
mov dword [ebp - 0x16c], eax
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov edx, dword [ebp + 0x10]
mov esi, eax
mov dword [esp], edx
call sub.msvcrt.dll_strlen
lea eax, [esi + eax]
lea eax, [eax + eax*2 + 0xf]
mov esi, 1
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00403a80
mov dword [ebp - 0x170], eax
mov eax, dword [ebp + 0x10]
mov edx, ebx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x170]
call fcn.004427d0
mov dword [esp], 0x208
mov ecx, 0x4463d0
mov dword [esp + 4], ecx
call sub.KERNEL32.dll_GetCurrentDirectoryA
sub esp, 8
mov dword [esp], 0x4465f0
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
test eax, eax
je 0x442a60
mov edx, dword [ebp - 0x170]
xor esi, esi
mov ebx, pe_nt_image_headers32
mov dword [esp], edx
call sub.msvcrt.dll_strlen
lea eax, [eax + eax*2 + 0x11]
mov edx, 1
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00403a80
mov edx, eax
mov edi, eax
mov eax, dword [ebp - 0x170]
call fcn.004409e0
mov dword [esp], edi
mov eax, 0x4463b0
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
mov dword [esp + 0x18], esi
mov eax, 1
xor edx, edx
mov dword [esp + 8], eax
mov ecx, 3
mov eax, 0x80000000
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], ebx
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
mov esi, eax
mov dword [esp], 0x4463d0
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
cmp esi, 0xffffffff
je 0x442a50
mov dword [esp], esi
xor eax, eax
mov dword [esp + 4], eax
call sub.KERNEL32.dll_GetFileSize
sub esp, 8
mov ebx, eax
mov eax, 1
mov dword [esp + 4], eax
lea eax, [ebx + 1]
mov dword [esp], eax
call fcn.00403a80
mov dword [ebp - 0x16c], eax
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x15c]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x16c]
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.KERNEL32.dll_ReadFile
mov edx, dword [ebp - 0x16c]
sub esp, 0x14
mov byte [ebx + edx], 0
mov eax, dword [ebp + 0x14]
mov dword [esp], edx
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcmp
mov dword [esp], esi
mov ebx, eax
call sub.KERNEL32.dll_CloseHandle
mov edx, dword [ebp - 0x16c]
sub esp, 4
mov dword [esp], edx
call fcn.00403f40
mov eax, dword [ebp - 0x170]
mov dword [esp], eax
call fcn.00403f40
mov dword [esp], edi
call fcn.00403f40
cmp ebx, 1
sbb edx, edx
not edx
and edx, 2
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
call fcn.00403f40
nop
lea esi, [esi]
mov dword [esp], 0x80000001
lea eax, [ebp - 0x160]
mov dword [esp + 8], eax
mov eax, str.SoftwareSimonTathamPuTTYSshHostKeys
mov dword [esp + 4], eax
call sub.ADVAPI32.DLL_RegOpenKeyA
sub esp, 0xc
test eax, eax
mov edx, 1
jne 0x442a46
mov edx, dword [ebp - 0x174]
lea eax, [ebp - 0x164]
xor edi, edi
lea ebx, [ebp - 0x168]
mov dword [ebp - 0x164], edx
mov dword [esp + 0x14], eax
mov edx, dword [ebp - 0x16c]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp + 0x10], edx
mov eax, dword [ebp - 0x170]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegQueryValueExA
mov dword [ebp - 0x178], eax
sub esp, 0x18
test eax, eax
setne dl
cmp eax, 0xea
setne al
movzx eax, al
test edx, eax
je 0x442b06
cld
mov esi, dword [ebp + 0x10]
mov edi, 0x456637
mov ecx, 4
repe cmpsb byte [esi], byte es:[edi]
je 0x442c13
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x16c]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
cmp dword [ebp - 0x178], 0xea
mov edx, eax
je 0x442b4b
mov eax, dword [ebp - 0x178]
test eax, eax
jne 0x442b69
mov ecx, dword [ebp - 0x168]
cmp ecx, 1
sete al
test edx, edx
setne dl
movzx edx, dl
test eax, edx
je 0x442b66
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegCloseKey
sub esp, 4
mov edx, 2
jmp 0x442a46
dec ecx
je 0x442b89
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegCloseKey
sub esp, 4
lea esp, [ebp - 0xc]
mov edx, 1
pop ebx
mov eax, edx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x100
mov eax, 1
mov ebx, 0x45663c
mov dword [esp + 4], eax
mov edi, 0x33
mov esi, 0x4566d1
call fcn.00403a80
mov dword [esp + 4], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp], 0
call sub.USER32.dll_MessageBoxA
mov ebx, eax
lea eax, [eax - 6]
sub esp, 0x10
cmp eax, 1
jbe 0x442db7
cmp ebx, 6
je 0x442ec8
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegCloseKey
mov eax, dword [ebp - 0x16c]
sub esp, 4
mov dword [esp], eax
call fcn.00403f40
mov edx, dword [ebp - 0x170]
mov dword [esp], edx
call fcn.00403f40
xor edx, edx
jmp 0x442a46
mov esi, 0x4566da
mov dword [esp + 4], esi
mov edx, dword [ebp - 0x170]
mov dword [esp], edx
call sub.msvcrt.dll_strcspn
mov edx, dword [ebp - 0x170]
mov ecx, 1
mov dword [esp + 4], ecx
lea esi, [eax + edx + 1]
mov eax, dword [ebp - 0x174]
add eax, 0xa
mov dword [esp], eax
call fcn.00403a80
mov dword [ebp - 0x17c], eax
mov eax, dword [ebp - 0x174]
lea edx, [ebp - 0x164]
mov dword [ebp - 0x164], eax
mov dword [esp + 0x14], edx
mov eax, dword [ebp - 0x17c]
xor edx, edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edx
mov dword [esp + 0x10], eax
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegQueryValueExA
mov dword [ebp - 0x178], eax
sub esp, 0x18
test eax, eax
jne 0x442b06
cmp dword [ebp - 0x168], 1
jne 0x442b06
mov edi, dword [ebp - 0x16c]
mov eax, 1
mov esi, dword [ebp - 0x17c]
mov dword [ebp - 0x180], eax
mov byte [edi], 0x30
mov eax, 0x4566dc
inc edi
mov byte [edi], 0x78
inc edi
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcspn
mov ecx, eax
test ecx, ecx
js 0x442ec0
sar eax, 2
mov dword [ebp - 0x184], eax
jmp 0x442cf5
mov ecx, ebx
lea ebx, [ecx - 1]
mov eax, ebx
xor eax, 3
cmp byte [esi + eax], 0x30
sete dl
xor eax, eax
cmp ecx, 1
setg al
test edx, eax
jne 0x442cf3
xor ebx, ebx
jmp 0x442d26
mov edx, ebx
mov eax, ecx
xor edx, 3
movzx edx, byte [esi + edx]
sub eax, ebx
inc ebx
mov byte [edi + eax - 1], dl
cmp ebx, ecx
jl 0x442d14
mov edx, dword [ebp - 0x184]
add edi, ecx
lea esi, [esi + edx*4]
cmp byte [esi], 0
je 0x442d3f
mov byte [edi], 0x2c
inc esi
inc edi
dec dword [ebp - 0x180]
jns 0x442cc5
mov byte [edi], 0
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x16c]
mov dword [esp], edx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x442b06
mov eax, dword [ebp - 0x16c]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
inc eax
mov dword [esp + 0x14], eax
mov edx, dword [ebp - 0x16c]
mov eax, 1
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 0x10], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x170]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegSetValueExA
sub esp, 0x18
jmp 0x442b06
mov dword [esp], 0x4465f0
lea eax, [ebp - 0x158]
mov dword [esp + 4], eax
call sub.KERNEL32.dll_FindFirstFileA
sub esp, 8
cmp eax, 0xffffffff
mov esi, eax
je 0x442f34
mov dword [esp], esi
call sub.KERNEL32.dll_FindClose
sub esp, 4
mov dword [esp], 0x4465f0
call sub.KERNEL32.dll_SetCurrentDirectoryA
mov edx, dword [ebp - 0x170]
sub esp, 4
mov dword [esp], edx
call sub.msvcrt.dll_strlen
lea eax, [eax + eax*2 + 0x11]
mov ecx, 1
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00403a80
mov edi, eax
mov edx, eax
mov eax, dword [ebp - 0x170]
call fcn.004409e0
mov dword [esp], edi
mov edx, 0x4463b0
mov dword [esp + 4], edx
call sub.msvcrt.dll_strcat
mov dword [esp], edi
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, pe_nt_image_headers32
mov dword [esp + 0x14], eax
mov eax, 2
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, 0x40000000
mov dword [esp + 4], eax
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
cmp eax, 0xffffffff
mov esi, eax
je 0x442f1f
mov eax, dword [ebp + 0x14]
xor edi, edi
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
lea edx, [ebp - 0x15c]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 0x14]
mov dword [esp], esi
mov dword [esp + 4], edx
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x442f06
mov dword [esp], esi
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x442bd6
lea eax, [ecx + 3]
jmp 0x442ce8
mov eax, dword [ebp - 0x170]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegDeleteValueA
sub esp, 8
test eax, eax
je 0x442bdf
mov edx, dword [ebp - 0x170]
mov dword [esp], 0x4566de
mov dword [esp + 4], edx
call fcn.00440770
jmp 0x442bdf
mov dword [esp], 0x4566f4
xor ecx, ecx
mov ebx, 7
mov dword [esp + 4], ecx
call fcn.00440770
jmp 0x442eb0
mov dword [esp + 4], edi
mov dword [esp], 0x456724
call fcn.00440770
jmp 0x442bdf
mov dword [esp], 0x4465f0
call fcn.00440a60
jmp 0x442ddb