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

Disassembly:
push 0x84
push 0x4dda60
call fcn.00477074
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 0x4313db
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4313db
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 0x4313db
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 0x4313db
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 0x4313db
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 0x4313db
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4313db
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 0x4313db
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 0x4313db
push 1
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x4313db
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 0x4313db
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x70], 8
cmp dword [ebp - 0x30], ebx
jne 0x4311a8
mov dword [ebp - 0x3c], ebx
cmp dword [ebp - 0x3c], ebx
je 0x4311c6
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 0x4313db
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 0x4313db
push 2
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x4313db
mov dword [ebp - 0x50], ebx
cmp dword [ebp - 0x3c], ebx
je 0x43127a
cmp dword [ebp - 0x74], ebx
je 0x43127a
mov dword [ebp - 0x20], ebx
mov eax, dword [ebp - 0x74]
cmp dword [ebp - 0x20], eax
jae 0x43127a
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 0x4313db
mov eax, dword [ebp - 0x28]
test byte [eax + 1], 0x10
jne 0x43127a
add eax, 8
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x431254
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 0x431275
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 0x4313db
inc dword [ebp - 0x50]
inc dword [ebp - 0x20]
jmp 0x43120f
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 0x4312aa
push 3
push 2
push dword [ebp - 0x1c]
call eax
jmp 0x4312b5
push 2
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x4313db
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x38], ebx
cmp dword [ebp - 0x38], ebx
jl 0x4312d4
mov eax, dword [ebp - 0x38]
mov dword [ebp + eax*4 - 0x5c], ebx
dec dword [ebp - 0x38]
jmp 0x4312c3
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 0x4312ee
cmp eax, ebx
jg 0x4312ee
xor ecx, ecx
jmp 0x4312d9
cmp dword [ebp - 0x3c], ebx
je 0x431339
cmp dword [ebp - 0x74], ebx
je 0x431339
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x74]
jae 0x431339
lea ecx, [ebp - 0x28]
push ecx
push eax
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x4313db
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 0x4313db
inc dword [ebp - 0x20]
jmp 0x4312f8
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 0x4313db
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call esi
push eax
call edi
mov dword [ebp - 0x5c], eax
cmp eax, ebx
je 0x4313bc
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 0x4313db
test dword [ebp - 0x4c], 0x400
je 0x431399
mov eax, 0x500
jmp 0x4313a3
mov eax, 0x1000
test dword [ebp - 0x4c], eax
je 0x4313a7
mov edi, eax
mov esi, eax
cmp si, bx
je 0x4313bc
push edi
push esi
lea eax, [ebp - 0x94]
push eax
call dword [ebp - 0x5c]
test eax, eax
je 0x4313db
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 0x4313db
mov dword [ebp - 0x54], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.004313f2
mov eax, dword [ebp - 0x54]
call fcn.004770b9
ret