Function at 0x406d70
Capabilities:
Check os version

Disassembly:
sub esp, 0x2c0
push ebp
mov ebp, dword [esp + 0x2c8]
push esi
xor esi, esi
cmp ebp, esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
je 0x407099
cmp dword [esp + 0x2d0], esi
je 0x407099
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edi
push str.Netapi32.dll
call ebx
mov edi, eax
cmp edi, esi
mov dword [esp + 0x10], edi
jne 0x406dc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x2c0
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NetApiBufferFree
push edi
call esi
push str.NetUserGetInfo
push edi
mov dword [esp + 0x30], eax
call esi
mov edi, eax
mov eax, dword [esp + 0x10]
push str.NetLocalGroupAddMembers
push eax
call esi
mov ecx, dword [esp + 0x28]
test ecx, ecx
mov dword [esp + 0x34], eax
je 0x40707e
test edi, edi
je 0x40707e
test eax, eax
je 0x40707e
push str.advapi32.dll
call ebx
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x30], ebx
jne 0x406e41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x10]
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop ebx
mov eax, esi
pop esi
pop ebp
add esp, 0x2c0
ret
push str.LookupAccountNameW
push ebx
call esi
mov esi, eax
test esi, esi
jne 0x406e6f
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edx
call esi
push ebx
call esi
pop edi
pop ebx
pop esi
mov eax, 1
pop ebp
add esp, 0x2c0
ret
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x3c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x3c]
xor ebx, ebx
cmp eax, 5
mov dword [esp + 0x14], ebx
ja 0x406f2d
jne 0x406ea2
cmp dword [esp + 0x40], 1
jae 0x406f2d
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x24]
push edx
push ebx
lea eax, [esp + 0x30]
push eax
push ebx
push ebp
push ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebx
call esi
cmp eax, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x406ed0
call ebx
cmp eax, 0x7a
jne 0x406f49
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00459619
mov edx, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
lea eax, [edx + edx]
push eax
call fcn.00459619
add esp, 8
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x24]
push edx
mov edi, eax
push edi
lea eax, [esp + 0x30]
push eax
push ecx
push ebp
push 0
call esi
test eax, eax
je 0x406f1a
mov edx, dword [esp + 0x18]
mov dword [esp + 0x14], edx
xor ebx, ebx
jmp 0x406f1e
call ebx
mov ebx, eax
test edi, edi
je 0x406f4b
push edi
call fcn.0045932f
add esp, 4
jmp 0x406f4b
lea eax, [esp + 0x1c]
push eax
push 0x17
push ebp
push ebx
call edi
cmp eax, ebx
jne 0x406f49
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x10]
mov dword [esp + 0x14], edx
jmp 0x406f53
mov ebx, eax
test ebx, ebx
jne 0x40703f
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40703f
mov edi, dword [esp + 0x2d8]
mov eax, edi
lea edx, [eax + 1]
jmp 0x406f70
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406f70
sub eax, edx
mov esi, eax
lea eax, [esi + 2]
push eax
call fcn.00459619
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40703a
mov edx, ebp
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x406f97
mov byte [esi + ebp + 1], cl
cmp byte [ebp], 0
mov eax, ebp
je 0x406fc0
lea ecx, [ecx]
cmp byte [eax], 0x3b
jne 0x406fb8
mov byte [eax], 0
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x406fb0
cmp byte [ebp], 0
mov esi, ebp
je 0x40702f
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, edi
push 0x100
lea ecx, [esp + 0xd0]
push ecx
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push 1
lea edx, [esp + 0x18]
push edx
push 0
lea eax, [esp + 0xd8]
push eax
push 0
call dword [esp + 0x48]
test eax, eax
je 0x407008
cmp eax, 0x562
jne 0x40702d
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407010
sub eax, edx
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x406fd0
push ebp
call fcn.0045932f
add esp, 4
jmp 0x40703f
mov ebx, eax
push ebp
call fcn.0045932f
add esp, 4
jmp 0x40703f
mov ebx, 0xe
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40704c
push eax
call dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40705d
push eax
call fcn.0045932f
add esp, 4
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ecx
call esi
mov edx, dword [esp + 0x30]
push edx
call esi
pop edi
mov eax, ebx
pop ebx
pop esi
pop ebp
add esp, 0x2c0
ret
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop ebx
pop esi
mov eax, 1
pop ebp
add esp, 0x2c0
ret
pop esi
mov eax, 0x57
pop ebp
add esp, 0x2c0
ret