Function at 0x10004f50
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x101b600c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x101b82a8]
push esi
mov esi, 0x20
test eax, eax
jne 0x1000534d
push edi
push 0x10027ee0
push 0x10027ef0
mov dword [0x101b82a8], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x10004fbc
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
test eax, eax
je 0x10004fbc
cmp dword [ebp - 0x12c], 0
mov eax, 0x40
cmovne esi, eax
push str.ntdll.dll
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x130], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x10005347
push str.RtlGetNtVersionNumbers
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x10005340
lea ecx, [ebp - 0x130]
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 0x1000505e
mov eax, dword [ebp - 0x124]
test eax, eax
je 0x10005044
cmp eax, 0xa
je 0x10005044
cmp eax, 0x5a
jne 0x10005347
mov eax, 1
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp eax, 5
jne 0x10005121
mov eax, dword [ebp - 0x124]
test eax, eax
jne 0x1000508b
mov eax, 2
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x100050d4
cmp si, 0x20
jne 0x100050b0
mov eax, 4
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x10005347
mov eax, 8
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x10005347
cmp si, 0x20
jne 0x100050fd
mov eax, 0x10
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x10005347
mov eax, 0x20
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp eax, 6
jne 0x100052f8
mov eax, dword [ebp - 0x124]
test eax, eax
jne 0x100051f2
push 0x11c
push eax
lea eax, [ebp - 0x120]
push eax
call fcn.100106a0
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 0x100051ae
cmp si, 0x20
jne 0x1000518a
mov eax, 0x100
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x10005347
mov eax, 0x200
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp si, 0x20
jne 0x100051ce
mov eax, 0x40
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x10005347
mov eax, 0x80
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x1000523b
cmp si, 0x20
jne 0x10005217
mov eax, 0x400
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x10005347
mov eax, 0x800
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x10005284
cmp si, 0x20
jne 0x10005260
mov eax, 0x1000
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x10005347
mov eax, 0x2000
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp eax, 3
jne 0x100052cd
cmp si, 0x20
jne 0x100052a9
mov eax, 0x4000
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp si, 0x40
jne 0x10005347
mov eax, 0x8000
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
cmp eax, 4
jb 0x10005347
cmp si, 0x20
je 0x10005300
cmp si, 0x40
jne 0x10005347
mov eax, 0x20000
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
jbe 0x10005347
cmp si, 0x20
jne 0x1000531a
mov eax, 0x10000
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
mov eax, dword [0x101b82a8]
cmp si, 0x40
mov ecx, 0x20000
cmove eax, ecx
pop edi
mov dword [0x101b82a8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000da67
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [0x101b82a8]
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1000da67
mov esp, ebp
pop ebp
ret