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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x174
mov eax, dword [0x778400]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
je 0x5227af
mov eax, dword [ebp + 8]
mov byte [eax], 0
cmp dword [0x786a64], 0
je 0x5227d9
cmp dword [ebp + 8], 0
je 0x5227cf
push 0x786a68
mov ecx, dword [ebp + 8]
push ecx
call fcn.00673010
add esp, 8
mov eax, dword [0x786a64]
jmp 0x522dd9
push 0x11c
push 0
lea edx, [ebp - 0x164]
push edx
call fcn.0066eb10
add esp, 0xc
mov dword [ebp - 0x164], 0x11c
lea eax, [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov dword [ebp - 0x174], eax
cmp dword [ebp - 0x174], 0
jne 0x52283a
mov dword [ebp - 0x164], 0x114
lea ecx, [ebp - 0x164]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x52283a
mov eax, dword [0x786a64]
jmp 0x522dd9
push 0x24
push 0
lea edx, [ebp - 0x48]
push edx
call fcn.0066eb10
add esp, 0xc
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [ebp - 0x154]
mov dword [ebp - 0x16c], ecx
cmp dword [ebp - 0x16c], 0
je 0x522d9c
cmp dword [ebp - 0x16c], 1
je 0x522c8a
cmp dword [ebp - 0x16c], 2
je 0x522888
jmp 0x522dbd
movzx edx, word [ebp - 0x48]
cmp edx, 9
je 0x52289a
movzx eax, word [ebp - 0x48]
cmp eax, 6
jne 0x5228ae
push 0x6e2878
push 0x786a68
call fcn.00521f90
add esp, 8
jmp 0x5228c0
push 0x6e2888
push 0x786a68
call fcn.00521f90
add esp, 8
cmp dword [ebp - 0x160], 6
jb 0x522a65
cmp dword [ebp - 0x15c], 2
jb 0x522a65
push 0x6e2898
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x168], eax
cmp dword [ebp - 0x168], 0
je 0x522a18
push 0x6e28ac
mov ecx, dword [ebp - 0x168]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x170], eax
cmp dword [ebp - 0x170], 0
je 0x522a09
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x24]
push ecx
call dword [ebp - 0x170]
mov edx, dword [ebp - 0x20]
and edx, 0xffff
mov dword [ebp - 0x20], edx
cmp dword [ebp - 0x24], 6
jne 0x522968
cmp dword [ebp - 0x1c], 2
jne 0x522968
push 0x6e28c4
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0x12
cmp dword [ebp - 0x24], 6
jne 0x522995
cmp dword [ebp - 0x1c], 3
jne 0x522995
push 0x6e28d0
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0x14
cmp dword [ebp - 0x24], 0xa
jne 0x5229c2
cmp dword [ebp - 0x1c], 0
jne 0x5229c2
push 0x6e28dc
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0x16
mov ax, word [0x6e28e8]
mov word [ebp - 0x18], ax
xor ecx, ecx
mov dword [ebp - 0x16], ecx
mov dword [ebp - 0x12], ecx
mov dword [ebp - 0xe], ecx
mov dword [ebp - 0xa], ecx
mov word [ebp - 6], cx
mov edx, dword [ebp - 0x20]
push edx
push 0x6e28ec
lea eax, [ebp - 0x18]
push eax
call fcn.0066d97a
add esp, 0xc
lea ecx, [ebp - 0x18]
push ecx
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov edx, dword [ebp - 0x168]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x522a65
movzx eax, byte [ebp - 0x4a]
cmp eax, 1
jne 0x522a44
push 0x6e28f8
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0x12
jmp 0x522a65
push 0x6e2904
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0x11
cmp dword [ebp - 0x160], 6
jne 0x522ac4
cmp dword [ebp - 0x15c], 1
jne 0x522ac4
movzx ecx, byte [ebp - 0x4a]
cmp ecx, 1
jne 0x522aa3
push 0x6e2918
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0x10
jmp 0x522ac4
push 0x6e2924
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0xf
cmp dword [ebp - 0x160], 6
jne 0x522b23
cmp dword [ebp - 0x15c], 0
jne 0x522b23
movzx edx, byte [ebp - 0x4a]
cmp edx, 1
jne 0x522b02
push 0x6e293c
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0xd
jmp 0x522b23
push 0x6e294c
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0xe
cmp dword [ebp - 0x160], 5
jne 0x522bc2
cmp dword [ebp - 0x15c], 2
jne 0x522bc2
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x522b6c
push 0x6e2960
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0xc
jmp 0x522bc2
movzx eax, byte [ebp - 0x4a]
cmp eax, 1
jne 0x522ba1
movzx ecx, word [ebp - 0x48]
cmp ecx, 9
jne 0x522ba1
push 0x6e2978
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0xa
jmp 0x522bc2
push 0x6e2994
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0xb
cmp dword [ebp - 0x160], 5
jne 0x522bf5
cmp dword [ebp - 0x15c], 1
jne 0x522bf5
push 0x6e29a8
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 9
cmp dword [ebp - 0x160], 5
jne 0x522c28
cmp dword [ebp - 0x15c], 0
jne 0x522c28
push 0x6e29b4
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 8
cmp dword [ebp - 0x160], 5
jne 0x522c5b
cmp dword [0x786a64], 0
jne 0x522c5b
push 0x6e29c4
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 0xa
cmp dword [ebp - 0x160], 4
ja 0x522c85
push 0x6e29d8
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 7
jmp 0x522dbd
cmp dword [ebp - 0x160], 4
jne 0x522d03
cmp dword [ebp - 0x15c], 0
jne 0x522d03
push 0x6e29e4
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 2
mov edx, 2
shl edx, 0
movzx eax, word [ebp + edx - 0x150]
cmp eax, 0x43
je 0x522ce7
mov ecx, 2
shl ecx, 0
movzx edx, word [ebp + ecx - 0x150]
cmp edx, 0x42
jne 0x522d03
push 0x6e29f0
push 0x786a68
call fcn.00673020
add esp, 8
mov dword [0x786a64], 3
cmp dword [ebp - 0x160], 4
jne 0x522d67
cmp dword [ebp - 0x15c], 0xa
jne 0x522d67
push 0x6e29f8
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 4
mov eax, 2
shl eax, 0
movzx ecx, word [ebp + eax - 0x150]
cmp ecx, 0x41
jne 0x522d67
push 0x6e2a04
push 0x786a68
call fcn.00673020
add esp, 8
mov dword [0x786a64], 5
cmp dword [ebp - 0x160], 4
jne 0x522d9a
cmp dword [ebp - 0x15c], 0x5a
jne 0x522d9a
push 0x6e2a08
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 6
jmp 0x522dbd
push 0x6e2a14
push 0x104
push 0x786a68
call fcn.006745e6
add esp, 0xc
mov dword [0x786a64], 1
cmp dword [ebp + 8], 0
je 0x522dd4
push 0x786a68
mov edx, dword [ebp + 8]
push edx
call fcn.00673010
add esp, 8
mov eax, dword [0x786a64]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0066c98d
mov esp, ebp
pop ebp
ret