Function at 0x4551b0
Capabilities:
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x4ff94c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x420
lea eax, [ebp - 0x424]
push 0
push eax
mov dword [ebp - 0x428], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x430]
push ecx
push str.SoftwareSimonTathamPuTTY
push closesocket
mov dword [ebp - 0x434], 0x424
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x455291
lea edx, [ebp - 0x434]
push edx
mov edx, dword [ebp - 0x430]
lea eax, [ebp - 0x428]
push eax
lea ecx, [ebp - 0x438]
push ecx
push 0
push str.RandSeedFile
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x455243
cmp dword [ebp - 0x438], 1
je 0x45524c
xor eax, eax
mov word [ebp - 0x428], ax
mov ecx, dword [ebp - 0x430]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp word [ebp - 0x428], 0
je 0x455291
push edi
lea esi, [ebp - 0x42c]
lea ecx, [ebp - 0x428]
call fcn.004550f0
add esp, 4
test eax, eax
je 0x455291
mov eax, dword [ebp - 0x42c]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b7f56
mov esp, ebp
pop ebp
ret
cmp dword [0x50bfb4], 0
jne 0x4552c1
push str.SHELL32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x50bfb8], eax
test eax, eax
je 0x4552c1
push str.SHGetFolderPathA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x50bfbc], eax
jmp 0x4552c6
mov eax, dword [0x50bfbc]
test eax, eax
je 0x4553d2
lea edx, [ebp - 0x428]
push edx
push 0
push 0
push 0x1c
push 0
call eax
test eax, eax
js 0x455350
lea eax, [ebp - 0x428]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4552f0
mov ecx, dword [str.PUTTY.RND]
mov edx, dword [0x4d98dc]
mov dword [eax], ecx
mov ecx, dword [0x4d98e0]
mov dword [eax + 4], edx
mov edx, dword [0x4d98e4]
mov dword [eax + 8], ecx
mov ecx, dword [0x4d98e8]
mov dword [eax + 0xc], edx
mov dx, word [0x4d98ec]
mov dword [eax + 0x10], ecx
push edi
lea esi, [ebp - 0x42c]
lea ecx, [ebp - 0x428]
mov word [eax + 0x14], dx
call fcn.004550f0
add esp, 4
test eax, eax
jne 0x45527c
lea eax, [ebp - 0x428]
push eax
push 0
push 0
push 0x1a
push 0
call dword [0x50bfbc]
test eax, eax
js 0x4553d2
lea eax, [ebp - 0x428]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x455372
mov ecx, dword [str.PUTTY.RND]
mov edx, dword [0x4d98dc]
mov dword [eax], ecx
mov ecx, dword [0x4d98e0]
mov dword [eax + 4], edx
mov edx, dword [0x4d98e4]
mov dword [eax + 8], ecx
mov ecx, dword [0x4d98e8]
mov dword [eax + 0xc], edx
mov dx, word [0x4d98ec]
mov dword [eax + 0x10], ecx
push edi
lea esi, [ebp - 0x42c]
lea ecx, [ebp - 0x428]
mov word [eax + 0x14], dx
call fcn.004550f0
add esp, 4
test eax, eax
jne 0x45527c
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x424
lea eax, [ebp - 0x428]
push eax
push str.HOMEDRIVE
call esi
mov ecx, 0x424
sub ecx, eax
push ecx
lea edx, [ebp + eax*2 - 0x428]
push edx
push str.HOMEPATH
call esi
test eax, eax
je 0x455470
lea eax, [ebp - 0x428]
add eax, 0xfffffffe
nop
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x455410
mov ecx, dword [str.PUTTY.RND]
mov edx, dword [0x4d98dc]
mov dword [eax], ecx
mov ecx, dword [0x4d98e0]
mov dword [eax + 4], edx
mov edx, dword [0x4d98e4]
mov dword [eax + 8], ecx
mov ecx, dword [0x4d98e8]
mov dword [eax + 0xc], edx
mov dx, word [0x4d98ec]
mov dword [eax + 0x10], ecx
push edi
lea esi, [ebp - 0x42c]
lea ecx, [ebp - 0x428]
mov word [eax + 0x14], dx
call fcn.004550f0
add esp, 4
test eax, eax
jne 0x45527c
push 0x424
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x428]
add eax, 0xfffffffe
jmp 0x455490
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x455490
mov ecx, dword [str.PUTTY.RND]
mov edx, dword [0x4d98dc]
mov dword [eax], ecx
mov ecx, dword [0x4d98e0]
mov dword [eax + 4], edx
mov edx, dword [0x4d98e4]
mov dword [eax + 8], ecx
mov ecx, dword [0x4d98e8]
mov dword [eax + 0xc], edx
mov dx, word [0x4d98ec]
mov dword [eax + 0x10], ecx
push edi
lea esi, [ebp - 0x42c]
lea ecx, [ebp - 0x428]
mov word [eax + 0x14], dx
call fcn.004550f0
add esp, 4
test eax, eax
jne 0x45527c
mov ecx, dword [ebp - 4]
xor ecx, ebp
or eax, 0xffffffff
pop esi
call fcn.004b7f56
mov esp, ebp
pop ebp
ret