Function at 0x4c6a50
Capabilities:
Check os version
Get common file path
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x508
mov eax, dword [0x5a53f4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov dword [ebp - 0x340], 0
mov dword [ebp - 0x330], 0
push 0x118
push 0
lea eax, [ebp - 0x32c]
push eax
call fcn.00534b20
add esp, 0xc
mov dword [ebp - 0x330], 0x11c
mov dword [ebp - 0x488], 0
push 0x118
push 0
lea ecx, [ebp - 0x484]
push ecx
call fcn.00534b20
add esp, 0xc
mov dword [ebp - 0x488], 0x11c
push 0x575f34
push 0x575f44
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x33c], eax
cmp dword [ebp - 0x33c], 0
je 0x4c6b7c
lea edx, [ebp - 0x488]
push edx
call dword [ebp - 0x33c]
mov eax, dword [ebp - 0x484]
mov dword [ebp - 0x32c], eax
mov ecx, dword [ebp - 0x480]
mov dword [ebp - 0x328], ecx
mov dl, byte [ebp - 0x36e]
mov byte [ebp - 0x216], dl
mov ax, word [ebp - 0x374]
mov word [ebp - 0x21c], ax
mov cx, word [ebp - 0x372]
mov word [ebp - 0x21a], cx
lea edx, [ebp - 0x474]
push edx
push 0x80
lea eax, [ebp - 0x31c]
push eax
call fcn.00535f5c
add esp, 0xc
mov ecx, dword [ebp - 0x478]
mov dword [ebp - 0x320], ecx
mov edx, dword [ebp - 0x47c]
mov dword [ebp - 0x324], edx
mov ax, word [ebp - 0x370]
mov word [ebp - 0x218], ax
jmp 0x4c6b89
lea ecx, [ebp - 0x330]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov dword [ebp - 0x364], 0
xor edx, edx
mov dword [ebp - 0x360], edx
mov dword [ebp - 0x35c], edx
mov dword [ebp - 0x358], edx
mov dword [ebp - 0x354], edx
mov dword [ebp - 0x350], edx
mov dword [ebp - 0x34c], edx
mov dword [ebp - 0x348], edx
mov dword [ebp - 0x344], edx
push 0x575f58
push 0x575f6c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x334], eax
cmp dword [ebp - 0x334], 0
je 0x4c6bfa
lea eax, [ebp - 0x364]
push eax
call dword [ebp - 0x334]
jmp 0x4c6c07
lea ecx, [ebp - 0x364]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
movzx edx, word [ebp - 0x21c]
mov eax, dword [ebp + 0x10]
mov dword [eax], edx
mov ecx, dword [ebp - 0x32c]
imul ecx, ecx, 0xa
add ecx, dword [ebp - 0x328]
mov dword [ebp - 0x338], ecx
xor edx, edx
mov word [ebp - 0x210], dx
push 0x206
push 0
lea eax, [ebp - 0x20e]
push eax
call fcn.00534b20
add esp, 0xc
lea ecx, [ebp - 0x210]
push ecx
push 0
push 0
push 0x25
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x4c6deb
push str._ntoskrnl.exe
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x4c6deb
lea eax, [ebp - 0x490]
push eax
lea ecx, [ebp - 0x210]
push ecx
call fcn.004c7b90
add esp, 8
test eax, eax
je 0x4c6deb
mov edx, dword [ebp - 0x48c]
shr edx, 0x10
and edx, 0xffff
movzx eax, dx
imul eax, eax, 0xa
mov ecx, dword [ebp - 0x48c]
and ecx, 0xffff
movzx edx, cx
add eax, edx
cmp dword [ebp - 0x338], eax
jge 0x4c6deb
mov eax, dword [ebp - 0x48c]
shr eax, 0x10
and eax, 0xffff
movzx ecx, ax
mov dword [ebp - 0x32c], ecx
mov edx, dword [ebp - 0x48c]
and edx, 0xffff
movzx eax, dx
mov dword [ebp - 0x328], eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
lea ecx, [ebp - 0x49c]
call fcn.00404e70
push str.Service_Pack
lea ecx, [ebp - 0x4a0]
call fcn.00403220
xor edx, edx
mov word [ebp - 0x508], dx
push 0x62
push 0
lea eax, [ebp - 0x506]
push eax
call fcn.00534b20
add esp, 0xc
mov dword [ebp - 0x494], 1
mov dword [ebp - 0x498], 0x64
lea ecx, [ebp - 0x498]
push ecx
lea edx, [ebp - 0x508]
push edx
lea eax, [ebp - 0x494]
push eax
push str.CSDVersion
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x4c6dd5
lea ecx, [ebp - 0x4a0]
call fcn.00403e80
push eax
lea ecx, [ebp - 0x4a0]
call fcn.00404d60
push eax
lea ecx, [ebp - 0x49c]
call fcn.00404d60
push eax
call fcn.00535eb6
add esp, 0xc
test eax, eax
jne 0x4c6dd5
lea ecx, [ebp - 0x49c]
call fcn.00404d60
mov esi, eax
lea ecx, [ebp - 0x4a0]
call fcn.00403e80
lea ecx, [esi + eax*2]
push ecx
call fcn.005352d2
add esp, 4
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
lea ecx, [ebp - 0x4a0]
call fcn.00404d70
lea ecx, [ebp - 0x49c]
call fcn.00404d70
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x32c]
mov dword [eax], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x328]
mov dword [edx], eax
cmp dword [ebp - 0x32c], 5
jne 0x4c6e22
cmp dword [ebp - 0x328], 0
jne 0x4c6e22
mov dword [ebp - 0x340], 1
jmp 0x4c6fb8
cmp dword [ebp - 0x32c], 5
jne 0x4c6e43
cmp dword [ebp - 0x328], 1
jne 0x4c6e43
mov dword [ebp - 0x340], 2
jmp 0x4c6fb8
cmp dword [ebp - 0x32c], 5
jne 0x4c6e88
cmp dword [ebp - 0x328], 2
jne 0x4c6e88
movzx ecx, byte [ebp - 0x216]
cmp ecx, 1
jne 0x4c6e79
movzx edx, word [ebp - 0x364]
cmp edx, 9
jne 0x4c6e79
mov dword [ebp - 0x340], 2
jmp 0x4c6e83
mov dword [ebp - 0x340], 4
jmp 0x4c6fb8
cmp dword [ebp - 0x32c], 6
jne 0x4c6ecd
cmp dword [ebp - 0x328], 0
jne 0x4c6ecd
movzx eax, byte [ebp - 0x216]
cmp eax, 3
je 0x4c6eb2
movzx ecx, byte [ebp - 0x216]
cmp ecx, 2
jne 0x4c6ebe
mov dword [ebp - 0x340], 6
jmp 0x4c6ec8
mov dword [ebp - 0x340], 3
jmp 0x4c6fb8
cmp dword [ebp - 0x32c], 6
jne 0x4c6f12
cmp dword [ebp - 0x328], 1
jne 0x4c6f12
movzx edx, byte [ebp - 0x216]
cmp edx, 3
je 0x4c6ef7
movzx eax, byte [ebp - 0x216]
cmp eax, 2
jne 0x4c6f03
mov dword [ebp - 0x340], 7
jmp 0x4c6f0d
mov dword [ebp - 0x340], 5
jmp 0x4c6fb8
cmp dword [ebp - 0x32c], 6
jne 0x4c6f3c
cmp dword [ebp - 0x328], 2
jne 0x4c6f3c
movzx ecx, byte [ebp - 0x216]
cmp ecx, 1
jne 0x4c6f3a
mov dword [ebp - 0x340], 8
jmp 0x4c6fb8
cmp dword [ebp - 0x32c], 6
jne 0x4c6f66
cmp dword [ebp - 0x328], 3
jne 0x4c6f66
movzx edx, byte [ebp - 0x216]
cmp edx, 1
jne 0x4c6f64
mov dword [ebp - 0x340], 9
jmp 0x4c6fb8
cmp dword [ebp - 0x32c], 6
jne 0x4c6f90
cmp dword [ebp - 0x328], 4
jne 0x4c6f90
movzx eax, byte [ebp - 0x216]
cmp eax, 1
jne 0x4c6f8e
mov dword [ebp - 0x340], 0xa
jmp 0x4c6fb8
cmp dword [ebp - 0x32c], 0xa
jne 0x4c6fb8
cmp dword [ebp - 0x328], 0
jne 0x4c6fb8
movzx ecx, byte [ebp - 0x216]
cmp ecx, 1
jne 0x4c6fb8
mov dword [ebp - 0x340], 0xa
movzx edx, word [ebp - 0x218]
and edx, 0x40
je 0x4c6fce
mov dword [ebp - 0x340], 0
mov eax, dword [ebp - 0x340]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005308cb
mov esp, ebp
pop ebp
ret