Function at 0x1051523
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 0x10518cd
push ebx
push 0x3a
pop ecx
lea edx, [eax + 2]
cmp cx, word [eax + 2]
jne 0x10516ef
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x105157c
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 0x10515c0
cmp ecx, 0x72
jne 0x10518b7
test ebx, ebx
je 0x10518cc
add eax, 4
push eax
push edi
push ebx
call fcn.01035811
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 0x10518b7
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 0x1051631
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 0x1051631
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
call fcn.01055edd
mov dword [ebp - 0x2ac], eax
mov dword [ebp - 0x2a8], edx
push 0x80000000
push dword [ebp - 0x29c]
call fcn.01057a69
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 0x10516be
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 0x10516b2
cmp dword [ebp - 0x294], esi
jne 0x10516b2
lea eax, [ebp - 0x28c]
push eax
call fcn.01055edd
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 0x10518b0
jb 0x10516e4
mov eax, dword [ebp - 0x2a4]
cmp dword [ebp - 0x2ac], eax
ja 0x10518b0
mov dword [ebp - 0x290], esi
jmp 0x10518b7
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x10516ef
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 0x10518cc
push dword [esi + 0x34]
and dword [ebp - 0x298], 0
and dword [ebp - 0x294], 0
push edi
push ebx
call fcn.01035811
push 0x3a
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1051757
xor eax, eax
mov word [edi], ax
inc edi
inc edi
push ebx
call fcn.01055edd
mov dword [ebp - 0x2ac], eax
mov ebx, edx
test edi, edi
je 0x105177f
push 0x100875c
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x10518b7
mov edi, 0x104
push edi
push 0
lea eax, [ebp - 0x20c]
push eax
call fcn.01058c2d
test eax, eax
je 0x10517c5
lea eax, [ebp - 0x20c]
push eax
call fcn.01055e3d
push 0x100429c
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01035886
lea eax, [ebp - 0x20c]
push eax
call fcn.010561ca
test eax, eax
jne 0x10517fd
push edi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1051868
push 0x1008744
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01035886
lea eax, [ebp - 0x20c]
push eax
call fcn.010561ca
test eax, eax
je 0x1051868
lea eax, [ebp - 0x294]
push eax
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.010569a5
test eax, eax
jl 0x1051868
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.0103590d
add esp, 0x1c
lea eax, [ebp - 0x20c]
push eax
call fcn.01055edd
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x2a0], edx
cmp dword [ebp - 0x2a0], ebx
jb 0x105188c
ja 0x1051880
mov eax, dword [ebp - 0x2a4]
cmp eax, dword [ebp - 0x2ac]
jb 0x105188c
mov dword [ebp - 0x290], 1
jmp 0x10518b7
mov esi, dword [esi + 0x54]
and dword [ebp - 0x290], 0
test esi, esi
je 0x10518b7
push dword [esi + 0x24]
call fcn.01055edd
cmp edx, ebx
jb 0x10518b0
ja 0x1051880
cmp eax, dword [ebp - 0x2ac]
jae 0x1051880
and dword [ebp - 0x290], 0
cmp dword [ebp - 0x29c], 0
je 0x10518cc
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.01047464
leave
ret