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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a1d7e
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x100ef034]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x14], 0
push eax
push 0x20019
push 0
push dword [edx]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x100586eb
call fcn.1003aaa0
test eax, eax
je 0x10058912
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [edi], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 1
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
push 0
push str.Location
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
call fcn.1003aaa0
test eax, eax
je 0x10058912
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 3
cmp ebx, 0xea
jne 0x100587b6
mov edx, dword [ebp - 0x18]
test edx, edx
js 0x1005891c
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x10058761
push edx
lea ecx, [ebp - 0x10]
call fcn.1003f8e0
mov esi, dword [ebp - 0x10]
cmp dword [esi - 4], 1
jle 0x10058775
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
call fcn.1003f7e0
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x18]
push eax
push esi
lea eax, [ebp - 0x20]
push eax
push 0
push str.Location
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esi - 8]
mov ebx, eax
push esi
call fcn.1007c340
add esp, 8
test eax, eax
js 0x1005891c
cmp eax, dword [esi - 8]
jg 0x1005891c
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test ebx, ebx
je 0x100587e3
call fcn.1003aaa0
test eax, eax
je 0x10058912
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x14], 1
jmp 0x100588db
cmp dword [esi - 0xc], 0
jne 0x10058812
call fcn.1003aaa0
test eax, eax
je 0x10058912
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x14], 1
jmp 0x100588db
push 0xe
push str.BINSTSADM.EXE
lea ecx, [ebp - 0x10]
call fcn.1003f390
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x100588bb
lea ecx, [esi - 0x10]
call fcn.10040870
lea esi, [eax + 0x10]
mov dword [ebp - 0x2c], esi
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x10]
push 1
push 0x100ca424
call fcn.1003f950
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
push esi
call fcn.1003f390
push 1
push 0x100ca424
lea ecx, [ebp - 0x10]
call fcn.1003f390
mov byte [ebp - 4], 3
or ebx, 0xffffffff
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1005888d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x10]
add esi, 0xfffffff0
mov ecx, esi
call fcn.10040870
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x14], 1
mov dword [ebp - 4], 0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jmp 0x100588f0
call fcn.1003aaa0
test eax, eax
je 0x10058912
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x14], 1
mov dword [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100586d7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.100374f0
push 0x80070057
call fcn.100374f0
int3