Function at 0x4153d0
Capabilities:
Get session user name

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bc740
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x298
mov eax, dword [0x64ef64]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x28c], ecx
cmp dword [ecx], 0
mov eax, dword [ebx + 8]
mov edi, dword [ebx + 0xc]
mov dword [ebp - 0x224], eax
je 0x415432
mov eax, 1
jmp 0x415758
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ecx + 8]
mov dword [ebp - 0x288], eax
mov eax, dword [eax]
test eax, eax
je 0x415450
push eax
call esi
mov ecx, dword [ebp - 0x28c]
lea eax, [ecx + 0xc]
mov dword [ebp - 0x284], eax
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x415463
push eax
call esi
mov eax, dword [ebp - 0x288]
mov esi, dword [ebp - 0x284]
push dword [ebp - 0x224]
mov dword [eax], 0
lea eax, [ebp - 0x2a4]
push eax
mov dword [esi], 0
call fcn.00415890
push edi
mov edx, eax
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x240]
call fcn.00414940
add esp, 4
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x290]
cmp eax, 8
jb 0x4154c7
inc eax
lea ecx, [ebp - 0x2a4]
push eax
push dword [ebp - 0x2a4]
call fcn.00408aa0
xor eax, eax
mov dword [ebp - 0x290], 7
push 0x208
push eax
mov word [ebp - 0x2a4], ax
lea eax, [ebp - 0x220]
push eax
mov dword [ebp - 0x294], 0
call fcn.00599690
add esp, 0xc
mov dword [ebp - 0x244], 0x208
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x415736
mov dword [ebp - 0x268], 0
nop dword [eax]
cmp dword [ebp - 0x22c], 8
lea ecx, [ebp - 0x268]
push esi
push 0
push ecx
push 0
push 0
push 4
lea eax, [ebp - 0x240]
cmovae eax, dword [ebp - 0x240]
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
mov esi, eax
cmp esi, 2
jne 0x415778
sub esp, 8
mov dword [ebp - 0x224], 0x5c
lea eax, [ebp - 0x224]
lea ecx, [ebp - 0x240]
push eax
call fcn.00407460
push eax
push 0
lea eax, [ebp - 0x280]
push eax
lea ecx, [ebp - 0x240]
call fcn.004072d0
mov esi, eax
lea eax, [ebp - 0x240]
cmp eax, esi
je 0x4155ef
mov eax, dword [ebp - 0x22c]
cmp eax, 8
jb 0x4155c6
inc eax
lea ecx, [ebp - 0x240]
push eax
push dword [ebp - 0x240]
call fcn.00408aa0
xor eax, eax
mov dword [ebp - 0x22c], 7
push esi
lea ecx, [ebp - 0x240]
mov dword [ebp - 0x230], 0
mov word [ebp - 0x240], ax
call fcn.00408230
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x26c]
cmp eax, 8
jb 0x415611
inc eax
lea ecx, [ebp - 0x280]
push eax
push dword [ebp - 0x280]
call fcn.00408aa0
sub esp, 8
mov dword [ebp - 0x224], 0x5c
lea eax, [ebp - 0x224]
lea ecx, [ebp - 0x240]
push eax
call fcn.00407460
mov esi, dword [ebp - 0x284]
cmp eax, 0xffffffff
je 0x415530
push 3
push 2
push dword [ebx + 0x10]
lea eax, [ebp - 0x220]
xorps xmm0, xmm0
push eax
lea eax, [ebp - 0x264]
push eax
movups xmmword [ebp - 0x264], xmm0
movups xmmword [ebp - 0x254], xmm0
call dword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
mov edi, dword [ebp - 0x288]
lea eax, [ebp - 0x264]
push edi
push dword [ebp - 0x268]
push eax
push 1
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
mov esi, eax
test esi, esi
je 0x4157ea
push 4
xor eax, eax
mov dword [ebp - 0x26c], 7
push str.main
lea ecx, [ebp - 0x280]
mov dword [ebp - 0x270], 0
mov word [ebp - 0x280], ax
call fcn.004088c0
lea edx, [ebp - 0x280]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x228]
call fcn.00411240
push esi
mov byte [ebp - 4], 8
push str.RegPrivilege_SetEntriesInAcl_Failed___d__r_n
push dword [eax]
call fcn.00411610
add esp, 0xc
mov byte [ebp - 4], 9
mov edi, dword [ebp - 0x224]
test edi, edi
je 0x415718
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x415718
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x415718
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov eax, dword [ebp - 0x26c]
cmp eax, 8
jb 0x415736
inc eax
lea ecx, [ebp - 0x280]
push eax
push dword [ebp - 0x280]
call fcn.00408aa0
xor esi, esi
mov ecx, dword [ebp - 0x22c]
cmp ecx, 8
jb 0x415756
inc ecx
push ecx
push dword [ebp - 0x240]
lea ecx, [ebp - 0x240]
call fcn.00408aa0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0054af65
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc
test esi, esi
je 0x41563f
push 4
xor eax, eax
mov dword [ebp - 0x26c], 7
push str.main
lea ecx, [ebp - 0x280]
mov dword [ebp - 0x270], 0
mov word [ebp - 0x280], ax
call fcn.004088c0
lea edx, [ebp - 0x280]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x228]
call fcn.00411240
mov byte [ebp - 4], 5
cmp dword [edi + 0x14], 8
jb 0x4157d0
mov edi, dword [edi]
push esi
push edi
push str.RegPrivilege_GetNamedSecurityInfo__s_Failed___d__r_n
push dword [eax]
call fcn.00411610
add esp, 0x10
mov byte [ebp - 4], 6
jmp 0x4156ed
cmp dword [ebp - 0x22c], 8
lea eax, [ebp - 0x240]
push 0
push dword [edi]
cmovae eax, dword [ebp - 0x240]
push 0
push 0
push 4
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov esi, eax
test esi, esi
je 0x415878
push 4
xor eax, eax
mov dword [ebp - 0x26c], 7
push str.main
lea ecx, [ebp - 0x280]
mov dword [ebp - 0x270], 0
mov word [ebp - 0x280], ax
call fcn.004088c0
lea edx, [ebp - 0x280]
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x228]
call fcn.00411240
push esi
mov byte [ebp - 4], 0xb
push str.RegPrivilege_SetNamedSecurityInfoW_Failed___d__r_n
push dword [eax]
call fcn.00411610
add esp, 0xc
mov byte [ebp - 4], 0xc
jmp 0x4156ed
mov eax, dword [ebp - 0x28c]
mov esi, 1
mov dword [eax], 1
jmp 0x415738