Function at 0x101ce731
Capabilities:
Get hostname
Get session user name

Disassembly:
sub esp, 0x528
mov eax, dword [0x102ab2c0]
xor eax, esp
mov dword [esp + 0x524], eax
mov eax, dword [esp + 0x52c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x53c]
push edi
push 0x401
mov dword [esp + 0x18], eax
lea eax, [esp + 0x134]
push 0
push eax
call fcn.101eec70
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0xc
cmp byte [esi], 0x7e
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
je 0x101ce3b5
push esi
jmp 0x101ce3d0
lea ebp, [esi + 1]
push 0x2f
push ebp
mov dword [esp + 0x20], ebp
call fcn.101eee80
add esp, 8
test eax, eax
je 0x101ce40b
cmp eax, ebp
jbe 0x101ce40b
push ebp
call edi
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x101ce4ee
push str.ssh_path_expand_escape
push dword [esp + 0x18]
call fcn.101c9220
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x534]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.101ebfaa
add esp, 0x528
ret
mov edi, ebp
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x101ce410
push 0x104
lea eax, [esp + 0x30]
sub edi, ecx
push 0
push eax
call fcn.101eec70
add esp, 0xc
lea eax, [esp + 0x2c]
push 1
push 0x28
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x101ce3df
lea ecx, [esp + 0x2c]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101ce450
sub ecx, edx
lea eax, [ecx + 1]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebp, eax
add esp, 4
mov dword [esp + 0x10], ebp
test ebp, ebp
je 0x101ce3df
lea ecx, [esp + 0x2c]
mov edx, ebp
mov eax, ecx
sub edx, eax
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x101ce480
mov esi, ebp
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x101ce492
sub esi, ecx
lea eax, [esi + 1]
add eax, edi
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x101ce4c2
push dword [esp + 0x10]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x101ce3df
test esi, esi
je 0x101ce4d4
push esi
push dword [esp + 0x14]
push ebp
call fcn.101eccd0
add esp, 0xc
push dword [esp + 0x10]
call ebx
lea eax, [edi + 1]
push eax
push dword [esp + 0x20]
lea eax, [esi + ebp]
push eax
call fcn.101eccd0
add esp, 0x10
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101ce4f3
sub ecx, edx
cmp ecx, 0x1000
jbe 0x101ce524
push str.string_to_expand_too_long
push str.ssh_path_expand_escape
push 2
push dword [esp + 0x20]
call fcn.101c91a0
push ebp
call ebx
add esp, 0x14
jmp 0x101ce3f0
push 0x1000
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x101ce551
push str.ssh_path_expand_escape
push dword [esp + 0x18]
call fcn.101c9220
push ebp
call ebx
add esp, 0xc
jmp 0x101ce3f0
mov byte [esi], 0
xor edi, edi
mov cl, byte [ebp]
mov eax, ebp
test cl, cl
je 0x101ce755
cmp cl, 0x25
jne 0x101ce735
mov cl, byte [eax + 1]
inc eax
mov dword [esp + 0x18], eax
test cl, cl
je 0x101ce755
movsx eax, cl
add eax, 0xffffffdb
cmp eax, 0x50
ja case.0x101ce592.38
movzx eax, byte [eax + 0x101ce85c]
jmp dword [eax*4 + 0x101ce83c]
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x52c]
test eax, eax
je 0x101ce798
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov edx, eax
add esp, 4
mov dword [esp + 0x10], edx
jmp 0x101ce6c7
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
push dword [esp + 0x1c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x101ce7ef
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x101ce7ef
mov edx, dword [esp + 0x10]
jmp 0x101ce6cf
push 0
lea eax, [esp + 0x134]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
je 0x101ce7ef
lea eax, [esp + 0x130]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov edx, eax
add esp, 4
mov dword [esp + 0x10], edx
jmp 0x101ce6c7
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x524]
test eax, eax
je 0x101ce7b8
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov edx, eax
add esp, 4
mov dword [esp + 0x10], edx
jmp 0x101ce6c7
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x520]
test eax, eax
je 0x101ce7bf
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov edx, eax
add esp, 4
mov dword [esp + 0x10], edx
jmp 0x101ce6c7
mov eax, dword [esp + 0x14]
movzx eax, word [eax + 0x57c]
test ax, ax
jne 0x101ce69c
mov eax, 0x16
movzx eax, ax
push eax
push 0x1027a520
push 0xffffffffffffffff
lea eax, [esp + 0x30]
push 6
push eax
call fcn.101c9160
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
add esp, 0x18
mov dword [esp + 0x10], eax
mov edx, eax
test edx, edx
je 0x101ce7ef
mov ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x20], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101ce6d8
sub ecx, dword [esp + 0x20]
add edi, ecx
cmp edi, 0x1000
jae 0x101ce7c6
mov ecx, esi
lea eax, [ecx + 1]
mov dword [esp + 0x20], eax
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101ce700
sub ecx, dword [esp + 0x20]
mov eax, 0xfff
sub eax, ecx
push eax
push edx
lea eax, [ecx + esi]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
push dword [esp + 0x1c]
mov byte [edi + esi], 0
call ebx
mov eax, dword [esp + 0x28]
add esp, 0x10
jmp 0x101ce749
mov eax, dword [esp + 0x18]
mov byte [edi + esi], cl
inc edi
cmp edi, 0x1000
jae 0x101ce82e
mov byte [edi + esi], 0
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x101ce563
push ebp
call ebx
mov ecx, esi
add esp, 4
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101ce760
sub ecx, edx
lea eax, [ecx + 1]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov edi, eax
add esp, 8
test edi, edi
jne 0x101ce791
push str.ssh_path_expand_escape
push dword [esp + 0x18]
call fcn.101c9220
push esi
call ebx
add esp, 0xc
mov eax, edi
jmp 0x101ce3f2
push str.Cannot_expand_sshdir
push str.ssh_path_expand_escape
push 2
push ecx
call fcn.101c91a0
push esi
call ebx
push ebp
call ebx
add esp, 0x18
jmp 0x101ce3f0
push str.Cannot_expand_host
jmp 0x101ce79d
push str.Cannot_expand_username
jmp 0x101ce79d
push str.String_too_long
push str.ssh_path_expand_escape
push 2
push dword [esp + 0x20]
call fcn.101c91a0
push esi
call ebx
push dword [esp + 0x24]
call ebx
push ebp
call ebx
add esp, 0x1c
jmp 0x101ce3f0
push str.ssh_path_expand_escape
push dword [esp + 0x18]
call fcn.101c9220
push esi
call ebx
push ebp
call ebx
add esp, 0x10
jmp 0x101ce3f0
push str.Wrong_escape_sequence_detected
push str.ssh_path_expand_escape
push 2
push dword [esp + 0x20]
call fcn.101c91a0
push esi
call ebx
push ebp
call ebx
add esp, 0x18
jmp 0x101ce3f0
push esi
call ebx
push ebp
call ebx
jmp 0x101ce3ed