Function at 0x1051545
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 [0x1072c48]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov eax, dword [esi + 0x34]
push edi
xor edi, edi
mov dword [ebp - 0x290], 1
mov dword [ebp - 0x2ac], edi
mov dword [ebp - 0x2a8], edi
mov dword [ebp - 0x2a4], edi
mov dword [ebp - 0x2a0], edi
cmp eax, edi
je 0x10518ef
push ebx
push 0x3a
pop ecx
lea edx, [eax + 2]
cmp cx, word [eax + 2]
jne 0x1051711
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x105159e
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]
mov dword [ebp - 0x29c], ebx
cmp ecx, 0x52
je 0x10515e2
cmp ecx, 0x72
jne 0x10518d9
test ebx, ebx
je 0x10518ee
add eax, 4
push eax
push edi
push ebx
call fcn.01035831
mov esi, dword [sym.imp.msvcrt.dll_wcschr]
push 0x2c
push ebx
call esi
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x10518d9
and dword [ebp - 0x290], 0
xor eax, eax
mov word [edi], ax
inc edi
inc edi
push 0x2c
push edi
call esi
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x1051653
xor eax, eax
mov word [ebx], ax
inc ebx
inc ebx
push 0x2c
push ebx
call esi
pop ecx
pop ecx
test eax, eax
je 0x1051653
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
call fcn.01055efe
mov dword [ebp - 0x2ac], eax
mov dword [ebp - 0x2a8], edx
push 0x80000000
push dword [ebp - 0x29c]
call fcn.01057a8a
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 0x10516e0
lea eax, [ebp - 0x298]
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 - 0x298], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10516d4
cmp dword [ebp - 0x294], esi
jne 0x10516d4
lea eax, [ebp - 0x28c]
push eax
call fcn.01055efe
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x2a0], edx
push dword [ebp - 0x290]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x2a0]
cmp dword [ebp - 0x2a8], eax
ja 0x10518d2
jb 0x1051706
mov eax, dword [ebp - 0x2a4]
cmp dword [ebp - 0x2ac], eax
ja 0x10518d2
mov dword [ebp - 0x290], esi
jmp 0x10518d9
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x1051711
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
pop ecx
mov dword [ebp - 0x29c], ebx
test ebx, ebx
je 0x10518ee
push dword [esi + 0x34]
and dword [ebp - 0x298], 0
and dword [ebp - 0x294], 0
push edi
push ebx
call fcn.01035831
push 0x3a
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1051779
xor eax, eax
mov word [edi], ax
inc edi
inc edi
push ebx
call fcn.01055efe
mov dword [ebp - 0x2ac], eax
mov ebx, edx
test edi, edi
je 0x10517a1
push 0x100875c
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x10518d9
mov edi, 0x104
push edi
push 0
lea eax, [ebp - 0x20c]
push eax
call fcn.01058c4e
test eax, eax
je 0x10517e7
lea eax, [ebp - 0x20c]
push eax
call fcn.01055e5e
push 0x100429c
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.010358a6
lea eax, [ebp - 0x20c]
push eax
call fcn.010561eb
test eax, eax
jne 0x105181f
push edi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x105188a
push 0x1008744
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.010358a6
lea eax, [ebp - 0x20c]
push eax
call fcn.010561eb
test eax, eax
je 0x105188a
lea eax, [ebp - 0x294]
push eax
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.010569c6
test eax, eax
jl 0x105188a
mov eax, dword [ebp - 0x294]
movzx ecx, ax
push ecx
shr eax, 0x10
push eax
mov eax, dword [ebp - 0x298]
movzx ecx, ax
push ecx
shr eax, 0x10
push eax
push 0x1007d80
lea eax, [ebp - 0x20c]
push 0x103
push eax
call fcn.0103592d
add esp, 0x1c
lea eax, [ebp - 0x20c]
push eax
call fcn.01055efe
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x2a0], edx
cmp dword [ebp - 0x2a0], ebx
jb 0x10518ae
ja 0x10518a2
mov eax, dword [ebp - 0x2a4]
cmp eax, dword [ebp - 0x2ac]
jb 0x10518ae
mov dword [ebp - 0x290], 1
jmp 0x10518d9
mov esi, dword [esi + 0x54]
and dword [ebp - 0x290], 0
test esi, esi
je 0x10518d9
push dword [esi + 0x24]
call fcn.01055efe
cmp edx, ebx
jb 0x10518d2
ja 0x10518a2
cmp eax, dword [ebp - 0x2ac]
jae 0x10518a2
and dword [ebp - 0x290], 0
cmp dword [ebp - 0x29c], 0
je 0x10518ee
push dword [ebp - 0x29c]
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.01047480
leave
ret