Function at 0x40ded0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x61308c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x61e76c]
push esi
mov esi, 0x20
test eax, eax
jne 0x40e33b
push edi
push 0x58a98c
push 0x58a8fc
mov dword [0x61e76c], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x40df3c
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
test eax, eax
je 0x40df3c
cmp dword [ebp - 0x130], 0
mov eax, 0x40
cmovne esi, eax
push 0x58a99c
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x12c], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x40e335
push 0x58a9b0
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40e32e
lea ecx, [ebp - 0x12c]
push ecx
lea ecx, [ebp - 0x124]
push ecx
lea ecx, [ebp - 0x128]
push ecx
call eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x128]
cmp eax, 4
jne 0x40dfde
mov eax, dword [ebp - 0x124]
test eax, eax
je 0x40dfc4
cmp eax, 0xa
je 0x40dfc4
cmp eax, 0x5a
jne 0x40e335
mov eax, 1
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp eax, 5
jne 0x40e0a1
mov eax, dword [ebp - 0x124]
test eax, eax
jne 0x40e00b
mov eax, 2
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x40e054
cmp si, 0x20
jne 0x40e030
mov eax, 4
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x40e335
mov eax, 8
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x40e335
cmp si, 0x20
jne 0x40e07d
mov eax, 0x10
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x40e335
mov eax, 0x20
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp eax, 6
jne 0x40e284
mov eax, dword [ebp - 0x124]
test eax, eax
jne 0x40e172
push 0x11c
push eax
lea eax, [ebp - 0x120]
push eax
call fcn.0052d340
add esp, 0xc
mov dword [ebp - 0x120], 0x11c
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp byte [ebp - 6], 3
jne 0x40e12e
cmp si, 0x20
jne 0x40e10a
mov eax, 0x100
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x40e335
mov eax, 0x200
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp si, 0x20
jne 0x40e14e
mov eax, 0x40
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x40e335
mov eax, 0x80
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x40e1bb
cmp si, 0x20
jne 0x40e197
mov eax, 0x400
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x40e335
mov eax, 0x800
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x40e204
cmp si, 0x20
jne 0x40e1e0
mov eax, 0x1000
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x40e335
mov eax, 0x2000
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp eax, 3
jne 0x40e24d
cmp si, 0x20
jne 0x40e229
mov eax, 0x4000
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x40e335
mov eax, 0x8000
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp eax, 4
jne 0x40e335
cmp si, 0x20
je 0x40e2ee
cmp si, 0x40
jne 0x40e335
mov eax, 0x20000
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp eax, 0xa
jne 0x40e335
cmp dword [ebp - 0x124], 0
jne 0x40e335
mov eax, 0x55f0
cmp word [ebp - 0x12c], ax
jb 0x40e2e8
cmp si, 0x20
jne 0x40e2c8
mov eax, 0x20001
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x40e335
mov eax, 0x20002
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
cmp si, 0x20
jne 0x40e308
mov eax, 0x10000
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
mov eax, dword [0x61e76c]
cmp si, 0x40
mov ecx, 0x20000
cmove eax, ecx
pop edi
mov dword [0x61e76c], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [0x61e76c]
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.005120a1
mov esp, ebp
pop ebp
ret