Function at 0x403f0e
Capabilities:
Check os version
Get domain information

Disassembly:
mov eax, 0x41209d
call fcn.00410b94
sub esp, 0x308
push ebx
push esi
push edi
xor eax, eax
mov byte [ebp - 0x10], 0x30
lea edi, [ebp - 0xf]
stosb byte es:[edi], al
mov byte [ebp - 0x14], 0x30
lea edi, [ebp - 0x13]
stosb byte es:[edi], al
lea eax, [ebp - 0x48]
push eax
xor ebx, ebx
inc ebx
xor esi, esi
push ebx
push esi
mov dword [ebp - 0x1c], esi
call dword [sym.imp.NETAPI32.dll_DsRoleGetPrimaryDomainInformation]
test eax, eax
jne 0x403f7e
mov ecx, dword [ebp - 0x48]
mov eax, dword [ecx]
cmp eax, ebx
je 0x403f73
cmp eax, 2
je 0x403f69
jle 0x403f77
cmp eax, 4
jle 0x403f6f
cmp eax, 5
jne 0x403f77
mov byte [ebp - 0x10], 0x32
mov byte [ebp - 0x14], 0x31
jmp 0x403f77
mov byte [ebp - 0x14], 0x31
mov byte [ebp - 0x10], 0x31
push ecx
call dword [sym.imp.NETAPI32.dll_DsRoleFreeMemory]
push 0x98
lea eax, [ebp - 0xe0]
push esi
push eax
mov dword [ebp - 0xe4], 0x9c
call fcn.0040c7e0
add esp, 0xc
lea eax, [ebp - 0xe4]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
cmp dword [ebp - 0xe0], 5
jne 0x404009
cmp dword [ebp - 0xdc], esi
jne 0x403fcd
mov edi, str.Windows_2000
jmp 0x40409f
cmp dword [ebp - 0xdc], ebx
je 0x403fe7
cmp dword [ebp - 0xdc], 2
jne 0x40409a
cmp byte [ebp - 0x4a], bl
jne 0x403ff1
mov edi, str.Windows_XP
jmp 0x40409f
cmp eax, esi
jne 0x403fff
mov edi, str.Windows_2003
jmp 0x40409f
mov edi, str.Windows_2003_R2
jmp 0x40409f
cmp dword [ebp - 0xe0], 6
jne 0x404076
mov eax, dword [ebp - 0xdc]
cmp eax, esi
jne 0x40402f
cmp byte [ebp - 0x4a], bl
jne 0x404028
mov edi, str.Windows_Vista
jmp 0x40409f
mov edi, str.Windows_Server_2008
jmp 0x40409f
cmp eax, ebx
jne 0x404046
cmp byte [ebp - 0x4a], bl
jne 0x40403f
mov edi, str.Windows_7
jmp 0x40409f
mov edi, str.Windows_Server_2008_R2
jmp 0x40409f
cmp eax, 2
jne 0x40405e
cmp byte [ebp - 0x4a], bl
jne 0x404057
mov edi, str.Windows_8
jmp 0x40409f
mov edi, str.Windows_Server_2012
jmp 0x40409f
cmp eax, 3
jne 0x40409a
cmp byte [ebp - 0x4a], bl
jne 0x40406f
mov edi, str.Windows_8.1
jmp 0x40409f
mov edi, str.Windows_Server_2012_R2
jmp 0x40409f
cmp dword [ebp - 0xe0], 0xa
jne 0x40409a
cmp dword [ebp - 0xdc], esi
jne 0x40409a
cmp byte [ebp - 0x4a], bl
jne 0x404093
mov edi, str.Windows_10
jmp 0x40409f
mov edi, str.Windows_Server_2016_Technical_Preview
jmp 0x40409f
mov edi, str.unknown
mov eax, edi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4040b2
sub eax, esi
mov esi, eax
push edi
lea eax, [ebp - 0x38]
call fcn.0040616a
test al, al
lea eax, [ebp - 0x38]
je 0x4040d9
push esi
sub edi, eax
push edi
push eax
call fcn.004065f0
jmp 0x40410f
push 0
push esi
call fcn.00406584
test al, al
je 0x40410f
cmp dword [ebp - 0x24], 0x10
mov eax, dword [ebp - 0x38]
jae 0x4040f1
lea eax, [ebp - 0x38]
push esi
push edi
push eax
call fcn.0040ff50
mov eax, dword [ebp - 0x38]
add esp, 0xc
cmp dword [ebp - 0x24], 0x10
mov dword [ebp - 0x28], esi
jae 0x40410b
lea eax, [ebp - 0x38]
mov byte [eax + esi], 0
and dword [ebp - 4], 0
push str.IsWow64Process
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
and dword [ebp - 0x18], 0
mov esi, eax
test esi, esi
je 0x40414a
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x40414a
mov eax, dword [ebp - 0x18]
jmp 0x40414c
xor eax, eax
push eax
lea eax, [ebp - 0x2dc]
push eax
call fcn.00406d6f
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], bl
movzx eax, word [ebp - 0x50]
push eax
lea eax, [ebp - 0x2a4]
push eax
call fcn.00406d6f
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x26c]
push eax
mov byte [ebp - 4], 2
call fcn.00406c73
mov dword [ebp - 0x3c], eax
lea esi, [ebp - 0x234]
mov byte [ebp - 4], 3
call fcn.00406dc2
mov esi, eax
mov byte [ebp - 4], 4
mov eax, dword [0x41c038]
push dword [eax]
lea eax, [ebp - 0x1fc]
push eax
call fcn.00406d6f
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x1c4]
push 0x415ad0
push eax
mov edi, 0x41ad1c
mov byte [ebp - 4], 5
call fcn.004057ee
push str.actgetkeyaffid
push eax
lea eax, [ebp - 0x18c]
mov byte [ebp - 4], 6
call fcn.00405865
mov ecx, dword [ebp - 0x40]
lea edi, [ebp - 0x154]
mov byte [ebp - 4], 7
call fcn.00405896
push str.lang
push eax
lea eax, [ebp - 0x138]
mov byte [ebp - 4], 8
call fcn.00405865
mov ecx, esi
lea edi, [ebp - 0x218]
mov byte [ebp - 4], 9
call fcn.00405896
push str.corp
push eax
lea eax, [ebp - 0x288]
mov byte [ebp - 4], 0xa
call fcn.00405865
add esp, 0x40
lea ecx, [ebp - 0x10]
push ecx
push eax
lea eax, [ebp - 0x1e0]
mov byte [ebp - 4], 0xb
call fcn.00405865
push str.serv
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0x2c0]
call fcn.00405865
lea ecx, [ebp - 0x14]
push ecx
push eax
lea eax, [ebp - 0x1a8]
mov byte [ebp - 4], 0xd
call fcn.00405865
push str.os
push eax
lea eax, [ebp - 0x11c]
mov byte [ebp - 4], 0xe
call fcn.00405865
mov ecx, dword [ebp - 0x3c]
lea edi, [ebp - 0x170]
mov byte [ebp - 4], 0xf
call fcn.00405896
push str.sp
push eax
lea eax, [ebp - 0x2f8]
mov byte [ebp - 4], 0x10
call fcn.00405865
mov ecx, dword [ebp - 0x44]
lea edi, [ebp - 0x314]
mov byte [ebp - 4], 0x11
call fcn.00405896
push str.x64
push eax
lea eax, [ebp - 0x250]
mov byte [ebp - 4], 0x12
call fcn.00405865
add esp, 0x30
mov ecx, dword [ebp - 0x1c]
lea edi, [ebp - 0x100]
mov byte [ebp - 4], 0x13
call fcn.00405896
push ebx
xor edi, edi
lea esi, [ebp - 0x250]
call fcn.00406714
push ebx
lea esi, [ebp - 0x314]
call fcn.00406714
push ebx
lea esi, [ebp - 0x2f8]
call fcn.00406714
push ebx
lea esi, [ebp - 0x170]
call fcn.00406714
push ebx
lea esi, [ebp - 0x11c]
call fcn.00406714
push ebx
lea esi, [ebp - 0x1a8]
call fcn.00406714
push ebx
lea esi, [ebp - 0x2c0]
call fcn.00406714
push ebx
lea esi, [ebp - 0x1e0]
call fcn.00406714
push ebx
lea esi, [ebp - 0x288]
call fcn.00406714
push ebx
lea esi, [ebp - 0x218]
call fcn.00406714
push ebx
lea esi, [ebp - 0x138]
call fcn.00406714
push ebx
lea esi, [ebp - 0x154]
call fcn.00406714
push ebx
lea esi, [ebp - 0x18c]
call fcn.00406714
push ebx
lea esi, [ebp - 0x1c4]
call fcn.00406714
push ebx
lea esi, [ebp - 0x1fc]
call fcn.00406714
push ebx
lea esi, [ebp - 0x234]
call fcn.00406714
push ebx
lea esi, [ebp - 0x26c]
call fcn.00406714
push ebx
lea esi, [ebp - 0x2a4]
call fcn.00406714
push ebx
lea esi, [ebp - 0x2dc]
call fcn.00406714
push ebx
lea esi, [ebp - 0x38]
mov byte [ebp - 4], 0x28
call fcn.00406714
push 0xffffffffffffffff
lea eax, [ebp - 0x100]
push eax
push dword [ebp + 8]
call fcn.00407ebf
add esp, 0xc
push ebx
lea esi, [ebp - 0x100]
call fcn.00406714
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret