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

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x154
push edi
lea eax, [ebp - 0xdc]
push eax
mov dword [ebp - 0xdc], 0x114
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
mov eax, dword [ebp - 0xd8]
mov dword [ebx], eax
mov eax, dword [ebp - 0xd4]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0xd0]
mov dword [ebx + 8], eax
lea eax, [ebp - 0xc8]
push eax
call fcn.0045179a
xor edi, edi
cmp eax, edi
pop ecx
jg 0x40716d
mov word [ebx + 0xc], di
cmp dword [ebp - 0xcc], 2
mov byte [ebx + 0x20c], 0
mov byte [ebx + 0x20d], 0
mov byte [ebx + 0x220], 0
mov byte [ebx + 0x20e], 0
mov byte [ebx + 0x20f], 0
mov byte [ebx + 0x214], 0
mov byte [ebx + 0x215], 0
mov byte [ebx + 0x210], 0
mov byte [ebx + 0x211], 0
mov byte [ebx + 0x216], 0
mov byte [ebx + 0x217], 0
mov byte [ebx + 0x218], 0
mov byte [ebx + 0x219], 0
mov byte [ebx + 0x212], 0
mov byte [ebx + 0x213], 0
mov byte [ebx + 0x21c], 0
mov byte [ebx + 0x21d], 0
mov byte [ebx + 0x21a], 0
mov byte [ebx + 0x21b], 0
mov byte [ebx + 0x21e], 0
mov byte [ebx + 0x21f], 0
jne 0x407246
mov eax, dword [ebx]
sub eax, 4
mov byte [ebx + 0x20c], 1
je 0x407236
dec eax
je 0x4071d2
dec eax
jne 0x40729d
mov eax, dword [ebx + 4]
cmp eax, edi
mov byte [ebx + 0x20f], 1
jne 0x4071a0
mov byte [ebx + 0x215], 1
mov byte [ebx + 0x211], 1
mov byte [ebx + 0x219], 1
mov byte [ebx + 0x218], 1
jmp 0x40729d
lea ecx, [ebp + eax*2 - 0xc8]
cmp word [ecx], 0x20
jne 0x407172
mov word [ecx], di
dec eax
cmp eax, edi
jg 0x40715d
xor ecx, ecx
cmp eax, edi
jle 0x407188
cmp word [ebp + ecx*2 - 0xc8], 0x20
jne 0x407188
inc ecx
cmp ecx, eax
jl 0x407178
lea eax, [ebp + ecx*2 - 0xc8]
push eax
lea eax, [ebx + 0xc]
push eax
call fcn.0044f88d
pop ecx
pop ecx
jmp 0x40706e
cmp eax, 1
jne 0x40729d
mov byte [ebx + 0x211], al
mov byte [ebx + 0x217], al
mov byte [ebx + 0x215], al
mov byte [ebx + 0x219], al
mov byte [ebx + 0x213], al
mov byte [ebx + 0x212], al
jmp 0x40729d
mov eax, dword [ebx + 4]
cmp eax, edi
mov byte [ebx + 0x20f], 1
jne 0x4071f3
mov byte [ebx + 0x215], 1
mov byte [ebx + 0x214], 1
jmp 0x40729d
cmp eax, 1
jne 0x40720f
mov byte [ebx + 0x215], al
mov byte [ebx + 0x211], al
mov byte [ebx + 0x210], al
jmp 0x40729d
cmp eax, 2
jb 0x40729d
mov byte [ebx + 0x215], 1
mov byte [ebx + 0x211], 1
mov byte [ebx + 0x217], 1
mov byte [ebx + 0x216], 1
jmp 0x40729d
mov byte [ebx + 0x20f], 1
mov byte [ebx + 0x20e], 1
jmp 0x40729d
movzx eax, word [ebp - 0xd0]
mov dword [ebx + 8], eax
mov eax, dword [ebx + 4]
cmp eax, edi
mov byte [ebx + 0x20d], 1
mov byte [ebx + 0x21d], 1
je 0x407296
cmp eax, 0xa
je 0x407286
cmp eax, 0x5a
jne 0x40729d
mov byte [ebx + 0x21b], 1
mov byte [ebx + 0x21f], 1
mov byte [ebx + 0x21e], 1
jmp 0x40729d
mov byte [ebx + 0x21b], 1
mov byte [ebx + 0x21a], 1
jmp 0x40729d
mov byte [ebx + 0x21c], 1
push esi
push str.kernel32.dll
mov dword [ebp + 0x74], edi
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
cmp eax, edi
mov dword [ebp + 0x5c], eax
je 0x4072c5
push str.IsWow64Process
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
cmp eax, edi
mov esi, eax
jne 0x4072ca
mov esi, 0x40629f
lea eax, [ebp + 0x74]
push eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call esi
cmp dword [ebp + 0x74], 1
jne 0x4072e4
mov byte [ebx + 0x220], 1
mov dword [ebp + 0x38], edi
push 8
xor eax, eax
cmp byte [ebx + 0x220], al
pop ecx
lea edi, [ebp + 0x3c]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.DLL_FreeLibrary]
je 0x407335
and dword [ebp + 0x68], eax
and dword [ebp + 0x70], eax
lea esi, [ebp + 0x68]
call fcn.00407396
test al, al
je 0x407328
call fcn.00407396
test al, al
mov eax, dword [ebp + 0x70]
jne 0x407322
mov eax, 0x40605a
lea ecx, [ebp + 0x38]
push ecx
call eax
cmp dword [ebp + 0x68], 0
je 0x40733f
push dword [ebp + 0x68]
call edi
jmp 0x40733f
lea eax, [ebp + 0x38]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemInfo]
mov eax, dword [ebp + 0x38]
test ax, ax
pop esi
jne 0x407354
mov dword [ebx + 0x224], 1
jmp 0x407383
cmp ax, 6
jne 0x407366
mov dword [ebx + 0x224], 2
jmp 0x407383
cmp ax, 9
jne 0x407378
mov dword [ebx + 0x224], 3
jmp 0x407383
movzx eax, ax
neg eax
mov dword [ebx + 0x224], eax
cmp dword [ebp + 0x5c], 0
je 0x40738e
push dword [ebp + 0x5c]
call edi
mov eax, ebx
pop edi
add ebp, 0x78
leave
ret