Function at 0x401480
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbc
mov eax, dword [0x42b730]
xor eax, ebp
mov dword [ebp - 0xc], eax
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xb0], 0
mov dword [ebp - 8], 0x400
mov dword [ebp - 0xb8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0xac], 0x50
push 0xc
push 0
mov eax, dword [ebp + 8]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
cmp dword [ebp - 0xbc], 0
jne 0x4014f9
xor eax, eax
jmp 0x4016f5
push 1
mov ecx, dword [ebp - 0xbc]
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x401513
xor eax, eax
jmp 0x4016f5
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], 0
jne 0x401536
xor eax, eax
jmp 0x4016f5
push 0x94
push 0
lea edx, [ebp - 0xa8]
push edx
call sub.MSVCR90.dll_memset
add esp, 0xc
mov dword [ebp - 0xa8], 0x94
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0xa4], 4
jbe 0x40158d
push 4
push 0x400
mov ecx, dword [ebp - 0xb0]
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x40158b
xor eax, eax
jmp 0x4016f5
jmp 0x4015ac
push 2
push 0x400
mov edx, dword [ebp - 0xb0]
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x4015ac
xor eax, eax
jmp 0x4016f5
mov dword [ebp - 8], 0x400
mov eax, dword [ebp - 8]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0xb8], eax
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 4], eax
mov dword [ebp - 0xac], 0x50
mov ecx, dword [ebp - 0xac]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0xb8], 0
je 0x40160c
cmp dword [ebp - 4], 0
je 0x40160c
cmp dword [ebp - 0xb4], 0
jne 0x401613
xor eax, eax
jmp 0x4016f5
mov edx, dword [ebp - 4]
push edx
lea eax, [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0xb4]
push ecx
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 0xb8]
push eax
push 0x422670
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
jne 0x401648
xor eax, eax
jmp 0x4016f5
mov ecx, dword [ebp - 0xb8]
push ecx
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
jne 0x401660
xor eax, eax
jmp 0x4016f5
cmp dword [ebp - 0xa4], 4
jbe 0x40168e
mov edx, dword [ebp - 0xb8]
push edx
push 0x10000000
push 4
mov eax, dword [ebp - 0xb0]
push eax
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x40168c
xor eax, eax
jmp 0x4016f5
jmp 0x4016b1
mov ecx, dword [ebp - 0xb8]
push ecx
push 0x10000000
push 2
mov edx, dword [ebp - 0xb0]
push edx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x4016b1
xor eax, eax
jmp 0x4016f5
push 0
mov eax, dword [ebp - 0xb0]
push eax
push 1
mov ecx, dword [ebp - 0xbc]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x4016d1
xor eax, eax
jmp 0x4016f5
mov edx, dword [ebp + 8]
mov dword [edx], 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xbc]
mov dword [eax + 4], ecx
mov edx, dword [ebp + 8]
mov dword [edx + 8], 1
mov eax, 1
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.0041fff8
mov esp, ebp
pop ebp
ret