Function at 0x76e56019
Capabilities:
Add user account to group
Delete user account from group

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x130
push esi
push edi
push dword [ebp + 8]
xor edi, edi
mov eax, 0x201
mov dword [ebp - 4], edi
mov dword [ebp - 0x4c], 0x220
mov dword [ebp - 0x48], 0x221
mov dword [ebp - 0x44], 0x22b
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x58], 0x200
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x18], 1
mov byte [ebp - 0x17], 1
mov byte [ebp - 0x16], 1
mov dword [ebp - 0x20], edi
mov dword [ebp - 0xc], edi
call dword [sym.imp.ntdll.dll_RtlLengthSid]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x14], 3
call fcn.76e55fc9
test eax, eax
jne 0x76e56090
mov dword [ebp - 0x14], 2
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
jbe 0x76e5628e
lea eax, [ebp - 0x130]
mov dword [ebp - 8], eax
push ebx
cmp dword [ebp - 4], edi
jne 0x76e5625f
cmp dword [ebp - 0xc], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
je 0x76e560c5
push dword [ebp - 0xc]
call sub.NETAPI32.dll_NetApiBufferFree
mov dword [ebp - 0xc], edi
push 2
push 0x76e5fa90
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_RtlInitializeSid]
mov esi, dword [sym.imp.ntdll.dll_RtlSubAuthoritySid]
push edi
push dword [ebp - 8]
call esi
push 1
push dword [ebp - 8]
mov dword [eax], 0x20
call esi
mov ebx, dword [ebp - 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
shl ebx, 2
mov ecx, dword [ebp + ebx - 0x4c]
mov dword [eax], ecx
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x1c]
push eax
push edi
push dword [ebp - 8]
push edi
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x76e561e4
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
add eax, eax
push eax
call sub.NETAPI32.dll_NetApiBufferAllocate
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x76e5625f
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x24]
add eax, eax
push eax
call sub.NETAPI32.dll_NetApiBufferAllocate
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x76e5625f
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
push dword [ebp - 8]
push edi
call esi
test eax, eax
jne 0x76e561dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x534
jne 0x76e56197
mov eax, dword [ebp - 0x10]
cmp byte [ebp + eax - 0x18], 0
jne 0x76e56197
mov dword [ebp - 4], edi
jmp 0x76e56247
xor eax, eax
lea edi, [ebp - 0x38]
stosd dword es:[edi], eax
push 1
push dword [ebp - 8]
stosd dword es:[edi], eax
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.ntdll.dll_RtlConvertSidToUnicodeString]
test eax, eax
push esi
jl 0x76e561cf
lea eax, [ebp - 0x38]
push eax
push 0x76e56344
call fcn.76e42867
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
jmp 0x76e561e4
push 0x76e56300
call fcn.76e42867
pop ecx
pop ecx
jmp 0x76e561e4
mov eax, dword [ebp - 0x20]
mov dword [ebp + ebx - 0x30], eax
mov ecx, dword [ebp - 0x40]
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 8]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 8]
push esi
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
inc byte [eax]
movzx eax, byte [eax]
dec eax
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov ecx, dword [ebp + ebx - 0x58]
push esi
push dword [ebp + ebx - 0x30]
mov dword [eax], ecx
xor eax, eax
cmp dword [ebp + 0xc], eax
push eax
jne 0x76e56232
call sub.NETAPI32.dll_NetLocalGroupAddMember
cmp eax, 0x562
jmp 0x76e5623c
call sub.NETAPI32.dll_NetLocalGroupDelMember
cmp eax, 0x561
mov dword [ebp - 4], eax
jne 0x76e56245
and dword [ebp - 4], 0
xor edi, edi
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
add dword [ebp - 8], 0xc
cmp eax, dword [ebp - 0x14]
jb 0x76e560a6
cmp dword [ebp - 4], edi
je 0x76e5628d
xor esi, esi
cmp dword [ebp - 0x10], edi
jbe 0x76e5628d
lea ebx, [ebp - 0x130]
cmp dword [ebp + 0xc], 1
push ebx
push dword [ebp + esi*4 - 0x30]
push edi
jne 0x76e5627f
call sub.NETAPI32.dll_NetLocalGroupAddMember
jmp 0x76e56284
call sub.NETAPI32.dll_NetLocalGroupDelMember
inc esi
add ebx, 0xc
cmp esi, dword [ebp - 0x10]
jb 0x76e5626c
pop ebx
cmp dword [ebp - 0xc], edi
je 0x76e5629b
push dword [ebp - 0xc]
call sub.NETAPI32.dll_NetApiBufferFree
xor esi, esi
cmp dword [ebp - 0x14], edi
jbe 0x76e562b6
mov eax, dword [ebp + esi*4 - 0x30]
cmp eax, edi
je 0x76e562b0
push eax
call sub.NETAPI32.dll_NetApiBufferFree
inc esi
cmp esi, dword [ebp - 0x14]
jb 0x76e562a2
cmp dword [ebp - 4], edi
pop edi
pop esi
je 0x76e562cc
push dword [ebp - 4]
push 0x76e562d4
call fcn.76e42867
pop ecx
pop ecx
mov eax, dword [ebp - 4]
leave
ret 8