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

Disassembly:
push 0x84
push 0x4d74c8
call fcn.00471c54
xor ebx, ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x44]
push eax
push ebx
lea eax, [ebp - 0x48]
push eax
push ebx
push dword [ebp + 0xc]
push ebx
mov edi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
call edi
cmp eax, ebx
jne 0x4310eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4310eb
push dword [ebp - 0x48]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call esi
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x4310eb
mov eax, dword [ebp - 0x44]
add eax, eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x40], eax
cmp eax, ebx
je 0x4310eb
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x40]
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x24]
push dword [ebp + 0xc]
push ebx
call edi
cmp eax, ebx
je 0x4310eb
lea eax, [ebp - 0x34]
push eax
push ebx
push ebx
push 4
push dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
call edi
cmp eax, ebx
jne 0x4310eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4310eb
push dword [ebp - 0x34]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x2c], eax
cmp eax, ebx
je 0x4310eb
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x2c]
push 4
push dword [ebp + 8]
call edi
cmp eax, ebx
je 0x4310eb
push 1
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x4310eb
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x4310eb
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x70], 8
cmp dword [ebp - 0x30], ebx
jne 0x430eb8
mov dword [ebp - 0x3c], ebx
cmp dword [ebp - 0x3c], ebx
je 0x430ed6
push 2
push 0xc
lea eax, [ebp - 0x74]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x4310eb
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x70]
lea edi, [eax + ecx + 8]
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x4310eb
push 2
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x4310eb
mov dword [ebp - 0x50], ebx
cmp dword [ebp - 0x3c], ebx
je 0x430f8a
cmp dword [ebp - 0x74], ebx
je 0x430f8a
mov dword [ebp - 0x20], ebx
mov eax, dword [ebp - 0x74]
cmp dword [ebp - 0x20], eax
jae 0x430f8a
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x4310eb
mov eax, dword [ebp - 0x28]
test byte [eax + 1], 0x10
jne 0x430f8a
add eax, 8
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x430f64
mov esi, dword [ebp - 0x28]
lea edi, [ebp - 0x80]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jmp 0x430f85
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x4310eb
inc dword [ebp - 0x50]
inc dword [ebp - 0x20]
jmp 0x430f1f
push str.AddAccessAllowedAceEx
push str.advapi32.dll
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
call esi
push eax
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call edi
push dword [ebp - 0x24]
push dword [ebp + 0x10]
cmp eax, ebx
je 0x430fba
push 3
push 2
push dword [ebp - 0x1c]
call eax
jmp 0x430fc5
push 2
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x4310eb
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x38], ebx
cmp dword [ebp - 0x38], ebx
jl 0x430fe4
mov eax, dword [ebp - 0x38]
mov dword [ebp + eax*4 - 0x5c], ebx
dec dword [ebp - 0x38]
jmp 0x430fd3
xor eax, eax
mov dword [ebp - 0x60], eax
mov dword [ebp + eax*4 - 0x5c], ecx
inc eax
mov dword [ebp - 0x60], eax
cmp eax, 1
jge 0x430ffe
cmp eax, ebx
jg 0x430ffe
xor ecx, ecx
jmp 0x430fe9
cmp dword [ebp - 0x3c], ebx
je 0x431049
cmp dword [ebp - 0x74], ebx
je 0x431049
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x74]
jae 0x431049
lea ecx, [ebp - 0x28]
push ecx
push eax
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x4310eb
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x4310eb
inc dword [ebp - 0x20]
jmp 0x431008
push ebx
push dword [ebp - 0x1c]
push 1
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4310eb
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call esi
push eax
call edi
mov dword [ebp - 0x5c], eax
cmp eax, ebx
je 0x4310cc
xor esi, esi
xor edi, edi
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x64], ebx
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x4310eb
test dword [ebp - 0x4c], 0x400
je 0x4310a9
mov eax, 0x500
jmp 0x4310b3
mov eax, 0x1000
test dword [ebp - 0x4c], eax
je 0x4310b7
mov edi, eax
mov esi, eax
cmp si, bx
je 0x4310cc
push edi
push esi
lea eax, [ebp - 0x94]
push eax
call dword [ebp - 0x5c]
test eax, eax
je 0x4310eb
lea eax, [ebp - 0x94]
push eax
push 4
pop eax
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
je 0x4310eb
mov dword [ebp - 0x54], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.00431102
mov eax, dword [ebp - 0x54]
call fcn.00471c99
ret