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

Disassembly:
push ebp
lea ebp, [esp - 0x404]
sub esp, 0x404
push 0xfffffffffffffffe
push 0x1016d380
push 0x10118480
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x1017455c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x400], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x40c]
mov dword [ebp - 0x50], eax
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 4], ebx
cmp dword [0x101936fc], 4
jle 0x10019867
push eax
push str.AccessToFolder:__s
lea eax, [ebp]
push eax
call fcn.1010d6a8
add esp, 0xc
lea esi, [ebp]
call fcn.10019680
mov esi, edi
call fcn.100721d0
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x1001993a
lea ecx, [ebp - 0x7c]
push ecx
lea edx, [ebp - 0x44]
push edx
push ebx
lea ecx, [ebp - 0x48]
push ecx
push eax
push edi
push ebx
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
call esi
cmp eax, ebx
jne 0x100198b2
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x100198e8
call ebx
cmp eax, 0x534
jne 0x100198b2
mov dword [ebp - 0x4c], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.10019def
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x400]
xor ecx, ebp
call fcn.1010d699
add ebp, 0x404
mov esp, ebp
pop ebp
ret 4
mov edx, dword [ebp - 0x48]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call ebx
mov dword [ebp - 0x20], eax
test eax, eax
je 0x100198b2
mov eax, dword [ebp - 0x44]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov dword [ebp - 0x40], eax
test eax, eax
je 0x100198b2
lea ecx, [ebp - 0x7c]
push ecx
lea edx, [ebp - 0x44]
push edx
push eax
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x20]
push edx
push edi
push 0
call esi
test eax, eax
je 0x100198b2
jmp 0x10019940
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
lea eax, [ebp - 0x38]
push eax
push 0
push 0
push 4
mov ecx, dword [ebp - 0x50]
push ecx
mov esi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
call esi
test eax, eax
jne 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x100198b2
mov edx, dword [ebp - 0x38]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov dword [ebp - 0x28], eax
test eax, eax
je 0x100198b2
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x28]
push edx
push 4
mov eax, dword [ebp - 0x50]
push eax
call esi
test eax, eax
je 0x100198b2
push 1
lea ecx, [ebp - 0x98]
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x100198b2
lea edx, [ebp - 0x84]
push edx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x100198b2
xor edi, edi
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x74], 8
mov eax, dword [ebp - 0x30]
cmp eax, edi
jne 0x100199f6
mov dword [ebp - 0x3c], edi
jmp 0x10019a14
cmp dword [ebp - 0x3c], edi
je 0x10019a14
push 2
push 0xc
lea ecx, [ebp - 0x78]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x100198b2
xor edi, edi
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x74]
lea esi, [eax + ecx + 8]
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x100198b2
push 2
push esi
mov edx, eax
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x100198b2
mov dword [ebp - 0x54], 0
cmp dword [ebp - 0x3c], 0
je 0x10019bc6
cmp dword [ebp - 0x78], 0
je 0x10019bc6
xor edi, edi
mov dword [ebp - 0x34], edi
mov ebx, dword [sym.imp.ADVAPI32.dll_EqualSid]
cmp edi, dword [ebp - 0x78]
jae 0x10019bc9
lea eax, [ebp - 0x1c]
push eax
push edi
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x10019aca
xor eax, eax
je 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR____GetAce___failed._Error__d
xor eax, eax
push eax
call fcn.1010d6a8
add esp, 0xc
cmp dword [0x101936fc], 4
jle 0x100198b2
xor esi, esi
call fcn.10019680
jmp 0x100198b2
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
jne 0x10019adb
test byte [eax + 1], 0x10
jne 0x10019bc9
add eax, 8
push eax
cmp ecx, 2
je 0x10019af7
mov edx, dword [ebp - 0x20]
push edx
call ebx
test eax, eax
je 0x10019b86
jmp 0x10019bbd
xor esi, esi
mov dword [ebp - 0x2c], esi
mov eax, dword [ebp - 0x6c]
push eax
call ebx
test eax, eax
je 0x10019b0e
mov esi, 1
mov dword [ebp - 0x2c], esi
mov ecx, dword [ebp - 0x1c]
add ecx, 8
push ecx
mov edx, dword [ebp - 0x68]
push edx
call ebx
test eax, eax
je 0x10019b27
mov esi, 1
mov dword [ebp - 0x2c], esi
mov eax, dword [ebp - 0x1c]
add eax, 8
push eax
mov ecx, dword [ebp - 0x58]
push ecx
call ebx
test eax, eax
je 0x10019b40
mov esi, 1
mov dword [ebp - 0x2c], esi
mov edx, dword [ebp - 0x1c]
add edx, 8
push edx
mov eax, dword [ebp - 0x5c]
push eax
call ebx
test eax, eax
je 0x10019b59
mov esi, 1
mov dword [ebp - 0x2c], esi
mov ecx, dword [ebp - 0x1c]
add ecx, 8
push ecx
mov edx, dword [ebp - 0x60]
push edx
call ebx
test eax, eax
je 0x10019b82
mov eax, dword [0x10191664]
cmp eax, 6
je 0x10019b82
cmp eax, 7
je 0x10019b82
mov dword [ebp - 0x2c], 1
jmp 0x10019b86
test esi, esi
je 0x10019bbd
mov eax, dword [ebp - 0x1c]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x10019bba
xor eax, eax
je 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR____AddAce___failed._Error__d
jmp 0x10019aa6
inc dword [ebp - 0x54]
inc edi
mov dword [ebp - 0x34], edi
jmp 0x10019a76
mov edi, dword [ebp - 0x34]
xor ebx, ebx
jne 0x10019c00
mov eax, dword [ebp - 0x20]
push eax
mov eax, sym.EncDec.dll_Ordinal_183
push eax
push 2
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x10019c55
xor eax, eax
je 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR____AddAccessAllowedAce___failed._Error__d
jmp 0x10019aa6
cmp ebx, 1
jne 0x10019c55
mov edx, dword [ebp - 0x20]
push edx
mov esi, sym.EncDec.dll_Ordinal_183
push esi
push 2
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_AddAccessDeniedAce]
test eax, eax
jne 0x10019c38
xor eax, eax
je 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR____AddAccessDeniedAce___failed._Error__d
jmp 0x10019aa6
cmp esi, 0x40000000
jne 0x10019c55
mov ecx, dword [ebp - 0x20]
push ecx
push 0xa0000000
push 2
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
mov esi, dword [ebp - 0x24]
test ebx, ebx
jne 0x10019cfb
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
push esi
mov ebx, dword [sym.imp.ADVAPI32.dll_GetAce]
call ebx
test eax, eax
jne 0x10019c8e
xor eax, eax
je 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetAce___failed.__Error__d...
jmp 0x10019aa6
mov edx, dword [ebp - 0x1c]
mov byte [edx + 1], 3
cmp dword [ebp - 0x3c], 0
je 0x10019cfb
cmp dword [ebp - 0x78], 0
je 0x10019cfb
cmp edi, dword [ebp - 0x78]
jae 0x10019cfb
lea eax, [ebp - 0x1c]
push eax
push edi
mov ecx, dword [ebp - 0x30]
push ecx
call ebx
test eax, eax
je 0x10019a92
mov eax, dword [ebp - 0x1c]
movzx edx, word [eax + 2]
push edx
push eax
push 0xffffffffffffffff
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x10019cf5
xor eax, eax
je 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR____AddAce___failed._Error__d
xor eax, eax
push eax
call fcn.1010d6a8
add esp, 0xc
jmp 0x100198b2
inc edi
mov dword [ebp - 0x34], edi
jmp 0x10019ca1
push 0
push esi
push 1
lea eax, [ebp - 0x98]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x10019d2a
xor eax, eax
je 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR____SetSecurityDescriptorDacl___failed._Error__d
jmp 0x10019aa6
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
xor edi, edi
cmp esi, edi
je 0x10019db7
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x80], edi
lea ecx, [ebp - 0x80]
push ecx
lea edx, [ebp - 0x64]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x10019d7e
cmp eax, edi
je 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR____GetSecurityDescriptorControl___failed.Error__d
jmp 0x10019aa6
test dword [ebp - 0x64], 0x1400
je 0x10019db7
push 0xf00
push 0xf00
lea ecx, [ebp - 0x98]
push ecx
call esi
test eax, eax
jne 0x10019db7
cmp eax, edi
je 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR____SetSecurityDescriptorControl___failed.Error__d
jmp 0x10019aa6
lea edx, [ebp - 0x98]
push edx
mov eax, 4
push eax
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x100198ab
cmp eax, edi
je 0x100198b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR____SetFileSecurity___failed._Error__d
jmp 0x10019aa6