Function at 0x10514c0
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2ac
mov eax, dword [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov eax, dword [esi + 0x34]
push edi
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x290], 1
mov dword [ebp - 0x29c], edi
mov dword [ebp - 0x298], edi
mov dword [ebp - 0x2ac], edi
mov dword [ebp - 0x2a8], edi
je 0x1051871
cmp word [eax + 2], 0x3a
push ebx
lea edx, [eax + 2]
jne 0x105168b
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x1051517
sub eax, edx
sar eax, 1
lea edi, [eax + 1]
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov ebx, eax
mov eax, dword [esi + 0x34]
pop ecx
movzx ecx, word [eax]
cmp ecx, 0x52
mov dword [ebp - 0x2a4], ebx
je 0x105155b
cmp ecx, 0x72
jne 0x105185b
test ebx, ebx
je 0x1051870
add eax, 4
push eax
push edi
push ebx
call fcn.01034c79
mov esi, dword [sym.imp.msvcrt.dll_wcschr]
push 0x2c
push ebx
call esi
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x105185b
and word [edi], 0
and dword [ebp - 0x290], 0
inc edi
inc edi
push 0x2c
push edi
call esi
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x10515c9
and word [ebx], 0
inc ebx
inc ebx
push 0x2c
push ebx
call esi
test eax, eax
pop ecx
pop ecx
je 0x10515c9
and word [eax], 0
add eax, 2
push eax
call fcn.01056c56
mov dword [ebp - 0x29c], eax
mov dword [ebp - 0x298], edx
push SysReAllocString
push dword [ebp - 0x2a4]
call fcn.010587f2
lea ecx, [ebp - 0x290]
push ecx
xor esi, esi
inc esi
push esi
push 0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1051656
lea eax, [ebp - 0x2a0]
push eax
lea eax, [ebp - 0x28c]
push eax
lea eax, [ebp - 0x294]
push eax
push 0
push ebx
push dword [ebp - 0x290]
mov dword [ebp - 0x294], esi
mov dword [ebp - 0x2a0], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x105164a
cmp dword [ebp - 0x294], esi
jne 0x105164a
lea eax, [ebp - 0x28c]
push eax
call fcn.01056c56
mov dword [ebp - 0x2ac], eax
mov dword [ebp - 0x2a8], edx
push dword [ebp - 0x290]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x2a8]
cmp dword [ebp - 0x298], eax
ja 0x105167f
jb 0x1051674
mov eax, dword [ebp - 0x2ac]
cmp dword [ebp - 0x29c], eax
ja 0x105167f
mov dword [ebp - 0x290], esi
jmp 0x105185b
and dword [ebp - 0x290], 0
jmp 0x105185b
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x105168b
sub eax, edx
sar eax, 1
lea edi, [eax + 1]
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov ebx, eax
test ebx, ebx
pop ecx
mov dword [ebp - 0x2a4], ebx
je 0x1051870
push dword [esi + 0x34]
and dword [ebp - 0x2a0], 0
and dword [ebp - 0x294], 0
push edi
push ebx
call fcn.01034c79
push 0x3a
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x10516f2
and word [edi], 0
inc edi
inc edi
push ebx
call fcn.01056c56
xor ebx, ebx
cmp edi, ebx
mov dword [ebp - 0x29c], eax
mov dword [ebp - 0x298], edx
je 0x1051720
push 0x100845c
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x105185b
mov edi, 0x104
push edi
push ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.01059beb
test eax, eax
je 0x1051765
lea eax, [ebp - 0x20c]
push eax
call fcn.01056bba
push 0x10046ec
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034cee
lea eax, [ebp - 0x20c]
push eax
call fcn.01056f43
cmp eax, ebx
jne 0x105179d
push edi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1051808
push 0x1008444
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034cee
lea eax, [ebp - 0x20c]
push eax
call fcn.01056f43
cmp eax, ebx
je 0x1051808
lea eax, [ebp - 0x294]
push eax
lea eax, [ebp - 0x2a0]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.010577fc
test eax, eax
jl 0x1051808
mov eax, dword [ebp - 0x294]
movzx ecx, ax
push ecx
shr eax, 0x10
push eax
mov eax, dword [ebp - 0x2a0]
movzx ecx, ax
push ecx
shr eax, 0x10
push eax
push 0x1007e14
lea eax, [ebp - 0x20c]
push 0x103
push eax
call fcn.01034d76
add esp, 0x1c
lea eax, [ebp - 0x20c]
push eax
call fcn.01056c56
mov dword [ebp - 0x2ac], eax
mov dword [ebp - 0x2a8], edx
mov edi, dword [ebp - 0x298]
cmp dword [ebp - 0x2a8], edi
jb 0x1051832
ja 0x1051826
mov eax, dword [ebp - 0x29c]
cmp dword [ebp - 0x2ac], eax
jb 0x1051832
mov dword [ebp - 0x290], 1
jmp 0x105185b
mov esi, dword [esi + 0x54]
cmp esi, ebx
mov dword [ebp - 0x290], ebx
je 0x105185b
push dword [esi + 0x24]
call fcn.01056c56
cmp edx, edi
jb 0x1051855
ja 0x1051826
cmp eax, dword [ebp - 0x29c]
jae 0x1051826
mov dword [ebp - 0x290], ebx
cmp dword [ebp - 0x2a4], 0
je 0x1051870
push dword [ebp - 0x2a4]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x290]
pop edi
xor ecx, ebp
pop esi
call fcn.01047417
leave
ret