Function at 0x412b20
Capabilities:
Get session user name
Get user security identifier

Disassembly:
sub esp, 0x360
xor eax, eax
push ebx
mov dword [esp + 0x24], eax
mov ebx, dword [esp + 0x36c]
mov dword [esp + 0x28], eax
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push esi
mov esi, dword [esp + 0x370]
mov dword [esp + 0x34], eax
lea edx, [esp + 0xc]
push edi
mov dword [esp + 0x3c], eax
push edx
push 0x40000
push eax
mov edi, 1
lea ecx, [esp + 0x3c]
push esi
push ebx
mov dword [esp + 0x24], 0
mov dword [esp + 0x54], eax
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x38], 0xc
call ebp
test eax, eax
je 0x412d8b
lea eax, [esp + 0x10]
push eax
push 0x80000
push 0
push esi
push ebx
call ebp
test eax, eax
je 0x412c0d
lea ecx, [esp + 0x1c]
push ecx
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea edx, [esp + 0x48]
push edx
push 0x4279ac
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
push 0
push 0
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x4c]
push 0x10
push eax
push 0
push ecx
mov dword [esp + 0x5c], edi
mov dword [esp + 0x68], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
lea edx, [esp + 0x10]
push edx
push 0x80000
push 0
push esi
push ebx
call ebp
test eax, eax
je 0x412c0d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret 8
mov dx, word [0x428280]
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0xd2]
mov word [esp + 0xd0], dx
mov word [esp + 0x170], dx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x172]
mov dword [esp + 0x20], 0x64
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x170]
push eax
push ecx
mov dword [esp + 0x20], 0x50
mov dword [esp + 0x1c], 0x400
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x412c91
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret 8
lea eax, [esp + 0x58]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x412cbc
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret 8
lea edx, [esp + 0x54]
lea eax, [esp + 0x18]
push edx
lea ecx, [esp + 0xd4]
push eax
lea edx, [esp + 0x28]
push ecx
lea eax, [esp + 0x78]
push edx
lea ecx, [esp + 0x180]
push eax
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x412d06
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret 8
lea eax, [esp + 0x6c]
push 1
lea ecx, [esp + 0x5c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
jne 0x412d36
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret 8
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x58]
push eax
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
mov edi, eax
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x412d68
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret 8
lea eax, [esp + 0x10]
push eax
push 0x40000
push 0
push esi
push ebx
call ebp
test eax, eax
je 0x412d8b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret 8
lea ecx, [esp + 0x24]
push ecx
call fcn.00412ac0
test eax, eax
jne 0x412db3
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret 8
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
push eax
push 4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
mov esi, eax
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebp
sete al
pop ebx
add esp, 0x360
ret 8