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

Disassembly:
push 0x84
push 0x4dcd10
call fcn.00476f14
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 0x431524
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x431524
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 0x431524
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 0x431524
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 0x431524
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 0x431524
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x431524
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 0x431524
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 0x431524
push 1
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x431524
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 0x431524
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x70], 8
cmp dword [ebp - 0x30], ebx
jne 0x4312f1
mov dword [ebp - 0x3c], ebx
cmp dword [ebp - 0x3c], ebx
je 0x43130f
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 0x431524
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 0x431524
push 2
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x431524
mov dword [ebp - 0x50], ebx
cmp dword [ebp - 0x3c], ebx
je 0x4313c3
cmp dword [ebp - 0x74], ebx
je 0x4313c3
mov dword [ebp - 0x20], ebx
mov eax, dword [ebp - 0x74]
cmp dword [ebp - 0x20], eax
jae 0x4313c3
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 0x431524
mov eax, dword [ebp - 0x28]
test byte [eax + 1], 0x10
jne 0x4313c3
add eax, 8
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x43139d
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 0x4313be
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 0x431524
inc dword [ebp - 0x50]
inc dword [ebp - 0x20]
jmp 0x431358
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 0x4313f3
push 3
push 2
push dword [ebp - 0x1c]
call eax
jmp 0x4313fe
push 2
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x431524
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x38], ebx
cmp dword [ebp - 0x38], ebx
jl 0x43141d
mov eax, dword [ebp - 0x38]
mov dword [ebp + eax*4 - 0x5c], ebx
dec dword [ebp - 0x38]
jmp 0x43140c
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 0x431437
cmp eax, ebx
jg 0x431437
xor ecx, ecx
jmp 0x431422
cmp dword [ebp - 0x3c], ebx
je 0x431482
cmp dword [ebp - 0x74], ebx
je 0x431482
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x74]
jae 0x431482
lea ecx, [ebp - 0x28]
push ecx
push eax
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x431524
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 0x431524
inc dword [ebp - 0x20]
jmp 0x431441
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 0x431524
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call esi
push eax
call edi
mov dword [ebp - 0x5c], eax
cmp eax, ebx
je 0x431505
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 0x431524
test dword [ebp - 0x4c], 0x400
je 0x4314e2
mov eax, 0x500
jmp 0x4314ec
mov eax, 0x1000
test dword [ebp - 0x4c], eax
je 0x4314f0
mov edi, eax
mov esi, eax
cmp si, bx
je 0x431505
push edi
push esi
lea eax, [ebp - 0x94]
push eax
call dword [ebp - 0x5c]
test eax, eax
je 0x431524
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 0x431524
mov dword [ebp - 0x54], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.0043153b
mov eax, dword [ebp - 0x54]
call fcn.00476f59
ret