Function at 0x40487e
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1dc
push edi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push 0x4133c0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], 4
cmp dword [ebp - 0x14], 0
je 0x4048ee
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 4]
push edx
push 0
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4048ee
mov dword [ebp - 0x1c0], 1
jmp 0x4048f8
mov dword [ebp - 0x1c0], 0
mov ecx, dword [ebp - 0x1c0]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x14], 0
je 0x404926
cmp dword [ebp - 4], 0x100
jb 0x404926
mov dword [ebp - 0x1c4], 1
jmp 0x404930
mov dword [ebp - 0x1c4], 0
mov eax, dword [ebp - 0x1c4]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40496a
lea ecx, [ebp - 0x10]
push ecx
push 0x20019
push 0
push 0x413408
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40496a
mov dword [ebp - 0x1c8], 1
jmp 0x404974
mov dword [ebp - 0x1c8], 0
mov edx, dword [ebp - 0x1c8]
mov dword [ebp - 0x14], edx
mov dword [ebp - 8], 4
cmp dword [ebp - 0x14], 0
je 0x4049b2
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
push 0
push 0
push 0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4049b2
mov dword [ebp - 0x1cc], 1
jmp 0x4049bc
mov dword [ebp - 0x1cc], 0
mov eax, dword [ebp - 0x1cc]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x14], 0
je 0x4049eb
mov edx, dword [ebp - 4]
and edx, 0x40
test edx, edx
je 0x4049eb
mov dword [ebp - 0x1d0], 1
jmp 0x4049f5
mov dword [ebp - 0x1d0], 0
mov eax, dword [ebp - 0x1d0]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x404a0d
mov ecx, dword [ebp - 0xc]
or ecx, 2
mov dword [ebp - 0xc], ecx
lea edx, [ebp - 0x10]
push edx
push 0x20019
push 0
push 0x41344c
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], 4
cmp dword [ebp - 0x18], 0
je 0x404a6e
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
push 0
push 0
push 0x413470
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404a6e
cmp dword [ebp - 4], 0
je 0x404a6e
mov dword [ebp - 0x1d4], 1
jmp 0x404a78
mov dword [ebp - 0x1d4], 0
mov eax, dword [ebp - 0x1d4]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x404aaa
mov dword [ebp - 8], 4
lea ecx, [ebp - 8]
push ecx
push 0x412c00
push 0
push 0
push 0x413478
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x18], 0
je 0x404ac3
mov ecx, dword [ebp - 0xc]
or ecx, 4
mov dword [ebp - 0xc], ecx
push 0x41348c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x416dd4], eax
cmp dword [0x416dd4], 0
je 0x404b45
push 0x41349c
mov edx, dword [0x416dd4]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41712c], eax
cmp dword [0x41712c], 0
je 0x404b23
push 0x416dd8
call dword [0x41712c]
test eax, eax
jne 0x404b23
mov eax, dword [0x416dd8]
and eax, 1
test eax, eax
je 0x404b23
mov dword [ebp - 0x1d8], 1
jmp 0x404b2d
mov dword [ebp - 0x1d8], 0
mov ecx, dword [ebp - 0x1d8]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0
je 0x404b45
mov edx, dword [ebp - 0xc]
or edx, 1
mov dword [ebp - 0xc], edx
cmp dword [0x416dd4], 0
je 0x404b5a
mov eax, dword [0x416dd4]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x416dd4], 0
mov ecx, dword [ebp - 0xc]
and ecx, 2
test ecx, ecx
je 0x404c8a
mov edx, dword [ebp - 0xc]
and edx, 4
test edx, edx
je 0x404c8a
mov eax, dword [ebp - 0xc]
and eax, 1
test eax, eax
je 0x404c8a
mov dword [ebp - 0xb0], 0x94
mov dword [ebp - 0xac], 0
mov ecx, 0x23
xor eax, eax
lea edi, [ebp - 0xa8]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0xb0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0xa0], 2
jne 0x404c8a
cmp dword [ebp - 0xac], 5
jb 0x404c8a
push 0x104
lea edx, [ebp - 0x1b8]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x4134b8
push 0x5c
lea eax, [ebp - 0x1b8]
push eax
call fcn.004082e0
add esp, 8
push eax
call fcn.00408170
add esp, 8
lea ecx, [ebp - 0x1b8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0xb4], 0
jne 0x404c2e
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0xb4]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x4134c4
push 0x5c
lea eax, [ebp - 0x1b8]
push eax
call fcn.004082e0
add esp, 8
push eax
call fcn.00408170
add esp, 8
lea ecx, [ebp - 0x1b8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0xb4], 0
jne 0x404c7d
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0xb4]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 4], 0
call fcn.004014e0
cmp eax, 0x314b
jne 0x404ca4
mov dword [ebp - 4], 1
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push 0x4134d4
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x1bc], eax
mov dword [ebp - 8], 4
cmp dword [ebp - 0x1bc], 0
je 0x404d05
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 4]
push edx
push 0
push 0
push 0x4134f0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404d05
mov dword [ebp - 0x1dc], 1
jmp 0x404d0f
mov dword [ebp - 0x1dc], 0
mov ecx, dword [ebp - 0x1dc]
mov dword [ebp - 0x1bc], ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], 0
je 0x404d36
mov eax, dword [ebp - 0xc]
or eax, 0x80000000
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
pop edi
mov esp, ebp
pop ebp
ret