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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x220
mov dword [esp], ecx
mov eax, dword [0x4b507c]
xor eax, esp
mov dword [esp + 0x21c], eax
lea eax, [esp + 0xc]
mov dword [esp + 4], 0x105
push eax
push str.SoftwareSimonTathamPuTTY
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x46c02c
cmp byte [0x4b92f0], 0
je 0x46c006
mov ecx, dword [0x4b92f8]
jmp 0x46c099
push str.shell32.dll
call fcn.00466d24
add esp, 4
test eax, eax
mov dword [0x4b92f4], eax
je 0x46c08a
push str.SHGetFolderPathA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, eax
jmp 0x46c08c
lea eax, [esp + 4]
lea ecx, [esp + 0x117]
lea edx, [esp + 0x10]
push eax
push ecx
push edx
push 0
push str.RandSeedFile
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x46bff2
cmp dword [esp + 0x10], 1
jne 0x46bff2
mov edx, dword [esp]
lea eax, [esp + 8]
lea ecx, [esp + 0x117]
push eax
call fcn.0046c6ba
add esp, 4
test al, al
je 0x46bff2
jmp 0x46c202
xor ecx, ecx
mov dword [0x4b92f8], ecx
mov byte [0x4b92f0], 1
test ecx, ecx
je 0x46c134
lea ebp, [esp + 0x117]
xor esi, esi
push ebp
push esi
push esi
push 0x1c
push esi
call ecx
test eax, eax
js 0x46c0ed
push 0
push str.PUTTY.RND
push ebp
call fcn.0045594b
add esp, 0xc
mov edx, dword [esp]
mov edi, eax
lea eax, [esp + 8]
mov ecx, edi
push eax
call fcn.0046c6ba
add esp, 4
mov ebx, eax
push edi
call fcn.00410bcd
add esp, 4
test bl, bl
jne 0x46c202
push ebp
push esi
push esi
push 0x1a
push esi
call dword [0x4b92f8]
test eax, eax
js 0x46c134
push 0
push str.PUTTY.RND
push ebp
call fcn.0045594b
add esp, 0xc
mov edx, dword [esp]
mov edi, eax
lea eax, [esp + 8]
mov ecx, edi
push eax
call fcn.0046c6ba
add esp, 4
mov ebx, eax
push edi
call fcn.00410bcd
add esp, 4
test bl, bl
jne 0x46c202
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, 0x104
lea eax, [esp + 0x117]
push ebx
push eax
push str.HOMEDRIVE
call ebp
mov edi, eax
lea esi, [esp + 0x10]
push ebx
push esi
push str.HOMEPATH
call ebp
test edi, edi
jne 0x46c16a
mov byte [esp + 0x117], 0
cmp edi, 0x103
ja 0x46c1b7
dec eax
cmp eax, 0x103
jae 0x46c1b7
push 0
push str.PUTTY.RND
push esi
lea ebp, [esp + 0x123]
push ebp
call fcn.0045594b
add esp, 0x10
mov edx, dword [esp]
mov edi, eax
lea eax, [esp + 8]
mov ecx, edi
push eax
call fcn.0046c6ba
add esp, 4
mov ebx, eax
push edi
call fcn.00410bcd
add esp, 4
test bl, bl
je 0x46c1be
jmp 0x46c202
lea ebp, [esp + 0x117]
mov esi, 0x104
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp eax, esi
jae 0x46c208
push 0
push str.PUTTY.RND
push ebp
call fcn.0045594b
add esp, 0xc
mov edx, dword [esp]
mov edi, eax
lea eax, [esp + 8]
mov ecx, edi
push eax
call fcn.0046c6ba
add esp, 4
mov ebx, eax
push edi
call fcn.00410bcd
add esp, 4
test bl, bl
je 0x46c208
mov esi, dword [esp + 8]
jmp 0x46c20b
xor esi, esi
dec esi
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.0046f0c8
mov eax, esi
add esp, 0x220
pop esi
pop edi
pop ebx
pop ebp
ret