Function at 0x1007874
Capabilities:
Get session user name
Prompt user for credentials

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
xor esi, esi
push edi
mov ebx, 0x202
push 0x1001904
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x20], ebx
call fcn.01006cf1
mov dword [ebp - 0x24], eax
cmp eax, esi
je 0x10078b4
cmp eax, 0xffffffff
jne 0x10078df
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x10078c8
and eax, 0xffff
or eax, 0x80070000
cmp eax, esi
mov dword [ebp - 4], eax
jl 0x1007a55
mov dword [ebp - 4], 0x80004005
jmp 0x1007a55
mov edi, 0x800
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call esi
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x1007908
mov dword [ebp - 4], 0x8007000e
jmp 0x1007a55
xor ecx, ecx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ecx
mov word [eax], cx
call edi
push eax
call esi
mov dword [ebp - 0x10], eax
test eax, eax
je 0x10078fc
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x20]
add eax, eax
push eax
push ecx
call edi
push eax
call esi
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10078fc
xor ecx, ecx
push ebx
push ecx
mov word [eax], cx
call edi
push eax
call esi
mov dword [ebp - 0x18], eax
test eax, eax
je 0x10078fc
xor ecx, ecx
mov word [eax], cx
xor eax, eax
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
lea edi, [ebp - 0x3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, 0x400
push edi
push dword [ebp - 0x14]
push 0x7e
push ecx
call esi
push edi
push dword [ebp - 0x10]
push 0x16
push dword [ebp - 0x24]
call esi
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0xc]
push 2
call sub.Secur32.dll_GetUserNameExW
mov esi, 0xffff
mov edi, 0x80070000
test al, al
jne 0x10079af
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10079a4
and eax, esi
or eax, edi
mov dword [ebp - 4], eax
test eax, eax
jl 0x1007a55
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x14]
push 0x140082
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x28]
push eax
push 0x101
push dword [ebp - 0x18]
mov dword [ebp - 0x20], ebx
push ebx
push dword [ebp - 0xc]
xor ebx, ebx
push ebx
push ebx
push 0x10015f8
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0x14
call dword [sym.imp.credui.dll_CredUIPromptForCredentialsW]
xor ecx, ecx
cmp eax, ebx
je 0x1007a01
jle 0x10079ff
and eax, esi
or eax, edi
mov ecx, eax
mov dword [ebp - 4], ecx
and ecx, esi
cmp ecx, 0x4c7
jne 0x1007a15
mov dword [ebp - 4], 0x8007051f
cmp dword [ebp - 4], ebx
jl 0x1007a55
push dword [ebp - 0xc]
lea eax, [ebp - 0x1c]
push eax
call fcn.01005415
mov dword [ebp - 4], eax
test eax, eax
jl 0x1007a55
push dword [ebp - 0x18]
lea eax, [ebp - 8]
push eax
call fcn.01005415
mov dword [ebp - 4], eax
test eax, eax
jl 0x1007a55
push dword [ebp - 8]
mov eax, dword [ebp + 0xc]
push dword [ebp - 0x1c]
mov ecx, dword [eax]
push eax
call dword [ecx + pe_nt_image_headers32]
mov dword [ebp - 4], eax
cmp dword [ebp - 0x24], 0
je 0x1007a64
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x1007aa2
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1007a76
sub eax, edx
sar eax, 1
add eax, eax
xor ebx, ebx
mov ecx, edi
cmp eax, ebx
je 0x1007a95
mov byte [ecx], 0
inc ecx
dec eax
jne 0x1007a8e
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
jmp 0x1007aa4
xor ebx, ebx
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 8], ebx
je 0x1007ad8
mov eax, dword [ebp - 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1007ab5
mov ecx, dword [ebp - 8]
sub eax, edx
sar eax, 1
add eax, eax
cmp eax, ebx
je 0x1007ad3
mov byte [ecx], 0
inc ecx
dec eax
jne 0x1007acc
push dword [ebp - 8]
call edi
cmp dword [ebp - 0x1c], ebx
je 0x1007ae2
push dword [ebp - 0x1c]
call edi
cmp dword [ebp - 0xc], ebx
je 0x1007af4
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
cmp dword [ebp - 0x10], ebx
je 0x1007b06
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
cmp dword [ebp - 0x14], ebx
je 0x1007b18
push dword [ebp - 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8