Add User assembly code

Source: Internet
Author: User
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Code by ASM http://www.asm32.cn/
; 2007-9-29
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
. 386
. Model flat, stdcall
Option Casemap: none; case sensitive
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Include data
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Include windows. inc
Include user32.inc
Include kernel32.inc
Include netapi32.inc

Includelib user32.lib
Includelib kernel32.lib
Includelib netapi32.lib

. Data?
Ouserinfo user_info_1 <?>
Ouser localgroup_members_info_3 <?>
Dwerr DWORD?
. Data
Szuser DW "A", "S", "M", 0
Szpass DW "P", "A", "S", "S", 0
Szadministrators DW "A", "D", "M", "I", "n", "I", "S", "T", "r ", "A", "T", "O", "r", "S", 0
. Code
Start:
Invoke rtlzeromemory, ADDR ouserinfo, sizeof ouserinfo
Push offset szuser
Pop ouserinfo. usri1_name
Push offset szpass
Pop ouserinfo. usri#password
MoV ouserinfo. usri1_priv, user_priv_user
MoV ouserinfo. usri1_flags, uf_normal_account
Invoke netuseradd, null, 1, ADDR ouserinfo, ADDR dwerr
Push ouserinfo. usri1_name
Pop ouser. lgrmi3_domainandname
Invoke netlocalgroupaddmembers, null, ADDR szadministrators, 3, ADDR ouser, 1
Invoke exitprocess, 0
End start

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.