Function at 0x4fac50
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a519d
mov eax, dword fs:[0]
push eax
sub esp, 0x81c
mov eax, dword [0x60f520]
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
mov dword [ebp - 0x824], edx
mov ebx, ecx
mov dword [ebp - 0x828], 0
call fcn.0040bce0
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x4facac
push 0x80004005
call fcn.0040c390
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x818], esi
lea eax, [ebp - 0x820]
mov dword [ebp - 4], 0
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_PathsiApple.exe
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x820], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4fad7f
mov dword [ebp - 0x81c], eax
mov ecx, 1
mov dword [ebp - 0x814], 0x104
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x400
or eax, ecx
jge 0x4fad2b
push 0x400
lea ecx, [ebp - 0x818]
call fcn.0040c110
mov esi, dword [ebp - 0x818]
lea eax, [ebp - 0x814]
push eax
push esi
lea eax, [ebp - 0x81c]
push eax
push 0
push str.Path
push dword [ebp - 0x820]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esi - 8]
push esi
call fcn.00551cd2
add esp, 8
test eax, eax
js 0x4fae0f
cmp eax, dword [esi - 8]
jg 0x4fae0f
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push dword [ebp - 0x820]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push esi
call edi
test eax, eax
je 0x4fae19
push dword [ebp - 0x824]
lea ecx, [ebp - 0x814]
call fcn.0040c2d0
lea eax, [ebp - 0x814]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp - 0x818]
mov ecx, ebx
call fcn.00513e30
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov edx, dword [ebp - 0x814]
add esp, 4
add edx, 0xfffffff0
mov eax, esi
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4fade2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x818]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x4fb008
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4fb008
push 0x80070057
call fcn.0040c390
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.00559380
add esp, 0xc
lea eax, [ebp - 0x810]
push 0x400
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x810]
push 0x5beefc
push eax
call esi
push str.iApple.exe
lea eax, [ebp - 0x810]
push eax
call esi
lea eax, [ebp - 0x810]
push eax
call edi
or esi, 0xffffffff
test eax, eax
je 0x4faef9
lea eax, [ebp - 0x810]
push eax
lea ecx, [ebp - 0x814]
call fcn.0040c2d0
lea edx, [ebp - 0x814]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x81c]
call fcn.00513d50
push eax
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 3
call fcn.0040b7d0
mov byte [ebp - 4], 2
mov ecx, esi
mov edx, dword [ebp - 0x81c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4faed6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, esi
mov edx, dword [ebp - 0x814]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4faef9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.....iApple.exe
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x810]
push eax
call edi
test eax, eax
je 0x4faf95
lea eax, [ebp - 0x810]
push eax
lea ecx, [ebp - 0x814]
call fcn.0040c2d0
lea edx, [ebp - 0x814]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x81c]
call fcn.00513d50
push eax
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 5
call fcn.0040b7d0
mov byte [ebp - 4], 4
mov ecx, esi
mov edx, dword [ebp - 0x81c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4faf72
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, esi
mov edx, dword [ebp - 0x814]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4faf95
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x824]
lea ecx, [ebp - 0x824]
call fcn.0040c2d0
lea eax, [ebp - 0x824]
mov byte [ebp - 4], 6
push eax
lea edx, [ebp - 0x818]
mov ecx, ebx
call fcn.00513e30
mov byte [ebp - 4], 0
add esp, 4
mov edx, dword [ebp - 0x824]
mov ecx, esi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4fafe4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x818]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x4fb008
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
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.0055199a
mov esp, ebp
pop ebp
ret