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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x25
push 0
push 0
dec ecx
jne 0x605999
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x60630f
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x28], eax
xor eax, eax
mov dword [ebp - 0x2c], eax
xor eax, eax
mov dword [ebp - 0x3c], eax
xor esi, esi
mov dword [ebp - 0x40], 4
mov byte [ebp - 0xd], 0
xor edx, edx
push ebp
push 0x606283
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x20]
push eax
push edi
mov eax, dword [ebp - 8]
push eax
push 0
call sub.advapi32.dll_LookupAccountNameW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x605a6e
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
je 0x605a6e
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x8c]
call fcn.0042647c
mov ecx, dword [ebp - 0x8c]
lea eax, [ebp - 0x88]
mov edx, 0x606330
call fcn.0040b2a4
mov ecx, dword [ebp - 0x88]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
mov eax, dword [ebp - 0x20]
call fcn.00605778
mov edi, eax
test edi, edi
jne 0x605abd
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x94]
call fcn.0042647c
mov ecx, dword [ebp - 0x94]
lea eax, [ebp - 0x90]
mov edx, 0x606370
call fcn.0040b2a4
mov ecx, dword [ebp - 0x90]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
mov eax, dword [ebp - 0x1c]
add eax, eax
add eax, eax
call fcn.00605778
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x605b13
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x9c]
call fcn.0042647c
mov ecx, dword [ebp - 0x9c]
lea eax, [ebp - 0x98]
mov edx, 0x606370
call fcn.0040b2a4
mov ecx, dword [ebp - 0x98]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x20]
push eax
push edi
mov eax, dword [ebp - 8]
push eax
push 0
call sub.advapi32.dll_LookupAccountNameW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x605b7a
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xa4]
call fcn.0042647c
mov ecx, dword [ebp - 0xa4]
lea eax, [ebp - 0xa0]
mov edx, 0x606330
call fcn.0040b2a4
mov ecx, dword [ebp - 0xa0]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
lea eax, [ebp - 0x28]
push eax
push 0
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x40]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_GetFileSecurityW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x605be6
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
je 0x605be6
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xac]
call fcn.0042647c
mov ecx, dword [ebp - 0xac]
lea eax, [ebp - 0xa8]
mov edx, 0x6063a4
call fcn.0040b2a4
mov ecx, dword [ebp - 0xa8]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
mov eax, dword [ebp - 0x28]
call fcn.00605778
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x605c38
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xb4]
call fcn.0042647c
mov ecx, dword [ebp - 0xb4]
lea eax, [ebp - 0xb0]
mov edx, 0x606370
call fcn.0040b2a4
mov ecx, dword [ebp - 0xb0]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x40]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_GetFileSecurityW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x605c9c
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xbc]
call fcn.0042647c
mov ecx, dword [ebp - 0xbc]
lea eax, [ebp - 0xb8]
mov edx, 0x6063a4
call fcn.0040b2a4
mov ecx, dword [ebp - 0xb8]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
push 1
lea eax, [ebp - 0x78]
push eax
call sub.advapi32.dll_InitializeSecurityDescriptor
test eax, eax
jne 0x605cec
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xc4]
call fcn.0042647c
mov ecx, dword [ebp - 0xc4]
lea eax, [ebp - 0xc0]
mov edx, 0x6063e0
call fcn.0040b2a4
mov ecx, dword [ebp - 0xc0]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_GetSecurityDescriptorDacl
test eax, eax
jne 0x605d46
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xcc]
call fcn.0042647c
mov ecx, dword [ebp - 0xcc]
lea eax, [ebp - 0xc8]
mov edx, 0x606434
call fcn.0040b2a4
mov ecx, dword [ebp - 0xc8]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
xor eax, eax
mov dword [ebp - 0x84], eax
xor eax, eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x80], 8
cmp dword [ebp - 0x2c], 0
jne 0x605d65
xor eax, eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x605dca
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x58], eax
push 2
push 0xc
lea eax, [ebp - 0x84]
push eax
mov eax, dword [ebp - 0x58]
push eax
call sub.advapi32.dll_GetAclInformation
test eax, eax
jne 0x605dca
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xd4]
call fcn.0042647c
mov ecx, dword [ebp - 0xd4]
lea eax, [ebp - 0xd0]
mov edx, 0x606484
call fcn.0040b2a4
mov ecx, dword [ebp - 0xd0]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
push edi
call sub.advapi32.dll_GetLengthSid
mov edx, dword [ebp - 0x80]
add edx, 0xc
add eax, edx
sub eax, 4
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
call fcn.00605778
mov ebx, eax
test ebx, ebx
jne 0x605e2d
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xdc]
call fcn.0042647c
mov ecx, dword [ebp - 0xdc]
lea eax, [ebp - 0xd8]
mov edx, 0x6064b8
call fcn.0040b2a4
mov ecx, dword [ebp - 0xd8]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
push 2
mov eax, dword [ebp - 0x38]
push eax
push ebx
call sub.advapi32.dll_InitializeAcl
test eax, eax
jne 0x605e7e
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xe4]
call fcn.0042647c
mov ecx, dword [ebp - 0xe4]
lea eax, [ebp - 0xe0]
mov edx, 0x6064e0
call fcn.0040b2a4
mov ecx, dword [ebp - 0xe0]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
cmp dword [ebp - 0x30], 0
je 0x605f82
cmp dword [ebp - 0x84], 0
jbe 0x605f82
mov eax, dword [ebp - 0x84]
dec eax
test eax, eax
jb 0x605f82
inc eax
mov dword [ebp - 0x54], eax
xor esi, esi
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x3c]
push eax
push esi
mov eax, dword [ebp - 0x5c]
push eax
call sub.advapi32.dll_GetAce
test eax, eax
jne 0x605f03
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xec]
call fcn.0042647c
mov ecx, dword [ebp - 0xec]
lea eax, [ebp - 0xe8]
mov edx, 0x60650c
call fcn.0040b2a4
mov ecx, dword [ebp - 0xe8]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
mov eax, dword [ebp - 0x3c]
test byte [eax + 1], 0x10
ja 0x605f82
mov eax, dword [ebp - 0x3c]
add eax, 8
push eax
push edi
call sub.advapi32.dll_EqualSid
test eax, eax
jne 0x605f78
mov eax, dword [ebp - 0x3c]
movzx eax, word [eax + 2]
push eax
mov eax, dword [ebp - 0x3c]
push eax
push 0xffffffffffffffff
push 2
push ebx
call sub.advapi32.dll_AddAce
test eax, eax
jne 0x605f78
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xf4]
call fcn.0042647c
mov ecx, dword [ebp - 0xf4]
lea eax, [ebp - 0xf0]
mov edx, 0x606528
call fcn.0040b2a4
mov ecx, dword [ebp - 0xf0]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
inc esi
dec dword [ebp - 0x54]
jne 0x605eaa
mov byte [ebp - 0x4d], 0x13
push edi
mov eax, dword [ebp - 0xc]
push eax
movzx eax, byte [ebp - 0x4d]
push eax
push 2
push ebx
call sub.advapi32.dll_AddAccessAllowedAceEx
test eax, eax
jne 0x605fdd
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xfc]
call fcn.0042647c
mov ecx, dword [ebp - 0xfc]
lea eax, [ebp - 0xf8]
mov edx, 0x606544
call fcn.0040b2a4
mov ecx, dword [ebp - 0xf8]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
cmp dword [ebp - 0x30], 0
je 0x6060bf
cmp dword [ebp - 0x84], 0
jbe 0x6060bf
jmp 0x6060b3
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x3c]
push eax
push esi
mov eax, dword [ebp - 0x60]
push eax
call sub.advapi32.dll_GetAce
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
jne 0x606057
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x104]
call fcn.0042647c
mov ecx, dword [ebp - 0x104]
lea eax, [ebp - 0x100]
mov edx, 0x60650c
call fcn.0040b2a4
mov ecx, dword [ebp - 0x100]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
mov eax, dword [ebp - 0x3c]
movzx eax, word [eax + 2]
push eax
mov eax, dword [ebp - 0x3c]
push eax
push 0xffffffffffffffff
push 2
push ebx
call sub.advapi32.dll_AddAce
test eax, eax
jne 0x6060b2
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x10c]
call fcn.0042647c
mov ecx, dword [ebp - 0x10c]
lea eax, [ebp - 0x108]
mov edx, 0x606528
call fcn.0040b2a4
mov ecx, dword [ebp - 0x108]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
inc esi
cmp esi, dword [ebp - 0x84]
jb 0x605ff9
push 0
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x78]
push eax
call sub.advapi32.dll_SetSecurityDescriptorDacl
test eax, eax
jne 0x606112
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x114]
call fcn.0042647c
mov ecx, dword [ebp - 0x114]
lea eax, [ebp - 0x110]
mov edx, 0x60657c
call fcn.0040b2a4
mov ecx, dword [ebp - 0x110]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
push 0x6065b4
push 0x6065f0
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.00415cc0
mov esi, eax
test esi, esi
je 0x606224
mov word [ebp - 0x42], 0
mov word [ebp - 0x44], 0
mov word [ebp - 0x46], 0
xor eax, eax
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x46]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_GetSecurityDescriptorControl
test eax, eax
jne 0x60619e
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x11c]
call fcn.0042647c
mov ecx, dword [ebp - 0x11c]
lea eax, [ebp - 0x118]
mov edx, 0x606618
call fcn.0040b2a4
mov ecx, dword [ebp - 0x118]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
test byte [ebp - 0x45], 4
je 0x6061b4
mov word [ebp - 0x42], 0x500
movzx eax, word [ebp - 0x42]
mov word [ebp - 0x44], ax
jmp 0x6061c8
test byte [ebp - 0x45], 0x10
je 0x6061c8
mov word [ebp - 0x42], 0x1000
movzx eax, word [ebp - 0x42]
mov word [ebp - 0x44], ax
cmp word [ebp - 0x42], 0
je 0x606224
movzx eax, word [ebp - 0x44]
push eax
movzx eax, word [ebp - 0x42]
push eax
lea eax, [ebp - 0x78]
push eax
call esi
test al, al
jne 0x606224
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x124]
call fcn.0042647c
mov ecx, dword [ebp - 0x124]
lea eax, [ebp - 0x120]
mov edx, 0x606660
call fcn.0040b2a4
mov ecx, dword [ebp - 0x120]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
push ebp
lea ecx, [ebp - 0x78]
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 4]
call fcn.006057b0
pop ecx
test eax, eax
jne 0x606279
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x12c]
call fcn.0042647c
mov ecx, dword [ebp - 0x12c]
lea eax, [ebp - 0x128]
mov edx, 0x6066a8
call fcn.0040b2a4
mov ecx, dword [ebp - 0x128]
mov dl, 1
mov eax, dword [0x41e38c]
call fcn.0042d758
call fcn.00409cd4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x6062b9
test edi, edi
je 0x6062c4
mov eax, edi
call fcn.00605790
cmp dword [ebp - 0x18], 0
je 0x6062d2
mov eax, dword [ebp - 0x18]
call fcn.00605790
cmp dword [ebp - 0x24], 0
je 0x6062e0
mov eax, dword [ebp - 0x24]
call fcn.00605790
test ebx, ebx
je 0x6062eb
mov eax, ebx
call fcn.00605790
mov byte [ebp - 0xd], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x606316
lea eax, [ebp - 0x12c]
mov edx, 0x2a
call fcn.0040a63c
pop eax
jmp eax