Function at 0x140137300
Capabilities:
Get common file path
Get hostname
Get session user name

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x570
mov rax, qword [0x1403bfb80]
xor rax, rsp
mov qword [rsp + 0x560], rax
mov rbx, rdx
mov r13, rcx
xor edx, edx
lea rcx, [rsp + 0x150]
mov r8d, 0x401
call sub.VCRUNTIME140.dll_memset
cmp byte [rbx], 0x7e
mov rbp, 0xffffffffffffffff
jne 0x140137367
lea r15, [rbx + 1]
mov rcx, r15
lea edx, [rbp + 0x30]
mov rbx, r15
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x140137391
cmp rax, r15
jbe 0x140137391
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov rsi, rax
test rax, rax
jne 0x140137467
lea rdx, [0x1402dcc88]
mov rcx, r13
call fcn.14012c120
xor eax, eax
jmp 0x140137705
mov rdi, rbp
inc rdi
cmp byte [r15 + rdi], 0
jne 0x140137394
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x104
call sub.VCRUNTIME140.dll_memset
mov r9d, 1
lea rdx, [rsp + 0x40]
xor ecx, ecx
lea r8d, [r9 + 0x27]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x14013737b
lea rax, [rsp + 0x40]
mov rcx, rbp
inc rcx
cmp byte [rax + rcx], 0
jne 0x1401373d3
inc rcx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r14, rax
test rax, rax
je 0x14013737b
lea rcx, [rsp + 0x40]
sub rax, rcx
lea rdx, [rsp + 0x40]
nop dword [rax]
movzx ecx, byte [rdx]
mov byte [rax + rdx], cl
lea rdx, [rdx + 1]
test cl, cl
jne 0x140137400
mov rbx, rbp
inc rbx
cmp byte [r14 + rbx], 0
jne 0x140137411
lea rcx, [rbx + 1]
add rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rsi, rax
test rax, rax
jne 0x14013743c
mov rcx, r14
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
jmp 0x14013737b
test rbx, rbx
je 0x14013744f
mov r8, rbx
mov rdx, r14
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov rcx, r14
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
lea r8, [rdi + 1]
mov rdx, r15
lea rcx, [rsi + rbx]
call sub.VCRUNTIME140.dll_memcpy
mov rax, rbp
nop word [rax + rax]
inc rax
cmp byte [rsi + rax], 0
jne 0x140137470
cmp rax, 0x1000
jbe 0x1401374ab
lea r9, str.string_to_expand_too_long
mov edx, 2
lea r8, [0x1402dcc88]
mov rcx, r13
call fcn.14012c070
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor eax, eax
jmp 0x140137705
mov ecx, 0x1000
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rbx, rax
test rax, rax
jne 0x1401374db
lea rdx, [0x1402dcc88]
mov rcx, r13
call fcn.14012c120
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor eax, eax
jmp 0x140137705
mov byte [rax], 0
xor r14d, r14d
movzx edx, byte [rsi]
mov r15, rsi
mov qword [rsp + 0x5c0], r12
test dl, dl
je 0x1401376bc
lea r12, [0x140000000]
lea r8d, [r14 + 0x16]
cmp dl, 0x25
jne case.0x14013753d.37
movsx edx, byte [r15 + 1]
inc r15
test dl, dl
je 0x1401376bc
lea eax, [rdx - 0x25]
cmp eax, 0x50
ja case.0x14013753d.44
cdqe
movzx eax, byte [r12 + rax + 0x1377b4]
mov ecx, dword [r12 + rax*4 + 0x137794]
add rcx, r12
jmp rcx
mov rcx, qword [r13 + 0x5f8]
test rcx, rcx
jne 0x140137624
lea r9, str.Cannot_expand_sshdir
jmp 0x140137767
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x30], 0
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov ecx, dword [rsp + 0x30]
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rdi, rax
test rax, rax
je 0x14013774f
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jmp 0x14013762f
xor edx, edx
lea rcx, [rsp + 0x150]
call qword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
je 0x14013774f
lea rcx, [rsp + 0x150]
jmp 0x140137624
mov rcx, qword [r13 + 0x5e8]
test rcx, rcx
jne 0x140137624
lea r9, str.Cannot_expand_host
jmp 0x140137767
mov rcx, qword [r13 + 0x5e0]
test rcx, rcx
jne 0x140137624
lea r9, str.Cannot_expand_username
jmp 0x140137767
movzx ecx, word [r13 + 0x690]
lea r9, [0x1402dcce8]
movzx eax, r8w
test cx, cx
mov r8, rbp
mov edx, 6
cmovne ax, cx
lea rcx, [rsp + 0x34]
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.140128cf0
lea rcx, [rsp + 0x34]
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov rdi, rax
test rax, rax
je 0x14013774f
mov rax, rbp
nop dword [rax + rax]
inc rax
cmp byte [rdi + rax], 0
jne 0x140137640
add r14, rax
cmp r14, 0x1000
jae 0x140137727
mov rax, rbp
nop dword [rax]
inc rax
cmp byte [rbx + rax], 0
jne 0x140137660
mov r8d, 0xfff
lea rcx, [rax + rbx]
sub r8, rax
mov rdx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strncpy
mov rcx, rdi
mov byte [r14 + rbx], 0
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov r8d, reloc.WS2_32.dll_shutdown
jmp 0x1401376ac
mov byte [r14 + rbx], dl
inc r14
cmp r14, 0x1000
jae 0x14013777b
mov byte [r14 + rbx], 0
movzx edx, byte [r15 + 1]
inc r15
test dl, dl
jne 0x140137502
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
cmp byte [rbx + rbp + 1], 0
lea rbp, [rbp + 1]
jne 0x1401376c4
lea rdx, [rbp + 1]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
mov rdi, rax
test rax, rax
jne 0x1401376fa
lea rdx, [0x1402dcc88]
mov rcx, r13
call fcn.14012c120
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rax, rdi
mov r12, qword [rsp + 0x5c0]
mov rcx, qword [rsp + 0x560]
xor rcx, rsp
call fcn.1402d88b0
add rsp, 0x570
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea r9, str.String_too_long
mov edx, 2
lea r8, [0x1402dcc88]
mov rcx, r13
call fcn.14012c070
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, rdi
jmp 0x14013777e
lea rdx, [0x1402dcc88]
mov rcx, r13
call fcn.14012c120
jmp 0x14013777b
lea r9, str.Wrong_escape_sequence_detected
lea r8, [0x1402dcc88]
mov edx, 2
mov rcx, r13
call fcn.14012c070
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor eax, eax
jmp 0x1401376fd