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

Disassembly:
sub esp, 0x4c
push ebx
push ebp
mov eax, 1
xor ebx, ebx
push esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x5c]
push edi
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ebx
cmp eax, ebx
je 0x4790e9
mov esi, dword [esp + 0x64]
cmp esi, ebx
je 0x4790e9
cmp dword [esp + 0x68], ebx
jbe 0x4790e9
lea ecx, [esp + 0x1c]
push ecx
push 0x1f6
push eax
push ebx
call sub.NETAPI32.dll_NetShareGetInfo
test eax, eax
jne 0x4790e9
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
je 0x4790e9
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [ecx + 0x24]
lea eax, [esp + 0x34]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x4790e9
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x14]
push ecx
push ebx
lea edx, [esp + 0x20]
push edx
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
push ebx
call esi
mov eax, dword [esp + 0x14]
cmp eax, ebx
jbe 0x4790e9
cmp dword [esp + 0x10], ebx
jbe 0x4790e9
push eax
call fcn.0048690e
mov edi, eax
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048690e
mov ebx, eax
mov eax, dword [esp + 0x1c]
push eax
push ebp
push edi
mov dword [esp + 0x38], ebx
call fcn.00487630
mov ecx, dword [esp + 0x24]
lea edx, [ecx + ecx]
push edx
push ebp
push ebx
call fcn.00487630
add esp, 0x20
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x14]
push ecx
push ebx
lea edx, [esp + 0x20]
push edx
push edi
push eax
push ebp
call esi
test eax, eax
je 0x4790e7
push 1
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x4790e7
xor eax, eax
push 2
push 0xc
mov dword [esp + 0x48], eax
lea edx, [esp + 0x44]
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x20]
push edx
push eax
mov dword [esp + 0x50], 8
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x4790e7
push edi
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [esp + 0x40]
lea esi, [eax + ecx + 8]
push esi
call fcn.0048690e
push esi
mov ebp, eax
push 0
push ebp
call fcn.00487630
add esp, 0x10
push 2
push esi
push ebp
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x4790e7
mov eax, dword [esp + 0x18]
xor edx, edx
xor esi, esi
cmp dx, word [eax + 4]
jae 0x47906c
mov ebx, dword [sym.imp.ADVAPI32.dll_AddAce]
lea esp, [esp]
lea ecx, [esp + 0x20]
push ecx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x47906c
mov eax, dword [esp + 0x20]
test byte [eax + 1], 0x10
jne 0x47906c
add eax, 8
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x47905f
mov eax, dword [esp + 0x20]
movzx edx, word [eax + 2]
push edx
push eax
push 0xffffffffffffffff
push 2
push ebp
call ebx
test eax, eax
je 0x47906c
mov eax, dword [esp + 0x18]
movzx ecx, word [eax + 4]
inc esi
cmp esi, ecx
jl 0x479020
mov al, byte [esp + 0x6c]
test al, al
jne 0x479087
mov edx, dword [esp + 0x68]
push edi
push edx
push 3
push 2
push ebp
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
jmp 0x47909c
cmp al, 1
jne 0x4790e7
mov eax, dword [esp + 0x68]
push edi
push eax
push 3
push 2
push ebp
call dword [sym.imp.ADVAPI32.dll_AddAccessDeniedAceEx]
test eax, eax
je 0x4790e7
push 0
push ebp
push 1
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4790e7
mov ecx, dword [esp + 0x60]
push 0
lea eax, [esp + 0x38]
push eax
push 0x5dd
push ecx
lea edx, [esp + 0x58]
push 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], edx
call sub.NETAPI32.dll_NetShareSetInfo
test eax, eax
jne 0x4790e7
lea esi, [eax + 1]
xor ebx, ebx
jmp 0x479107
xor ebx, ebx
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
push edx
mov edx, dword [esp + 0x64]
push eax
push ecx
push edx
call fcn.00477e60
add esp, 0x10
mov esi, eax
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x479115
push eax
call sub.NETAPI32.dll_NetApiBufferFree
cmp edi, ebx
je 0x479122
push edi
call fcn.00487d04
add esp, 4
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x479133
push eax
call fcn.00487d04
add esp, 4
cmp ebp, ebx
je 0x479140
push ebp
call fcn.00487d04
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret