Function at 0x481b40
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
push edi
mov ecx, 0x83
push esi
push ebx
mov esi, eax
sub esp, 0x35c
movzx eax, word [0x500ea4]
lea edi, [esp + 0x144]
mov dword [esp + 0x140], 0
mov dword [esp + 0x34c], 0
lea ebx, [esp + 0x13e]
mov word [esp + 0x13e], ax
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [esp + 8], 0x212
mov dword [esp + 4], ebx
mov dword [esp], str.PUTTYTMP
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
call edi
sub esp, 0xc
test eax, eax
jne 0x481d01
cmp byte [0x521828], 0
mov eax, dword [0x521824]
je 0x481d48
test eax, eax
je 0x481c28
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1c
mov dword [esp], 0
call eax
sub esp, 0x14
test eax, eax
jns 0x481e20
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1a
mov dword [esp], 0
call dword [0x521824]
sub esp, 0x14
test eax, eax
jns 0x481cb4
lea edx, [esp + 0x3a]
mov dword [esp + 8], 0x104
mov dword [esp], str.HOMEDRIVE
mov dword [esp + 4], edx
mov dword [esp + 0x2c], edx
call edi
sub esp, 0xc
mov ebp, eax
mov dword [esp + 8], 0x104
mov dword [esp + 4], ebx
mov dword [esp], str.HOMEPATH
call edi
sub esp, 0xc
test ebp, ebp
mov edx, dword [esp + 0x2c]
jne 0x481c6f
mov byte [esp + 0x3a], 0
sub eax, 1
cmp eax, 0x102
ja 0x481c85
cmp ebp, 0x103
jbe 0x481dc0
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
sub esp, 8
cmp eax, 0x103
jbe 0x481d81
add esp, 0x35c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0
mov dword [esp + 4], str.PUTTY.RND
mov dword [esp], ebx
call fcn.004cbec0
lea ecx, [esp + 0x34]
mov ebp, eax
mov edx, esi
call fcn.00481ac0
mov dword [esp], ebp
mov byte [esp + 0x2c], al
call fcn.004cd6d0
movzx eax, byte [esp + 0x2c]
test al, al
je 0x481c28
mov eax, dword [esp + 0x34]
add esp, 0x35c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov edx, 0x444e
add eax, ebx
lea ecx, [esp + 0x34]
mov word [eax + 8], dx
mov dword [eax], 0x5455505c
mov edx, esi
mov dword [eax + 4], 0x522e5954
mov byte [eax + 0xa], 0
mov eax, ebx
call fcn.00481ac0
test al, al
jne 0x481cf2
cmp byte [0x521828], 0
mov eax, dword [0x521824]
jne 0x481bc0
mov dword [esp], str.shell32.dll
call fcn.004d4420
test eax, eax
je 0x481e02
mov dword [esp + 4], str.SHGetFolderPathA
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov byte [0x521828], 1
sub esp, 8
mov dword [0x521824], eax
jmp 0x481bc0
mov dword [esp], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], str.PUTTY.RND
call fcn.004cbec0
lea ecx, [esp + 0x34]
mov edx, esi
mov ebx, eax
call fcn.00481ac0
mov dword [esp], ebx
mov esi, eax
call fcn.004cd6d0
mov eax, esi
test al, al
je 0x481ca4
jmp 0x481cf2
mov dword [esp], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.PUTTY.RND
mov dword [esp + 4], ebx
call fcn.004cbec0
lea ecx, [esp + 0x34]
mov edi, eax
mov edx, esi
call fcn.00481ac0
mov dword [esp], edi
mov ebp, eax
call fcn.004cd6d0
mov eax, ebp
test al, al
je 0x481c85
jmp 0x481cf2
mov dword [0x521824], 0
mov byte [0x521828], 1
jmp 0x481c28
mov dword [esp + 8], 0
mov dword [esp + 4], str.PUTTY.RND
mov dword [esp], ebx
call fcn.004cbec0
lea ecx, [esp + 0x34]
mov ebp, eax
mov edx, esi
call fcn.00481ac0
mov dword [esp], ebp
mov byte [esp + 0x2c], al
call fcn.004cd6d0
movzx eax, byte [esp + 0x2c]
test al, al
je 0x481bf4
jmp 0x481cf2