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

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x270
mov ebx, ecx
mov rax, qword [0x14002e420]
mov qword [rsp + 0x268], rax
lea rdi, [rsp + 0x50]
xor edx, edx
mov r8d, 0x212
mov rcx, rdi
call fcn.1400aa3a0
mov dword [rsp + 0x40], 0x212
lea rdx, str.SoftwareSimonTathamPuTTY
lea r8, [rsp + 0x48]
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x1400a5903
mov al, byte [0x14002c520]
test al, al
je 0x1400a58d2
mov rsi, qword [0x14002c530]
jmp 0x1400a5980
lea rcx, str.shell32.dll
call fcn.14009f5be
mov qword [0x14002c528], rax
test rax, rax
je 0x1400a5970
lea rdx, str.SHGetFolderPathA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
jmp 0x1400a5972
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea rdx, str.RandSeedFile
lea r9, [rsp + 0x44]
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1400a5937
cmp dword [rsp + 0x44], 1
je 0x1400a593c
mov byte [rsp + 0x50], 0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [rsp + 0x50], 0
je 0x1400a58bc
lea rcx, [rsp + 0x50]
lea r8, [rsp + 0x38]
mov edx, ebx
call fcn.1400a6090
test eax, eax
jne 0x1400a5af8
jmp 0x1400a58bc
xor esi, esi
mov qword [0x14002c530], rsi
mov byte [0x14002c520], 1
test rsi, rsi
je 0x1400a5a3b
mov qword [rsp + 0x20], rdi
xor ecx, ecx
mov edx, 0x1c
xor r8d, r8d
xor r9d, r9d
call rsi
test eax, eax
js 0x1400a59e0
lea rsi, [rsp + 0x50]
mov rcx, rsi
call fcn.1400b93d0
movabs rcx, 0x522e59545455505c
mov qword [rsp + rax + 0x50], rcx
mov byte [rsp + rax + 0x5a], 0
mov word [rsp + rax + 0x58], 0x444e
lea r8, [rsp + 0x38]
mov rcx, rsi
mov edx, ebx
call fcn.1400a6090
test eax, eax
jne 0x1400a5af8
mov qword [rsp + 0x20], rdi
xor ecx, ecx
mov edx, 0x1a
xor r8d, r8d
xor r9d, r9d
call qword [0x14002c530]
test eax, eax
js 0x1400a5a3b
lea rsi, [rsp + 0x50]
mov rcx, rsi
call fcn.1400b93d0
movabs rcx, 0x522e59545455505c
mov qword [rsp + rax + 0x50], rcx
mov byte [rsp + rax + 0x5a], 0
mov word [rsp + rax + 0x58], 0x444e
lea r8, [rsp + 0x38]
mov rcx, rsi
mov edx, ebx
call fcn.1400a6090
test eax, eax
jne 0x1400a5af8
lea rcx, str.HOMEDRIVE
mov rdi, qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea rdx, [rsp + 0x50]
mov esi, 0x212
mov r8d, 0x212
call rdi
cdqe
sub esi, eax
lea rdx, [rsp + rax + 0x50]
lea rcx, str.HOMEPATH
mov r8d, esi
call rdi
test eax, eax
je 0x1400a5aaf
lea rsi, [rsp + 0x50]
mov rcx, rsi
call fcn.1400b93d0
movabs rcx, 0x522e59545455505c
mov qword [rsp + rax + 0x50], rcx
mov byte [rsp + rax + 0x5a], 0
mov word [rsp + rax + 0x58], 0x444e
lea r8, [rsp + 0x38]
mov rcx, rsi
mov edx, ebx
call fcn.1400a6090
test eax, eax
jne 0x1400a5af8
lea rsi, [rsp + 0x50]
mov edx, 0x212
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov rcx, rsi
call fcn.1400b93d0
movabs rcx, 0x522e59545455505c
mov qword [rsp + rax + 0x50], rcx
mov byte [rsp + rax + 0x5a], 0
mov word [rsp + rax + 0x58], 0x444e
lea r8, [rsp + 0x38]
mov rcx, rsi
mov edx, ebx
call fcn.1400a6090
test eax, eax
je 0x1400a5b18
mov rsi, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x268]
call fcn.1400a8e70
mov rax, rsi
add rsp, 0x270
pop rbx
pop rdi
pop rsi
ret
mov rsi, 0xffffffffffffffff
jmp 0x1400a5afd