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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xf8
mov eax, dword [0x1012854]
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 0xc]
cmp esi, ebx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], eax
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x60], 0x220
mov dword [ebp - 0x5c], 0x221
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x68], 0x200
mov dword [ebp - 0x64], 0x201
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x2c], ebx
jne 0x10053f2
xor eax, eax
jmp 0x100560d
cmp edi, ebx
je 0x100542d
cmp word [edi], 0x5c
je 0x100542d
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 6]
push eax
call sub.NETAPI32.dll_NetApiBufferAllocate
cmp eax, ebx
mov dword [ebp - 0x28], eax
jne 0x1005430
push edi
push 0x1001484
push dword [ebp - 0x2c]
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
jmp 0x1005430
mov dword [ebp - 0x2c], edi
push esi
call dword [sym.imp.ntdll.dll_RtlLengthSid]
lea edi, [ebp - 0xf8]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], edi
jmp 0x100544b
mov edi, dword [ebp - 0x30]
cmp dword [ebp - 0x28], 0
jne 0x10055b6
and dword [ebp - 0x40], 0
push 0x20
pop ebx
push 2
push 0x1012020
push edi
mov dword [ebp - 0x48], ebx
call dword [sym.imp.ntdll.dll_RtlInitializeSid]
mov esi, dword [sym.imp.ntdll.dll_RtlSubAuthoritySid]
push 0
push edi
call esi
push 1
push edi
mov dword [eax], ebx
call esi
mov ebx, dword [ebp - 0x34]
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
shl ebx, 2
mov ecx, dword [ebp + ebx - 0x60]
mov dword [eax], ecx
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x40]
push eax
push 0
push edi
push dword [ebp - 0x2c]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
jne 0x1005504
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x40]
add eax, eax
push eax
call sub.NETAPI32.dll_NetApiBufferAllocate
test eax, eax
mov dword [ebp - 0x28], eax
jne 0x10055b6
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x44]
push dword [ebp - 0x30]
push dword [ebp - 0x2c]
call esi
test eax, eax
jne 0x10054fd
call edi
cmp eax, 0x534
jne 0x1005504
jmp 0x100559b
mov eax, dword [ebp - 0x44]
mov dword [ebp + ebx - 0x3c], eax
mov ecx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x54]
mov edi, dword [ebp - 0x30]
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 - 0x30]
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 - 0x68]
mov dword [eax], ecx
xor eax, eax
cmp dword [ebp + 0x10], eax
jne 0x100556c
cmp dword [0x1012ca8], eax
je 0x1005558
push dword [ebp + ebx - 0x3c]
push 0x2eeb
call fcn.0100371a
pop ecx
pop ecx
push esi
push dword [ebp + ebx - 0x3c]
push dword [ebp - 0x2c]
call sub.NETAPI32.dll_NetLocalGroupAddMember
cmp eax, 0x562
jmp 0x1005596
cmp dword [0x1012ca8], eax
je 0x1005584
push dword [ebp + ebx - 0x3c]
push 0x2eec
call fcn.0100371a
pop ecx
pop ecx
push esi
push dword [ebp + ebx - 0x3c]
push dword [ebp - 0x2c]
call sub.NETAPI32.dll_NetLocalGroupDelMember
cmp eax, 0x561
mov dword [ebp - 0x28], eax
jne 0x100559f
and dword [ebp - 0x28], 0
inc dword [ebp - 0x34]
add dword [ebp - 0x30], 8
cmp dword [ebp - 0x34], 2
jb 0x1005448
cmp dword [ebp - 0x28], 0
je 0x10055e6
xor esi, esi
cmp dword [ebp - 0x34], esi
jbe 0x10055e6
lea edi, [ebp - 0xf8]
cmp dword [ebp + 0x10], 0
push edi
push dword [ebp + esi*4 - 0x3c]
push dword [ebp - 0x2c]
jne 0x10055d8
call sub.NETAPI32.dll_NetLocalGroupAddMember
jmp 0x10055dd
call sub.NETAPI32.dll_NetLocalGroupDelMember
inc esi
add edi, 8
cmp esi, dword [ebp - 0x34]
jb 0x10055c3
xor esi, esi
mov eax, dword [ebp + esi*4 - 0x3c]
test eax, eax
je 0x10055f6
push eax
call sub.NETAPI32.dll_NetApiBufferFree
inc esi
cmp esi, 2
jb 0x10055e8
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x58]
je 0x100560a
push eax
call sub.NETAPI32.dll_NetApiBufferFree
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0100c7ad
leave
ret 0xc