Function at 0x401987
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3048
call fcn.00468270
push ebx
mov dword [ebp - 0x3020], 0
cmp dword [ebp + 8], 0
je 0x4019b6
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
test ecx, ecx
jne 0x4019b6
mov dword [ebp + 8], 0
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
je 0x4019ea
lea eax, [ebp - 0x3014]
push eax
lea ecx, [ebp - 0x3020]
push ecx
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x4019ea
cmp dword [ebp - 0xc], 0
jne 0x401a2a
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0xffffffff
mov edx, dword [ebp + 0x18]
mov dword [edx], 0xffffffff
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0xffffffff
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 4], 0
mov edx, dword [ebp + 0x18]
mov dword [edx + 4], 0
mov eax, dword [ebp + 0x1c]
mov dword [eax + 4], 0
xor al, al
jmp 0x40203d
cmp dword [ebp - 0x3020], 0
jne 0x401a81
mov ecx, dword [ebp + 8]
push ecx
push 0x4695c0
call fcn.00401438
add esp, 8
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 4], 0
mov edx, dword [ebp + 0x18]
mov dword [edx + 4], 0
mov eax, dword [ebp + 0x1c]
mov dword [eax + 4], 0
mov al, 1
jmp 0x40203d
mov dword [ebp - 0x3024], 0
mov dword [ebp - 4], 0
jmp 0x401a9d
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x3020]
xor eax, eax
mov ax, word [edx + 4]
cmp dword [ebp - 4], eax
jge 0x401d52
lea ecx, [ebp - 0x3028]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x3020]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
mov ecx, dword [ebp - 0x3028]
xor edx, edx
mov dl, byte [ecx]
test edx, edx
je 0x401ae9
mov eax, dword [ebp - 0x3028]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 1
je 0x401ae9
jmp 0x401a94
mov edx, dword [ebp - 0x3028]
xor eax, eax
mov al, byte [edx + 1]
and eax, 8
test eax, eax
je 0x401afd
jmp 0x401a94
mov ecx, dword [ebp - 0x3028]
add ecx, 8
mov dword [ebp - 0x3030], ecx
mov edx, dword [ebp - 0x3030]
push edx
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
jne 0x401b22
jmp 0x401a94
push 0x4695d0
mov eax, dword [ebp - 0x3030]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x401b7f
mov dword [ebp - 0x3038], 0
lea ecx, [ebp - 0x3034]
push ecx
lea edx, [ebp - 0x3038]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
test eax, eax
jne 0x401b63
jmp 0x401a94
cmp dword [ebp - 0x3038], 0
jne 0x401b71
jmp 0x401a94
mov ecx, dword [ebp - 0x3038]
mov dword [ebp - 0x3030], ecx
jmp 0x401bda
push 0x4695e0
mov edx, dword [ebp - 0x3030]
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x401bda
mov dword [ebp - 0x3040], 0
lea eax, [ebp - 0x303c]
push eax
lea ecx, [ebp - 0x3040]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorGroup]
test eax, eax
jne 0x401bc0
jmp 0x401a94
cmp dword [ebp - 0x3040], 0
jne 0x401bce
jmp 0x401a94
mov eax, dword [ebp - 0x3040]
mov dword [ebp - 0x3030], eax
cmp dword [0x479044], 0
jne 0x401bfe
push 0x4695f0
mov ecx, dword [ebp - 0x3030]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x401bfe
jmp 0x401a94
mov dword [ebp - 0x302c], 0
jmp 0x401c19
mov edx, dword [ebp - 0x302c]
add edx, 1
mov dword [ebp - 0x302c], edx
mov eax, dword [ebp - 0x302c]
cmp eax, dword [ebp - 0x3024]
jae 0x401c4f
mov ecx, dword [ebp - 0x302c]
imul ecx, ecx, 0xc
mov edx, dword [ebp + ecx - 0x3010]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x3030]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x401c4d
jmp 0x401c4f
jmp 0x401c0a
mov edx, dword [ebp - 0x302c]
cmp edx, dword [ebp - 0x3024]
jb 0x401ceb
mov eax, dword [ebp - 0x3024]
add eax, 1
cmp eax, 0x400
jb 0x401c91
push 0x10
push 0x478278
push str.Internal_error:_Too_many_accounts_in_ACL
mov ecx, dword [0x479050]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor al, al
jmp 0x40203d
mov edx, dword [ebp - 0x3024]
add edx, 1
mov dword [ebp - 0x3024], edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x3030]
push ecx
call fcn.00401438
add esp, 8
mov edx, dword [ebp - 0x302c]
imul edx, edx, 0xc
mov dword [ebp + edx - 0x3010], eax
mov eax, dword [ebp - 0x302c]
imul eax, eax, 0xc
mov dword [ebp + eax - 0x300c], 0
mov ecx, dword [ebp - 0x302c]
imul ecx, ecx, 0xc
mov dword [ebp + ecx - 0x3008], 0
mov edx, dword [ebp - 0x3028]
xor eax, eax
mov al, byte [edx]
test eax, eax
jne 0x401d24
mov ecx, dword [ebp - 0x302c]
imul ecx, ecx, 0xc
mov edx, dword [ebp - 0x3028]
mov eax, dword [ebp + ecx - 0x300c]
or eax, dword [edx + 4]
mov ecx, dword [ebp - 0x302c]
imul ecx, ecx, 0xc
mov dword [ebp + ecx - 0x300c], eax
jmp 0x401d4d
mov edx, dword [ebp - 0x302c]
imul edx, edx, 0xc
mov eax, dword [ebp - 0x3028]
mov ecx, dword [ebp + edx - 0x3008]
or ecx, dword [eax + 4]
mov edx, dword [ebp - 0x302c]
imul edx, edx, 0xc
mov dword [ebp + edx - 0x3008], ecx
jmp 0x401a94
mov dword [ebp - 8], 0
jmp 0x401d64
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x3024]
jae 0x401dd6
mov edx, dword [ebp - 8]
imul edx, edx, 0xc
lea eax, [ebp + edx - 0x300c]
mov dword [ebp - 0x3044], eax
mov ecx, dword [ebp - 0x3044]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [edx + 4]
mov bl, al
and ebx, 0xff
neg ebx
sbb ebx, ebx
and ebx, 0x80000000
mov eax, dword [ebp - 0x3044]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
call dword [eax + 8]
and eax, 0xff
neg eax
sbb eax, eax
and eax, 0x40000000
or ebx, eax
mov ecx, dword [ebp - 0x3044]
mov dword [ecx], ebx
jmp 0x401d5b
mov dword [ebp - 8], 0
jmp 0x401de8
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x3024]
jae 0x401f02
mov dword [ebp - 0x3048], 0
jmp 0x401e12
mov ecx, dword [ebp - 0x3048]
add ecx, 1
mov dword [ebp - 0x3048], ecx
mov edx, dword [ebp - 0x3048]
cmp edx, dword [ebp - 0x3024]
jae 0x401efd
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x3048]
jne 0x401e31
jmp 0x401e03
mov ecx, dword [ebp - 0x3048]
imul ecx, ecx, 0xc
mov edx, dword [ebp + ecx - 0x3010]
cmp dword [edx + 0x18], 2
je 0x401e75
mov eax, dword [ebp - 0x3048]
imul eax, eax, 0xc
mov ecx, dword [ebp + eax - 0x3010]
cmp dword [ecx + 0x18], 5
je 0x401e75
mov edx, dword [ebp - 0x3048]
imul edx, edx, 0xc
mov eax, dword [ebp + edx - 0x3010]
cmp dword [eax + 0x18], 4
je 0x401e75
jmp 0x401e03
push 0x4695c0
mov ecx, dword [ebp - 0x3048]
imul ecx, ecx, 0xc
mov edx, dword [ebp + ecx - 0x3010]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x401ef8
mov ecx, dword [ebp - 8]
imul ecx, ecx, 0xc
mov edx, dword [ebp - 0x3048]
imul edx, edx, 0xc
mov eax, dword [ebp + edx - 0x300c]
not eax
mov ecx, dword [ebp + ecx - 0x300c]
and ecx, eax
mov edx, dword [ebp - 8]
imul edx, edx, 0xc
mov dword [ebp + edx - 0x300c], ecx
mov eax, dword [ebp - 8]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x3048]
imul ecx, ecx, 0xc
mov edx, dword [ebp + ecx - 0x3008]
not edx
mov eax, dword [ebp + eax - 0x3008]
and eax, edx
mov ecx, dword [ebp - 8]
imul ecx, ecx, 0xc
mov dword [ebp + ecx - 0x3008], eax
jmp 0x401e03
jmp 0x401e03
jmp 0x401ddf
push 0x40196e
push 0xc
mov edx, dword [ebp - 0x3024]
push edx
lea eax, [ebp - 0x3010]
push eax
call dword [sym.imp.MSVCRT.dll_qsort]
add esp, 0x10
mov dword [ebp - 0x3018], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x301c], 0
mov dword [ebp - 8], 0
jmp 0x401f4d
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 0x3024]
jae 0x40200e
mov eax, dword [ebp - 8]
imul eax, eax, 0xc
mov ecx, dword [ebp + eax - 0x300c]
and ecx, 0x80000000
test ecx, ecx
je 0x401f9b
mov edx, dword [ebp - 8]
imul edx, edx, 0xc
mov eax, dword [ebp - 0x3018]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + edx - 0x3010]
mov dword [ecx + eax*4], edx
mov eax, dword [ebp - 0x3018]
add eax, 1
mov dword [ebp - 0x3018], eax
mov ecx, dword [ebp - 8]
imul ecx, ecx, 0xc
mov edx, dword [ebp + ecx - 0x300c]
and edx, 0x40000000
test edx, edx
je 0x401fd1
mov eax, dword [ebp - 8]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + eax - 0x3010]
mov dword [edx + ecx*4], eax
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 8]
imul edx, edx, 0xc
cmp dword [ebp + edx - 0x3008], 0
je 0x402009
mov eax, dword [ebp - 8]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x301c]
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + eax - 0x3010]
mov dword [edx + ecx*4], eax
mov ecx, dword [ebp - 0x301c]
add ecx, 1
mov dword [ebp - 0x301c], ecx
jmp 0x401f44
mov edx, dword [ebp - 0x3018]
mov eax, dword [ebp + 0x14]
mov dword [eax + edx*4], 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0x18]
mov dword [edx + ecx*4], 0
mov eax, dword [ebp - 0x301c]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx + eax*4], 0
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret