Function at 0x528e80
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cf4a6
mov eax, dword fs:[0]
push eax
sub esp, 0x65c
mov eax, dword [0x64a070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea eax, [ebp - 0x668]
xor bl, bl
push eax
push str.S_1_5_18
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
lea eax, [ebp - 0x664]
mov dword [ebp - 0x644], 0x101
push eax
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x668]
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
jne 0x528fb2
test edi, edi
je 0x528f28
mov esi, dword [edi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsSystemProcess:_LookupAccountSid_Error__u_n
push str.ProcessUtils
push 0x5f8398
push 0x32
push edi
jmp 0x528f99
cmp dword [0x656c44], 0
je 0x528f6f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsSystemProcess:_LookupAccountSid_Error__u_n
push 0x5f8398
push 0x5f8398
push str.ProcessUtils
push 0x61c4f4
push 0x32
call dword [0x656c44]
add esp, 0x1c
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x52922d
mov esi, dword [0x656c48]
test esi, esi
je 0x528f9f
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsSystemProcess:_LookupAccountSid_Error__u_n
push str.ProcessUtils
push 0x5f8398
push 0x32
push dword [0x656c48]
call dword [esi + 0x34]
add esp, 0x18
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x52922d
lea eax, [ebp - 0x660]
mov dword [ebp - 0x660], 0x101
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x529061
test edi, edi
je 0x528ff9
mov esi, dword [edi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsSystemProcess:_GetUserName_Error__u_n
push str.ProcessUtils
push 0x5f8398
push 0x32
push edi
jmp 0x528f99
cmp dword [0x656c44], 0
je 0x529040
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsSystemProcess:_GetUserName_Error__u_n
push 0x5f8398
push 0x5f8398
push str.ProcessUtils
push 0x61c4f4
push 0x32
call dword [0x656c44]
add esp, 0x1c
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x52922d
mov esi, dword [0x656c48]
test esi, esi
je 0x528f9f
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsSystemProcess:_GetUserName_Error__u_n
jmp 0x528f87
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x65c]
call fcn.00408810
lea eax, [ebp - 0x420]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x640]
call fcn.00408810
mov byte [ebp - 4], 1
test edi, edi
je 0x5290d7
cmp dword [ebp - 0x62c], 8
lea edx, [ebp - 0x640]
mov ecx, dword [edi]
lea eax, [ebp - 0x65c]
cmovae edx, dword [ebp - 0x640]
cmp dword [ebp - 0x648], 8
push edx
cmovae eax, dword [ebp - 0x65c]
push eax
push str.IsSystemProcess:_user_name_from_SYSTEM_sid___s__current_user_name___s
push str.ProcessUtils
push 0x5f8398
push 0xa
push edi
jmp 0x529175
mov edx, dword [0x656c44]
test edx, edx
je 0x52912d
cmp dword [ebp - 0x62c], 8
lea ecx, [ebp - 0x640]
lea eax, [ebp - 0x65c]
cmovae ecx, dword [ebp - 0x640]
cmp dword [ebp - 0x648], 8
push ecx
cmovae eax, dword [ebp - 0x65c]
push eax
push str.IsSystemProcess:_user_name_from_SYSTEM_sid___s__current_user_name___s
push 0x5f8398
push 0x5f8398
push str.ProcessUtils
push 0x61c4f4
push 0xa
call edx
add esp, 0x20
jmp 0x52917b
mov esi, dword [0x656c48]
test esi, esi
je 0x52917b
cmp dword [ebp - 0x62c], 8
lea edx, [ebp - 0x640]
mov ecx, dword [esi]
lea eax, [ebp - 0x65c]
cmovae edx, dword [ebp - 0x640]
cmp dword [ebp - 0x648], 8
push edx
cmovae eax, dword [ebp - 0x65c]
push eax
push str.IsSystemProcess:_user_name_from_SYSTEM_sid___s__current_user_name___s
push str.ProcessUtils
push 0x5f8398
push 0xa
push esi
call dword [ecx + 0x34]
add esp, 0x1c
cmp dword [ebp - 0x62c], 8
lea ecx, [ebp - 0x640]
push dword [ebp - 0x630]
cmovae ecx, dword [ebp - 0x640]
lea eax, [ebp - 0x65c]
cmp dword [ebp - 0x648], 8
push ecx
cmovae eax, dword [ebp - 0x65c]
push dword [ebp - 0x64c]
push eax
call fcn.0040ac30
add esp, 0x10
movzx ebx, bl
test eax, eax
mov ecx, 1
cmove ebx, ecx
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x62c]
cmp eax, 8
jb 0x5291f0
inc eax
lea ecx, [ebp - 0x640]
push eax
push dword [ebp - 0x640]
call fcn.00409510
mov ecx, dword [ebp - 0x648]
xor eax, eax
mov dword [ebp - 0x62c], 7
mov dword [ebp - 0x630], 0
mov word [ebp - 0x640], ax
cmp ecx, 8
jb 0x52922b
inc ecx
push ecx
push dword [ebp - 0x65c]
lea ecx, [ebp - 0x65c]
call fcn.00409510
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0057608a
mov esp, ebp
pop ebp
ret