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

Disassembly:
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x278
mov ebp, ecx
mov rax, qword [0x140102058]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov dword [rsp + 0x3c], 0x105
lea rdx, str.SoftwareSimonTathamPuTTY
lea r8, [rsp + 0x48]
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x14003bb73
cmp byte [0x1401055d8], 0
je 0x14003bb42
mov rsi, qword [0x1401055e8]
test rsi, rsi
jne 0x14003bbfe
jmp 0x14003bcb0
lea rcx, str.shell32.dll
call fcn.140043cd0
mov qword [0x1401055e0], rax
test rax, rax
je 0x14003bbe5
lea rdx, str.SHGetFolderPathA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
jmp 0x14003bbe7
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x160]
mov qword [rsp + 0x20], rax
lea rdx, str.RandSeedFile
lea r9, [rsp + 0x50]
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x14003bb24
cmp dword [rsp + 0x50], 1
jne 0x14003bb24
lea rcx, [rsp + 0x160]
lea r8, [rsp + 0x40]
mov edx, ebp
call fcn.14003c3e0
test al, al
je 0x14003bb24
jmp 0x14003bd90
xor esi, esi
mov qword [0x1401055e8], rsi
mov byte [0x1401055d8], 1
test rsi, rsi
je 0x14003bcb0
lea rdi, [rsp + 0x160]
mov qword [rsp + 0x20], rdi
xor ecx, ecx
mov edx, 0x1c
xor r8d, r8d
xor r9d, r9d
call rsi
test eax, eax
js 0x14003bc59
lea rdx, str.PUTTY.RND
lea rcx, [rsp + 0x160]
xor r8d, r8d
call fcn.140040840
mov rsi, rax
lea r8, [rsp + 0x40]
mov rcx, rax
mov edx, ebp
call fcn.14003c3e0
mov ebx, eax
mov rcx, rsi
call fcn.140041750
test bl, bl
jne 0x14003bd90
mov qword [rsp + 0x20], rdi
xor ecx, ecx
mov edx, 0x1a
xor r8d, r8d
xor r9d, r9d
call qword [0x1401055e8]
test eax, eax
js 0x14003bcb0
lea rdx, str.PUTTY.RND
lea rcx, [rsp + 0x160]
xor r8d, r8d
call fcn.140040840
mov rsi, rax
lea r8, [rsp + 0x40]
mov rcx, rax
mov edx, ebp
call fcn.14003c3e0
mov ebx, eax
mov rcx, rsi
call fcn.140041750
test bl, bl
jne 0x14003bd90
lea rcx, str.HOMEDRIVE
mov rdi, qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea rdx, [rsp + 0x160]
mov r8d, 0x104
call rdi
mov esi, eax
lea rcx, str.HOMEPATH
lea rdx, [rsp + 0x50]
mov r8d, 0x104
call rdi
test esi, esi
jne 0x14003bcf0
mov byte [rsp + 0x160], 0
cmp esi, 0x103
ja 0x14003bd3f
cmp eax, 0x103
ja 0x14003bd3f
test eax, eax
je 0x14003bd3f
lea r8, str.PUTTY.RND
lea rcx, [rsp + 0x160]
lea rdx, [rsp + 0x50]
xor r9d, r9d
call fcn.140040840
mov rsi, rax
lea r8, [rsp + 0x40]
mov rcx, rax
mov edx, ebp
call fcn.14003c3e0
mov ebx, eax
mov rcx, rsi
call fcn.140041750
test bl, bl
jne 0x14003bd90
lea rcx, [rsp + 0x160]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp eax, 0x104
jae 0x14003bd97
lea rdx, str.PUTTY.RND
lea rcx, [rsp + 0x160]
xor r8d, r8d
call fcn.140040840
mov rsi, rax
lea r8, [rsp + 0x40]
mov rcx, rax
mov edx, ebp
call fcn.14003c3e0
mov ebx, eax
mov rcx, rsi
call fcn.140041750
test bl, bl
je 0x14003bd97
mov rsi, qword [rsp + 0x40]
jmp 0x14003bd9e
mov rsi, 0xffffffffffffffff
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.1400a5f20
mov rax, rsi
add rsp, 0x278
pop rbx
pop rbp
pop rdi
pop rsi
ret