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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41149e3d
mov eax, dword fs:[0]
push eax
sub esp, 0x144
mov eax, dword [0x411bade8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
xor esi, esi
call fcn.41040000
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4102f1cc
push 0x80004005
call fcn.410011f0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x140], edi
lea ecx, [ebp - 0x130]
push ecx
push str.SoftwareThinPrintTPAutoConnect
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 4], ebx
mov dword [ebp - 0x138], ebx
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x13c], ebx
mov dword [ebp - 0x130], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
cmp eax, ebx
je 0x4102f2d2
call fcn.41040000
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4102f232
push 0x80004005
call fcn.410011f0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x144], esi
push 0x6a
mov byte [ebp - 4], 1
call fcn.4103fec7
cmp eax, ebx
je 0x4102f267
push 0x6a
push eax
lea ecx, [ebp - 0x144]
call fcn.410015a0
mov esi, dword [ebp - 0x144]
push esi
push 0x41157f9c
push 0x2000001
push 0x293
push str.WinPrinter.cpp
mov byte [ebp - 4], 2
call fcn.41002c10
add esi, 0xfffffff0
add esp, 0x14
mov byte [ebp - 4], bl
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4102f2a7
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4102f2ca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
jmp 0x4102f73d
push 0x11c
lea ecx, [ebp - 0x12c]
push ebx
push ecx
call fcn.4112eb40
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
add esp, 0xc
lea edx, [ebp - 0x12c]
push edx
mov dword [ebp - 0x12c], 0x11c
call edi
cmp eax, ebx
jne 0x4102f35b
lea eax, [ebp - 0x12c]
push eax
mov dword [ebp - 0x12c], 0x114
call edi
test eax, eax
jne 0x4102f35b
mov ecx, dword [ebp - 0x130]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x140]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4102f351
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xfffffffe
jmp 0x4102f73d
mov ecx, dword [ebp - 0x128]
push ecx
push str.osvi.dwMajorVersion____d
push 0x1000001
push 0x2aa
push str.WinPrinter.cpp
call fcn.41002c10
mov eax, dword [ebp - 0x11c]
add esp, 0x14
sub eax, 2
je 0x4102f42a
call fcn.41040000
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4102f3a7
push 0x80004005
call fcn.410011f0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x144], eax
mov ecx, dword [ebp - 0x128]
push ecx
lea edx, [ebp - 0x144]
push str.Unknown_Plattform:__i
push edx
mov byte [ebp - 4], 6
call fcn.41001b10
mov edi, dword [ebp - 0x144]
push 0x2000000
push str.DLL:_Query_Access_Rights_From_Registry__
push edi
push 0x1000001
push 0x341
push str.WinPrinter.cpp
call fcn.41002c10
lea eax, [edi - 0x10]
add esp, 0x24
mov esi, 0xfffffff7
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4102f6ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4102f6ab
mov eax, dword [ebp - 0x128]
mov edi, 4
cmp eax, edi
ja 0x4102f54f
lea ecx, [ebp - 0x13c]
push ecx
mov ecx, dword [ebp - 0x130]
lea edx, [ebp - 0x138]
push edx
lea eax, [ebp - 0x134]
push eax
push ebx
push str.RightsWinNT
push ecx
mov dword [ebp - 0x13c], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x4102f4ba
cmp dword [ebp - 0x134], edi
jne 0x4102f4ba
mov eax, dword [ebp - 0x138]
cmp eax, 0xcb
ja case.0x4102f48b.3
movzx edx, byte [eax + 0x4102f76c]
jmp dword [edx*4 + 0x4102f75c]
mov esi, 0xcb
jmp 0x4102f6ab
mov esi, 0xc9
jmp 0x4102f6ab
mov esi, 0xca
jmp 0x4102f6ab
mov esi, 0xfffffffb
jmp 0x4102f6ab
push 0x6b
lea ecx, [ebp - 0x150]
call fcn.41002090
mov eax, dword [eax]
push eax
push 0x41157f9c
push 0x2000001
push 0x2bd
push str.WinPrinter.cpp
mov byte [ebp - 4], 3
call fcn.41002c10
mov eax, dword [ebp - 0x150]
add eax, 0xfffffff0
add esp, 0x14
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4102f50f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x130]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x140]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4102f545
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xfffffffd
jmp 0x4102f73d
cmp eax, 5
je 0x4102f62a
cmp eax, 6
jne 0x4102f6ab
mov eax, dword [ebp - 0x124]
cmp eax, 2
jb 0x4102f62a
jne 0x4102f6ab
lea ecx, [ebp - 0x13c]
push ecx
mov ecx, dword [ebp - 0x130]
lea edx, [ebp - 0x138]
push edx
lea eax, [ebp - 0x134]
push eax
push ebx
push str.RightsWin8
push ecx
mov dword [ebp - 0x13c], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x4102f5e3
cmp dword [ebp - 0x134], edi
jne 0x4102f5e3
mov eax, dword [ebp - 0x138]
cmp eax, 0xd2
ja case.0x4102f67c.5
movzx edx, byte [eax + 0x4102f858]
jmp dword [edx*4 + 0x4102f838]
mov esi, 0xd1
jmp 0x4102f6ab
mov esi, 0xd2
jmp 0x4102f6ab
push 0x6b
lea ecx, [ebp - 0x148]
call fcn.41002090
mov eax, dword [eax]
push eax
push 0x41157f9c
push 0x2000001
push 0x310
push str.WinPrinter.cpp
mov byte [ebp - 4], 5
call fcn.41002c10
add esp, 0x14
lea ecx, [ebp - 0x148]
call fcn.41017b50
mov ecx, dword [ebp - 0x130]
push ecx
jmp 0x4102f727
lea edx, [ebp - 0x13c]
push edx
mov edx, dword [ebp - 0x130]
lea eax, [ebp - 0x138]
push eax
lea ecx, [ebp - 0x134]
push ecx
push ebx
push str.RightsWin2000
push edx
mov dword [ebp - 0x13c], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x4102f6e5
cmp dword [ebp - 0x134], edi
jne 0x4102f6e5
mov eax, dword [ebp - 0x138]
cmp eax, 0xd0
ja case.0x4102f67c.5
movzx eax, byte [eax + 0x4102f944]
jmp dword [eax*4 + 0x4102f92c]
mov esi, 0xcf
jmp 0x4102f6ab
mov esi, 0xcc
jmp 0x4102f6ab
mov esi, 0xcd
jmp 0x4102f6ab
mov esi, 0xce
jmp 0x4102f6ab
mov esi, 0xd0
jmp 0x4102f6ab
mov esi, 0xfffffff8
mov ecx, dword [ebp - 0x130]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x140]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4102f6e1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
jmp 0x4102f73d
push 0x6b
lea ecx, [ebp - 0x14c]
call fcn.41002090
mov ecx, dword [eax]
push ecx
push 0x41157f9c
push 0x2000001
push 0x2e2
push str.WinPrinter.cpp
mov byte [ebp - 4], 4
call fcn.41002c10
add esp, 0x14
lea ecx, [ebp - 0x14c]
call fcn.41017b50
mov edx, dword [ebp - 0x130]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x140]
call fcn.41017b50
mov eax, 0xfffffffc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.4112e1a6
mov esp, ebp
pop ebp
ret