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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
mov eax, dword [0x488240]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x224]
push ebx
mov ebx, dword [ebp + 8]
push eax
mov dword [ebp - 0x240], ebx
call fcn.00407380
mov ecx, dword [ebp - 0x214]
test ecx, ecx
jne 0x4387c1
lea eax, [ebp - 0x224]
mov ecx, ebx
push eax
call fcn.00407410
push 0
push 1
lea ecx, [ebp - 0x224]
call fcn.00407d10
jmp 0x438b85
push esi
push edi
xor edi, edi
cmp ecx, 1
jbe 0x438888
mov edx, dword [ebp - 0x210]
lea eax, [ebp - 0x224]
mov esi, dword [ebp - 0x224]
cmp edx, 8
push 0x22
cmovae eax, esi
pop edi
push 0
cmp word [eax], di
pop edi
jne 0x43880a
cmp edx, 8
lea eax, [ebp - 0x224]
push 0x22
cmovae eax, esi
pop edi
push 0
cmp word [eax + ecx*2 - 2], di
pop edi
je 0x438837
cmp edx, 8
lea eax, [ebp - 0x224]
push 0x27
cmovae eax, esi
pop edi
push 0
cmp word [eax], di
pop edi
jne 0x438888
cmp edx, 8
lea eax, [ebp - 0x224]
push 0x27
cmovae eax, esi
pop edx
cmp word [eax + ecx*2 - 2], dx
jne 0x438888
xor eax, eax
mov dword [ebp - 0x228], 7
mov word [ebp - 0x23c], ax
lea eax, [ecx - 2]
push eax
push 1
lea eax, [ebp - 0x224]
mov dword [ebp - 0x22c], edi
push eax
lea ecx, [ebp - 0x23c]
call fcn.00407a60
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x224]
call fcn.00407480
push edi
push 1
lea ecx, [ebp - 0x23c]
call fcn.00407d10
xor ebx, ebx
mov esi, dword [edi + 0x488050]
push esi
call fcn.00405850
pop ecx
push eax
push ebx
push esi
lea ecx, [ebp - 0x224]
call fcn.00407b80
mov esi, eax
cmp esi, 0xffffffff
je 0x438910
push ebx
push dword [edi + 0x488054]
lea eax, [ebp - 0x20c]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x23c]
call fcn.004073b0
mov ecx, dword [edi + 0x488050]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4388dc
push 0xffffffffffffffff
push ebx
sub ecx, edx
lea eax, [ebp - 0x23c]
sar ecx, 1
push eax
push ecx
push esi
lea ecx, [ebp - 0x224]
call fcn.004095f0
push ebx
push 1
lea ecx, [ebp - 0x23c]
call fcn.00407d10
add edi, 8
cmp edi, 0x38
jb 0x43888a
mov esi, dword [str._user_name]
push esi
call fcn.00405850
pop ecx
push eax
xor edi, edi
lea ecx, [ebp - 0x224]
push edi
push esi
call fcn.00407b80
mov ebx, dword [ebp - 0x240]
mov dword [ebp - 0x244], eax
cmp eax, 0xffffffff
je 0x4389ee
lea eax, [ebp - 0x240]
mov dword [ebp - 0x240], edi
push eax
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetUserNameW]
call edi
mov eax, dword [ebp - 0x240]
test eax, eax
je 0x4389ec
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00439f0a
mov esi, eax
lea eax, [ebp - 0x240]
pop ecx
push eax
push esi
call edi
push esi
lea ecx, [ebp - 0x23c]
call fcn.004073b0
mov ecx, dword [str._user_name]
xor edi, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x4389a6
push 0xffffffffffffffff
push edi
sub ecx, edx
lea eax, [ebp - 0x23c]
sar ecx, 1
push eax
push ecx
push dword [ebp - 0x244]
lea ecx, [ebp - 0x224]
call fcn.004095f0
push edi
push 1
lea ecx, [ebp - 0x23c]
call fcn.00407d10
test esi, esi
je 0x4389ee
push esi
call fcn.0043d563
pop ecx
jmp 0x4389ee
xor edi, edi
mov esi, dword [str._machine_name]
push esi
call fcn.00405850
pop ecx
push eax
push edi
push esi
lea ecx, [ebp - 0x224]
call fcn.00407b80
mov dword [ebp - 0x244], eax
cmp eax, 0xffffffff
je 0x438ac0
lea eax, [ebp - 0x240]
mov dword [ebp - 0x240], edi
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
push 5
call edi
mov eax, dword [ebp - 0x240]
test eax, eax
je 0x438abe
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00439f0a
pop ecx
mov esi, eax
lea eax, [ebp - 0x240]
push eax
push esi
push 5
call edi
push esi
lea ecx, [ebp - 0x23c]
call fcn.004073b0
mov ecx, dword [str._machine_name]
xor edi, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x438a78
push 0xffffffffffffffff
push edi
sub ecx, edx
lea eax, [ebp - 0x23c]
sar ecx, 1
push eax
push ecx
push dword [ebp - 0x244]
lea ecx, [ebp - 0x224]
call fcn.004095f0
push edi
push 1
lea ecx, [ebp - 0x23c]
call fcn.00407d10
test esi, esi
je 0x438ac0
push esi
call fcn.0043d563
pop ecx
jmp 0x438ac0
xor edi, edi
mov esi, dword [str._client_name]
push esi
call fcn.00405850
pop ecx
push eax
push edi
push esi
lea ecx, [ebp - 0x224]
call fcn.00407b80
mov esi, eax
cmp esi, 0xffffffff
je 0x438b67
lea eax, [ebp - 0x244]
mov dword [ebp - 0x240], edi
push eax
lea eax, [ebp - 0x240]
mov dword [ebp - 0x244], edi
push eax
push 0xa
push 0xffffffffffffffff
push edi
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x438b67
push dword [ebp - 0x240]
lea ecx, [ebp - 0x23c]
call fcn.004073b0
mov ecx, dword [str._client_name]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x438b28
push 0xffffffffffffffff
push edi
sub ecx, edx
lea eax, [ebp - 0x23c]
sar ecx, 1
push eax
push ecx
push esi
lea ecx, [ebp - 0x224]
call fcn.004095f0
push dword [ebp - 0x240]
call sub.WTSAPI32.dll_WTSFreeMemory
push edi
push 1
lea ecx, [ebp - 0x23c]
call fcn.00407d10
lea eax, [ebp - 0x224]
mov ecx, ebx
push eax
call fcn.00407410
push edi
push 1
lea ecx, [ebp - 0x224]
call fcn.00407d10
pop edi
pop esi
mov ecx, dword [ebp - 4]
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0043b1e4
mov esp, ebp
pop ebp
ret