Function at 0x406ad0
Capabilities:
Add user account to group

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x604c
call fcn.004070e0
mov eax, dword [0x42cf34]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x6048], 1
mov dword [ebp - 0x604c], 0
mov dword [ebp - 0x603c], 0
mov dword [ebp - 0x6038], 0
mov eax, dword [ebp + 8]
push eax
call fcn.0040a520
add esp, 4
add eax, 1
push eax
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x6004]
push edx
call fcn.0041338c
add esp, 0xc
mov eax, dword [ebp + 0x10]
push eax
call fcn.0040a520
add esp, 4
add eax, 1
push eax
mov ecx, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x2004]
push edx
call fcn.0041338c
add esp, 0xc
mov eax, dword [ebp + 0xc]
push eax
call fcn.0040a520
add esp, 4
add eax, 1
push eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x4004]
push edx
call fcn.0041338c
add esp, 0xc
lea eax, [ebp - 0x2004]
mov dword [ebp - 0x6044], eax
push str.___Enumerating_tokens_n
call fcn.00402030
add esp, 4
lea ecx, [ebp - 0x602c]
push ecx
lea edx, [ebp - 0x603c]
push edx
call fcn.00402800
add esp, 8
mov dword [ebp - 0x6038], eax
cmp dword [ebp - 0x6038], 0
jne 0x406bcf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Failed_to_enumerate_tokens_with_error_code:__d_n
call fcn.00402030
add esp, 8
jmp 0x406e0e
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push str.___Attempting_to_add_user__s_to_local_group__s_on_host__s_n
call fcn.00402030
add esp, 0x10
mov dword [ebp - 0x6034], 0
jmp 0x406c03
mov eax, dword [ebp - 0x6034]
add eax, 1
mov dword [ebp - 0x6034], eax
mov ecx, dword [ebp - 0x6034]
cmp ecx, dword [ebp - 0x603c]
jae 0x406da9
imul edx, dword [ebp - 0x6034], 0x104
mov eax, dword [ebp - 0x6038]
cmp dword [eax + edx + 0x100], 0
je 0x406da4
imul ecx, dword [ebp - 0x6034], 0x104
add ecx, dword [ebp - 0x6038]
push ecx
push str.NT_AUTHORITYANONYMOUS_LOGON
call fcn.0040a443
add esp, 8
test eax, eax
jne 0x406c57
jmp 0x406bf4
imul edx, dword [ebp - 0x6034], 0x104
mov eax, dword [ebp - 0x6038]
mov ecx, dword [eax + edx + 0x100]
push ecx
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
push 1
lea edx, [ebp - 0x6044]
push edx
push 3
lea eax, [ebp - 0x4004]
push eax
lea ecx, [ebp - 0x6004]
push ecx
call sub.NETAPI32.dll_NetLocalGroupAddMembers
mov dword [ebp - 0x6040], eax
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov edx, dword [ebp - 0x6040]
mov dword [ebp - 0x6030], edx
cmp dword [ebp - 0x6030], 0x560
ja 0x406d01
cmp dword [ebp - 0x6030], 0x560
je 0x406d70
cmp dword [ebp - 0x6030], 0x56
ja 0x406cf0
cmp dword [ebp - 0x6030], 0x56
je 0x406d41
cmp dword [ebp - 0x6030], 0
je 0x406d43
cmp dword [ebp - 0x6030], 5
je 0x406d41
jmp 0x406d8e
cmp dword [ebp - 0x6030], 0x52e
je 0x406d41
jmp 0x406d8e
cmp dword [ebp - 0x6030], 0x8ac
ja 0x406d33
cmp dword [ebp - 0x6030], 0x8ac
je 0x406d70
cmp dword [ebp - 0x6030], 0x562
je 0x406d7f
cmp dword [ebp - 0x6030], 0x56b
je 0x406d61
jmp 0x406d8e
cmp dword [ebp - 0x6030], 0x92f
je 0x406d52
jmp 0x406d8e
jmp 0x406da4
push str.___Successfully_added_user_to_local_group_n
call fcn.00402030
add esp, 4
jmp 0x406db6
push str.____Computer_name_invalid_n
call fcn.00402030
add esp, 4
jmp 0x406db6
push str.____User_not_found_n
call fcn.00402030
add esp, 4
jmp 0x406db6
push str.____Local_group_not_found_n
call fcn.00402030
add esp, 4
jmp 0x406db6
push str.____User_already_in_group_n
call fcn.00402030
add esp, 4
jmp 0x406db6
mov eax, dword [ebp - 0x6040]
push eax
push str.Unknown_error:__d_n
call fcn.00402030
add esp, 8
jmp 0x406db6
jmp 0x406bf4
push str.____Access_denied_with_all_tokens_n
call fcn.00402030
add esp, 4
mov dword [ebp - 0x6034], 0
jmp 0x406dd1
mov ecx, dword [ebp - 0x6034]
add ecx, 1
mov dword [ebp - 0x6034], ecx
mov edx, dword [ebp - 0x6034]
cmp edx, dword [ebp - 0x603c]
jae 0x406dff
imul eax, dword [ebp - 0x6034], 0x104
mov ecx, dword [ebp - 0x6038]
mov edx, dword [ecx + eax + 0x100]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406dc2
mov eax, dword [ebp - 0x6038]
push eax
call fcn.00412693
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004070d2
mov esp, ebp
pop ebp
ret