Function at 0x40dd30
Capabilities:
Get user security identifier

Disassembly:
push 0xffffffffffffffff
push 0x415428
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
push edi
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x10]
xor ebx, ebx
push eax
push ecx
lea edx, [esp + 0x1c]
push ebx
push edx
push ebx
push str.Everyone
push ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x28], 1
mov dword [esp + 0x34], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x7a
je 0x40dd96
mov dword [esp + 0xc], ebx
jmp 0x40df40
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push ebp
push eax
push 8
call esi
mov ebp, dword [sym.imp.KERNEL32.DLL_HeapAlloc]
push eax
call ebp
mov edi, eax
test edi, edi
je 0x40defb
mov ecx, dword [esp + 0x14]
lea edx, [ecx + ecx]
push edx
push 8
call esi
push eax
call ebp
xor esi, esi
mov dword [esp + 0x1c], eax
cmp eax, esi
jne 0x40dddb
mov dword [esp + 0x10], esi
jmp 0x40df03
lea ecx, [esp + 0x20]
lea edx, [esp + 0x14]
push ecx
push edx
push eax
lea eax, [esp + 0x24]
push eax
push edi
push str.Everyone
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x40de05
mov dword [esp + 0x10], esi
jmp 0x40df03
lea ecx, [esp + 0x24]
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x40de1f
mov dword [esp + 0x10], esi
jmp 0x40df03
push edi
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
add esi, 0x10
push esi
push 8
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call ebp
mov ebx, eax
xor ebp, ebp
cmp ebx, ebp
je 0x40deb3
push 2
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x40deb3
cmp dword [esp + 0x4c], ebp
je 0x40de87
push str.AddAccessAllowedAceEx
push str.advapi32.dll
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
cmp eax, ebp
push edi
push 0x10000000
jne 0x40dea8
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x40decc
mov dword [esp + 0x10], ebp
jmp 0x40df03
push str.AddAccessDeniedAceEx
push str.advapi32.dll
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
cmp eax, ebp
push edi
push 0x10000000
je 0x40deb9
push 3
push 2
push ebx
call eax
test eax, eax
jne 0x40decc
mov dword [esp + 0x10], ebp
jmp 0x40df03
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessDeniedAce]
test eax, eax
jne 0x40decc
mov dword [esp + 0x10], ebp
jmp 0x40df03
push ebp
push ebx
lea edx, [esp + 0x2c]
push 1
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x40dee5
mov dword [esp + 0x10], ebp
jmp 0x40df03
mov ecx, dword [esp + 0x48]
lea eax, [esp + 0x24]
push eax
push 4
push ecx
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x40df03
mov dword [esp + 0x10], 0
mov esi, dword [sym.imp.KERNEL32.DLL_HeapFree]
pop ebp
test edi, edi
je 0x40df1e
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push 0
call edi
push eax
call esi
jmp 0x40df24
mov edi, dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40df34
push eax
push 0
call edi
push eax
call esi
test ebx, ebx
je 0x40df40
push ebx
push 0
call edi
push eax
call esi
lea ecx, [esp + 0x44]
mov dword [esp + 0x3c], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x34
ret 8