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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4041f0
push 0x4035a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffff78
push ebx
push esi
push edi
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x44], 4
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x60]
push edx
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x68]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
je 0x401587
jmp 0x4019e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x401597
jmp 0x4019e2
mov eax, dword [ebp - 0x2c]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0
jne 0x4015b8
jmp 0x4019e2
mov ecx, dword [ebp - 0x38]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
jne 0x4015d9
jmp 0x4019e2
lea edx, [ebp - 0x88]
push edx
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x60]
push ecx
lea edx, [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x68]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
jne 0x40160a
jmp 0x4019e2
lea edx, [ebp - 0x5c]
push edx
push 0
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
je 0x401630
jmp 0x4019e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x401640
jmp 0x4019e2
mov eax, dword [ebp - 0x5c]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x401661
jmp 0x4019e2
lea ecx, [ebp - 0x5c]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
jne 0x401689
jmp 0x4019e2
push 1
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x4016a1
jmp 0x4019e2
lea ecx, [ebp - 0x48]
push ecx
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x4016c0
jmp 0x4019e2
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x54], 8
cmp dword [ebp - 0x1c], 0
jne 0x4016e2
mov dword [ebp - 0x3c], 0
cmp dword [ebp - 0x3c], 0
je 0x401703
push 2
push 0xc
lea edx, [ebp - 0x58]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x401703
jmp 0x4019e2
mov ecx, dword [ebp - 0x68]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edx, dword [ebp - 0x54]
lea eax, [edx + eax + 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x30], eax
push 2
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x401746
jmp 0x4019e2
mov dword [ebp - 0x70], 0
cmp dword [ebp - 0x3c], 0
je 0x4017f1
cmp dword [ebp - 0x58], 0
je 0x4017f1
mov dword [ebp - 0x24], 0
jmp 0x401773
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x58]
jae 0x4017f1
lea eax, [ebp - 0x64]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x401796
jmp 0x4019e2
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov cl, byte [eax + 1]
and ecx, 0x10
test ecx, ecx
je 0x4017a7
jmp 0x4017f1
mov edx, dword [ebp - 0x64]
add edx, 8
push edx
mov eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x4017be
jmp 0x40176a
mov ecx, dword [ebp - 0x64]
xor edx, edx
mov dx, word [ecx + 2]
push edx
mov eax, dword [ebp - 0x64]
push eax
push 0xffffffffffffffff
push 2
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x4017e3
jmp 0x4019e2
mov edx, dword [ebp - 0x70]
add edx, 1
mov dword [ebp - 0x70], edx
jmp 0x40176a
push str.AddAccessAllowedAceEx
push 0x42c98c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x40182f
mov eax, dword [ebp - 0x68]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 3
push 2
mov edx, dword [ebp - 0x30]
push edx
call dword [ebp - 0x40]
test eax, eax
jne 0x40182d
jmp 0x4019e2
jmp 0x40184c
mov eax, dword [ebp - 0x68]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 2
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x40184c
jmp 0x4019e2
cmp dword [ebp - 0x3c], 0
je 0x4018ad
cmp dword [ebp - 0x58], 0
je 0x4018ad
jmp 0x401863
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x58]
jae 0x4018ad
lea edx, [ebp - 0x64]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x401886
jmp 0x4019e2
mov edx, dword [ebp - 0x64]
xor eax, eax
mov ax, word [edx + 2]
push eax
mov ecx, dword [ebp - 0x64]
push ecx
push 0xffffffffffffffff
push 2
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x4018ab
jmp 0x4019e2
jmp 0x40185a
push 0
mov eax, dword [ebp - 0x30]
push eax
push 1
lea ecx, [ebp - 0x84]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x4018cb
jmp 0x4019e2
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x4019c0
mov word [ebp - 0x8c], 0
mov word [ebp - 0x98], 0
mov word [ebp - 0x90], 0
mov dword [ebp - 0x94], 0
lea edx, [ebp - 0x94]
push edx
lea eax, [ebp - 0x90]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x401935
jmp 0x4019e2
mov edx, dword [ebp - 0x90]
and edx, 0xffff
and edx, 0x400
test edx, edx
je 0x401964
mov word [ebp - 0x8c], 0x500
mov ax, word [ebp - 0x8c]
mov word [ebp - 0x98], ax
jmp 0x401991
mov ecx, dword [ebp - 0x90]
and ecx, 0xffff
and ecx, 0x1000
test ecx, ecx
je 0x401991
mov word [ebp - 0x8c], 0x1000
mov dx, word [ebp - 0x8c]
mov word [ebp - 0x98], dx
mov eax, dword [ebp - 0x8c]
and eax, 0xffff
test eax, eax
je 0x4019c0
mov cx, word [ebp - 0x98]
push ecx
mov dx, word [ebp - 0x8c]
push edx
lea eax, [ebp - 0x84]
push eax
call dword [ebp - 0x4c]
test eax, eax
jne 0x4019c0
jmp 0x4019e2
lea ecx, [ebp - 0x84]
push ecx
mov edx, dword [ebp - 0x44]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x4019db
jmp 0x4019e2
mov dword [ebp - 0x34], 1
mov dword [ebp - 4], 0xffffffff
call fcn.004019f0
jmp 0x401a55
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret