Function at 0x4030f0
Capabilities:
Compare security identifiers
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x462c50
push 0x437c90
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push esi
push edi
mov eax, dword [0x4677a0]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
xor esi, esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x30]
push ecx
push esi
lea edx, [ebp - 0x34]
push edx
push esi
mov eax, dword [ebp + 0xc]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, esi
jne 0x4035e1
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x403189
call ebx
push eax
push str.LookupAccountName___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
mov ecx, dword [ebp - 0x34]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call edi
mov esi, eax
mov dword [ebp - 0x38], esi
test esi, esi
jne 0x4031bc
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
mov edx, dword [ebp - 0x30]
lea eax, [edx + edx]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x48], eax
test eax, eax
je 0x4031a7
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x30]
push edx
push eax
lea eax, [ebp - 0x34]
push eax
push esi
mov ecx, dword [ebp + 0xc]
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x403174
lea edx, [ebp - 0x20]
push edx
push 0
push 0
push 4
mov eax, dword [ebp + 8]
push eax
mov esi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
call esi
test eax, eax
jne 0x4035e1
call ebx
cmp eax, 0x7a
je 0x40322d
call ebx
push eax
push str.GetFileSecurity___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
mov ecx, dword [ebp - 0x20]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov ebx, eax
mov dword [ebp - 0x3c], ebx
test ebx, ebx
jne 0x40325e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x20]
push eax
push ebx
push 4
mov ecx, dword [ebp + 8]
push ecx
call esi
xor esi, esi
cmp eax, esi
jne 0x40328e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetFileSecurity___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
push 1
lea edx, [ebp - 0x7c]
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x4032b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x24]
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x4032e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x64], 8
mov eax, dword [ebp - 0x28]
cmp eax, esi
jne 0x40334f
mov dword [ebp - 0x24], esi
mov ebx, dword [ebp - 0x38]
push ebx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edx, dword [ebp - 0x64]
lea esi, [eax + edx + 8]
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov edi, eax
mov dword [ebp - 0x4c], edi
test edi, edi
je 0x403245
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x403380
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InitializeAcl___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
cmp dword [ebp - 0x24], esi
je 0x4032fe
push 2
push 0xc
lea ecx, [ebp - 0x68]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x4032fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetAclInformation___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
xor esi, esi
mov dword [ebp - 0x40], esi
cmp dword [ebp - 0x24], esi
je 0x403421
cmp dword [ebp - 0x68], esi
je 0x403421
mov dword [ebp - 0x2c], esi
cmp esi, dword [ebp - 0x68]
jae 0x403424
lea eax, [ebp - 0x1c]
push eax
push esi
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x4033cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetAce___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
mov eax, dword [ebp - 0x1c]
test byte [eax + 1], 0x10
jne 0x403424
add eax, 8
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x40341b
mov eax, dword [ebp - 0x1c]
movzx edx, word [eax + 2]
push edx
push eax
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x403418
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAce___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
inc dword [ebp - 0x40]
inc esi
jmp 0x403397
mov esi, dword [ebp - 0x2c]
push str.AddAccessAllowedAceEx
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebx
test eax, eax
je 0x40346a
mov ecx, 0x10000000
push ecx
push 3
push 2
push edi
call eax
test eax, eax
jne 0x403496
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAccessAllowedAceEx___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
mov eax, 0x10000000
push eax
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x403496
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
cmp dword [ebp - 0x24], 0
je 0x4034e0
cmp dword [ebp - 0x68], 0
je 0x4034e0
cmp esi, dword [ebp - 0x68]
jae 0x4034e0
lea eax, [ebp - 0x1c]
push eax
push esi
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x4033b6
mov eax, dword [ebp - 0x1c]
movzx edx, word [eax + 2]
push edx
push eax
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x4033ff
inc esi
mov dword [ebp - 0x2c], esi
jmp 0x4034a2
push 0
push edi
push 1
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x40350c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
xor esi, esi
cmp ebx, esi
je 0x4035ac
xor edi, edi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x58], esi
lea ecx, [ebp - 0x58]
push ecx
lea edx, [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x403566
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorControl___failed.Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
mov eax, dword [ebp - 0x44]
test eax, 0x400
je 0x403577
mov esi, 0x500
jmp 0x403583
test eax, 0x1000
je 0x403585
mov esi, 0x1000
mov edi, esi
test si, si
je 0x4035ac
push edi
push esi
lea ecx, [ebp - 0x7c]
push ecx
call ebx
test eax, eax
jne 0x4035ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorControl___failed.Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
lea edx, [ebp - 0x7c]
push edx
mov eax, 4
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x4035da
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetFileSecurity___failed._Error__d_n
call fcn.004357dd
add esp, 8
jmp 0x4035e1
mov dword [ebp - 0x50], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.00403602
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret