Function at 0x42ae30
Capabilities:
Get session user name
Get token membership

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x258
mov ecx, dword [ebp + 0x18]
mov esi, dword [ebp + 8]
mov eax, dword [0x587040]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov edi, dword [ecx]
mov dword [ecx], 0
test edi, edi
je 0x42ae68
mov ecx, edi
call fcn.0042be50
push edi
call fcn.004ec97e
add esp, 4
lea edi, [ebp - 0x218]
mov dword [edi], 0x101
lea ebx, [ebp - 0x212]
push 0x202
push 0xff
push ebx
call fcn.004f0940
add esp, 0xc
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
xor eax, eax
mov dword [ebp - 0x21c], eax
xor ecx, ecx
dec ecx
mov dword [ebp - 0x220], ecx
pcmpeqd xmm0, xmm0
movdqu xmmword [ebp - 0x230], xmm0
movdqu xmmword [ebp - 0x240], xmm0
mov dword [ebp - 0x244], ecx
mov dword [ebp - 0x248], eax
cmp byte [esi + 0xb], 0
mov ecx, esi
jns 0x42aed0
mov ecx, dword [esi]
mov dword [ebp - 0x260], esi
lea ebx, [ebp - 0x21c]
lea edi, [ebp - 0x220]
push ebx
push eax
push edi
push eax
push eax
push 4
mov esi, dword [ebp + 0xc]
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
cmp eax, 5
jne 0x42af24
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.0042aa00
test al, al
je 0x42af28
cmp byte [esi + 0xb], 0
mov eax, esi
jns 0x42af11
mov eax, dword [esi]
xor ecx, ecx
push ebx
push ecx
push edi
push ecx
push ecx
push 4
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
je 0x42af65
xor ebx, ebx
mov eax, dword [ebp - 0x248]
test eax, eax
je 0x42af3b
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x21c]
test eax, eax
je 0x42af4c
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ecef0
mov eax, ebx
add esp, 0x258
pop esi
pop edi
pop ebx
pop ebp
ret 0x14
lea eax, [ebp - 0x248]
lea ecx, [ebp - 0x244]
push eax
push ecx
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_GetExplicitEntriesFromAclW]
test eax, eax
jne 0x42af28
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x42afef
mov esi, dword [ebp + 0x10]
not esi
xor edi, edi
xor ebx, ebx
jmp 0x42afaf
mov eax, dword [ebp - 0x248]
and dword [eax + edi], esi
mov eax, dword [ebp - 0x244]
inc ebx
add edi, 0x20
cmp ebx, eax
jae 0x42afef
mov ecx, dword [ebp - 0x248]
cmp dword [ecx + edi + 4], 3
jne 0x42afa7
cmp dword [ecx + edi + 0x14], 0
jne 0x42afa7
mov dword [ebp - 0x25c], 0xffffffff
lea eax, [ebp - 0x25c]
push eax
push dword [ecx + edi + 0x1c]
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
je 0x42afa1
cmp dword [ebp - 0x25c], 0
jne 0x42af98
jmp 0x42afa1
xor edi, edi
inc edi
lea ebx, [ebp - 0x240]
push 3
push edi
push dword [ebp + 0x10]
lea eax, [ebp - 0x212]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
xor eax, eax
lea ecx, [ebp - 0x24c]
mov dword [ecx], eax
mov dword [ebp - 0x250], eax
push ecx
push eax
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x42b055
mov eax, dword [ebp - 0x250]
test eax, eax
je 0x42b03b
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x24c]
test eax, eax
je 0x42af28
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x42af28
lea eax, [ebp - 0x250]
push eax
push dword [ebp - 0x24c]
push dword [ebp - 0x248]
push dword [ebp - 0x244]
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
jne 0x42b02a
mov edi, dword [ebp - 0x250]
lea ebx, [ebp - 0x25c]
mov ecx, ebx
mov edx, dword [ebp + 8]
call fcn.0042ad80
xor eax, eax
push eax
push edi
push eax
push eax
push 4
push dword [ebp + 0xc]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov esi, eax
mov eax, dword [ebx]
test eax, eax
mov edi, dword [ebp + 0x18]
je 0x42b0cf
mov ecx, dword [ebp - 0x258]
cmp ecx, eax
je 0x42b0c0
add ecx, 0xfffffffe
jne 0x42b0b2
jmp 0x42b248
mov dword [ebp - 0x258], eax
push eax
call fcn.004ec97e
add esp, 4
cmp esi, 5
jne 0x42b113
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0042aa00
mov esi, 5
test al, al
je 0x42b113
jmp 0x42b1dc
cmp ecx, eax
je 0x42b0fb
add ecx, 0xfffffffe
jne 0x42b0ed
jmp 0x42b248
mov dword [ebp - 0x258], eax
push eax
call fcn.004ec97e
add esp, 4
mov edi, dword [ebp + 0x18]
mov esi, dword [ebp - 0x264]
mov eax, dword [ebp - 0x250]
test eax, eax
je 0x42b124
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov cl, byte [ebp + 0x14]
mov eax, dword [ebp - 0x24c]
test eax, eax
je 0x42b13c
push eax
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, ebx
test esi, esi
sete bl
setne al
or al, cl
jne 0x42af2a
push 0x18
call fcn.004ec94e
add esp, 4
mov esi, eax
mov ecx, eax
call fcn.0042be30
mov ebx, dword [edi]
mov dword [edi], esi
test ebx, ebx
je 0x42b179
mov ecx, ebx
call fcn.0042be50
push ebx
call fcn.004ec97e
add esp, 4
mov esi, dword [edi]
mov edx, dword [ebp + 8]
cmp esi, edx
je 0x42b19e
cmp byte [esi + 0xb], 0
movzx eax, byte [edx + 0xb]
js 0x42b220
test al, al
jns 0x42b1cc
mov ecx, esi
push dword [edx + 4]
push dword [edx]
call fcn.00455a00
mov eax, dword [ebp - 0x220]
mov ecx, dword [edi]
mov dword [ecx + 0x10], eax
mov eax, dword [edi]
mov ecx, dword [eax + 0x14]
mov edx, dword [ebp - 0x21c]
mov dword [eax + 0x14], edx
mov dword [ebp - 0x21c], ecx
mov eax, dword [edi]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0xc], ecx
mov bl, 1
jmp 0x42af2a
mov eax, dword [edx + 8]
mov dword [esi + 8], eax
movq xmm0, qword [edx]
movq qword [esi], xmm0
jmp 0x42b19e
mov edi, dword [ebp - 0x250]
lea ebx, [ebp - 0x25c]
mov ecx, ebx
mov edx, dword [ebp + 8]
call fcn.0042ad80
xor eax, eax
push eax
push edi
push eax
push eax
push 4
push dword [ebp + 0xc]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov dword [ebp - 0x264], eax
mov eax, dword [ebx]
test eax, eax
je 0x42b10a
mov ecx, dword [ebp - 0x258]
jmp 0x42b0ed
test al, al
jns 0x42b232
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx]
mov dword [ebp - 0x260], ecx
mov ecx, esi
push eax
push dword [ebp - 0x260]
call fcn.00455930
mov edi, dword [ebp + 0x18]
jmp 0x42b19e
push str....._third_partylibc_srcinclude__memoryconstruct_at.h:66:_assertion___loc___nullptr_failed:_null_pointer_given_to_destroy_at_n
push 0x565ab5
call fcn.0051c8d0
int3