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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100d8222
mov eax, dword fs:[0]
push eax
sub esp, 0x838
mov eax, dword [0x10118974]
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 edi, dword [ebp + 8]
mov ebx, 0x1011d898
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x818], edi
mov dword [ebp - 0x838], ecx
mov dword [ebp - 0x81c], ebx
mov dword [ebp - 0x83c], 0
mov eax, dword [ebx + 0xc]
test dword [ecx], eax
jne 0x1002a984
xor eax, eax
mov dword [ebp - 0x830], eax
call fcn.10009a50
mov ecx, eax
test ecx, ecx
je 0x1002aa1f
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x814], esi
mov dword [ebp - 0x82c], 0x104
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
mov dword [ebp - 4], 0
jge 0x1002a5e0
push 0x104
lea ecx, [ebp - 0x814]
call fcn.10009fa0
mov esi, dword [ebp - 0x814]
cmp dword [esi - 8], 0x104
jl 0x1002aa15
xor eax, eax
mov dword [esi - 0xc], 0x104
push eax
push eax
push eax
push eax
mov word [esi + 0x208], ax
lea eax, [ebp - 0x82c]
push eax
push esi
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
push dword [esi - 8]
mov ebx, eax
push esi
call fcn.100b3c53
add esp, 8
test eax, eax
js 0x1002aa15
cmp eax, dword [esi - 8]
jg 0x1002aa15
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test ebx, ebx
jne 0x1002a953
cmp ebx, 0xea
je 0x1002a953
lea eax, [ebp - 0x824]
mov dword [ebp - 0x824], 0
push eax
push 0x20019
push 0
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1002a94b
push 0x800
push eax
lea eax, [ebp - 0x810]
push eax
call fcn.100ac300
mov ebx, dword [ebp - 0x81c]
lea eax, [ebp - 0x840]
add esp, 0xc
mov dword [ebp - 0x844], 1
mov dword [ebp - 0x840], 0x200000
push eax
lea eax, [ebp - 0x810]
push eax
lea eax, [ebp - 0x844]
push eax
push 0
push dword [ebx + 4]
push dword [ebp - 0x824]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
cmp dword [ebx + 8], 0
je 0x1002a6ed
push dword [ebx]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebp - 0x824]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov edi, eax
call fcn.10009a50
test eax, eax
je 0x1002aa1f
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x828], eax
push edi
lea ecx, [ebp - 0x828]
mov byte [ebp - 4], 1
call fcn.1002a390
test al, al
jne 0x1002a762
test edi, edi
jne 0x1002a741
xor ecx, ecx
jmp 0x1002a755
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1002a746
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x828]
call fcn.1000a550
mov edi, dword [str.70e489bf_a8ba_460f_9c42_567695d37140]
mov byte [ebp - 4], 2
call fcn.10009a50
mov ecx, eax
test ecx, ecx
je 0x1002aa1f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x820], eax
push edi
lea ecx, [ebp - 0x820]
mov byte [ebp - 4], 3
call fcn.1002a390
test al, al
jne 0x1002a7cc
test edi, edi
jne 0x1002a7a5
xor eax, eax
jmp 0x1002a7bf
mov eax, edi
lea edx, [eax + 2]
nop word [eax + eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1002a7b0
sub eax, edx
sar eax, 1
push eax
push edi
lea ecx, [ebp - 0x820]
call fcn.1000a550
lea eax, [ebp - 0x820]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x834]
push ebx
push eax
call fcn.100839b0
add esp, 0xc
mov edx, dword [ebp - 0x820]
or eax, 0xffffffff
mov byte [ebp - 4], 6
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002a809
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, dword [ebp - 0x828]
test eax, eax
je 0x1002a83f
test edi, edi
je 0x1002aa1f
push edi
push dword [ebp - 0x834]
call fcn.100b3dfe
add esp, 8
test eax, eax
je 0x1002a9c3
inc dword [ebp - 0x830]
lea edx, [esi - 0x10]
mov dword [ebp - 0x82c], 0x104
cmp dword [edx + 4], 0
mov ebx, dword [edx]
je 0x1002a89f
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x1002a87b
cmp dword [esi - 8], 0
jl 0x1002aa15
xor eax, eax
mov dword [esi - 0xc], 0
mov word [esi], ax
jmp 0x1002a89f
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1002a88f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x814], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x1002a8c9
push 0x104
lea ecx, [ebp - 0x814]
call fcn.10009fa0
mov esi, dword [ebp - 0x814]
cmp dword [esi - 8], 0x104
jl 0x1002aa15
xor eax, eax
mov dword [esi - 0xc], 0x104
push eax
push eax
push eax
push eax
mov word [esi + 0x208], ax
lea eax, [ebp - 0x82c]
push eax
mov eax, dword [ebp - 0x830]
push esi
push eax
push dword [ebp - 0x818]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov edx, dword [ebp - 0x834]
mov ebx, eax
mov byte [ebp - 4], 2
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002a929
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1002a945
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x818]
test ebx, ebx
je 0x1002a642
mov ebx, dword [ebp - 0x81c]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1002a978
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x838]
mov edi, dword [ebp - 0x818]
mov eax, dword [ebp - 0x83c]
add ebx, 0x10
add eax, 0x10
mov dword [ebp - 0x81c], ebx
mov dword [ebp - 0x83c], eax
cmp eax, 0xb0
jb 0x1002a575
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.1009195e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x838]
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x834]
mov byte [ebp - 4], 2
add edx, 0xfffffff0
or dword [ecx], eax
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002a9f0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1002a959
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x1002a959
push 0x80070057
call fcn.10009840
push 0x80004005
call fcn.10009840
int3