Function at 0x40e860
Capabilities:
Check os version
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
mov eax, dword [0x4341c0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov dword [ebp - 0x12c], 0
push edi
mov dword [esi], 0
mov dword [esi + 0x1c], 3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push str.IsWow64Process
push str.kernel32.dll
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40e8db
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x130], 0
push ecx
push edi
call eax
test eax, eax
jne 0x40e8d0
mov eax, 2
jmp 0x40e8db
xor eax, eax
cmp dword [ebp - 0x130], eax
setne al
mov dword [esi + 0x28], eax
lea eax, [ebp - 0x124]
push 0x118
push 0
mov dword [esi + 0x40], 0xf
mov dword [esi + 0x3c], 0
mov byte [esi + 0x2c], 0
push eax
mov dword [ebp - 0x128], 0x11c
call fcn.00415af0
add esp, 0xc
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov edx, dword [ebp - 0x124]
mov ecx, dword [ebp - 0x120]
mov eax, dword [ebp - 0x11c]
mov dword [esi + 4], edx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], eax
cmp edx, 5
jne 0x40e94e
test ecx, ecx
jle 0x40e992
xor eax, eax
cmp ecx, 1
setne al
inc eax
mov dword [esi], eax
jmp 0x40e992
cmp edx, 6
jne 0x40e97a
sub ecx, 0
je 0x40e972
dec ecx
je 0x40e96a
dec ecx
je 0x40e962
mov dword [esi], edx
jmp 0x40e992
mov dword [esi], 5
jmp 0x40e992
mov dword [esi], 4
jmp 0x40e992
mov dword [esi], 3
jmp 0x40e992
cmp edx, 0xa
jne 0x40e987
mov dword [esi], 7
jmp 0x40e992
cmp edx, 6
jle 0x40e992
mov dword [esi], 8
movzx eax, word [ebp - 0x14]
xorps xmm0, xmm0
mov dword [esi + 0x14], eax
movzx eax, word [ebp - 0x12]
mov dword [esi + 0x18], eax
lea eax, [ebp - 0x154]
push eax
mov dword [ebp - 0x154], 0
movdqu xmmword [ebp - 0x150], xmm0
movdqu xmmword [ebp - 0x140], xmm0
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [ebp - 0x154]
movzx eax, dx
test eax, eax
je 0x40e9f3
cmp eax, 6
je 0x40e9ea
cmp eax, 9
jne 0x40e9fa
mov dword [esi + 0x1c], 1
jmp 0x40e9fa
mov dword [esi + 0x1c], 2
jmp 0x40e9fa
mov dword [esi + 0x1c], 0
mov eax, dword [ebp - 0x140]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x138]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x124]
cmp eax, 6
je 0x40eaa5
cmp eax, 0xa
je 0x40eaa5
cmp eax, 5
jne case.0x40eae8.2
mov ecx, dword [ebp - 0x120]
cmp ecx, 2
jne 0x40ea7d
cmp byte [ebp - 0xe], 1
jne 0x40ea5d
cmp dx, 9
jne 0x40ea5d
mov dword [esi + 0x10], 1
mov eax, esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004118e4
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
shr eax, 0xe
not eax
and eax, 2
mov dword [esi + 0x10], eax
mov eax, esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004118e4
mov esp, ebp
pop ebp
ret
cmp ecx, 1
jne case.0x40eae8.2
mov eax, dword [ebp - 0x10]
shr eax, 9
not eax
and eax, ecx
mov dword [esi + 0x10], eax
mov eax, esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004118e4
mov esp, ebp
pop ebp
ret
push str.GetProductInfo
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x12c]
push ecx
push 0
push 0
push dword [ebp - 0x120]
push dword [ebp - 0x124]
call eax
mov eax, dword [ebp - 0x12c]
dec eax
cmp eax, 0x2f
ja case.0x40eae8.2
movzx eax, byte [eax + 0x40eb30]
jmp dword [eax*4 + 0x40eb24]
mov dword [esi + 0x10], 2
mov eax, esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004118e4
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
mov dword [esi + 0x10], 0
xor ecx, ebp
pop esi
call fcn.004118e4
mov esp, ebp
pop ebp
ret