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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c7940
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x101063e4]
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 ebx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 4], eax
call fcn.10004380
mov ecx, eax
test ecx, ecx
je 0x1002028b
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x3c], edi
xor eax, eax
mov dword [ebp - 0x64], 0x208
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp + 0x10]
push 0
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1001f8e1
or ebx, 0xffffffff
jmp 0x10020233
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
mov byte [ebp - 4], 2
jge 0x1001f91e
push 0x104
lea ecx, [ebp - 0x3c]
call fcn.10004430
mov edi, dword [ebp - 0x3c]
cmp dword [edi - 8], 0x104
jl 0x10020295
xor eax, eax
mov dword [edi - 0xc], 0x104
push eax
push eax
push eax
push eax
mov word [edi + 0x208], ax
lea eax, [ebp - 0x64]
push eax
push edi
push 0
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
push dword [edi - 8]
mov esi, eax
push edi
call fcn.100a0806
add esp, 8
test eax, eax
js 0x10020295
cmp eax, dword [edi - 8]
jg 0x10020295
xor ecx, ecx
mov dword [edi - 0xc], eax
or ebx, 0xffffffff
mov word [edi + eax*2], cx
test esi, esi
jne 0x1001fc5c
cmp esi, 0xea
je 0x1001fc5c
lea eax, [ebp - 0x50]
mov dword [ebp - 0x50], 0
push eax
push 0x20019
push 0
push edi
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1001fba5
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x1001f9d6
push 0x104
lea ecx, [ebp - 0x3c]
call fcn.10004430
mov edi, dword [ebp - 0x3c]
cmp dword [edi - 8], 0x104
jl 0x10020295
xor eax, eax
mov dword [edi - 0xc], 0x104
mov word [edi + 0x208], ax
call fcn.10004380
test eax, eax
je 0x1002028b
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x34], eax
push edi
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 3
call fcn.10004090
test al, al
jne 0x1001fa3c
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001fa23
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x34]
call fcn.100044d0
mov eax, dword [ebp - 0x48]
mov byte [ebp - 4], 4
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x44], eax
je 0x1001fa68
mov esi, dword [ebp - 0x34]
lea eax, [esi - 0x10]
push eax
call fcn.100041c0
mov ecx, dword [ebp - 0x38]
add eax, 0x10
add esp, 4
mov dword [ecx], eax
add dword [ebp - 0x48], 4
jmp 0x1001fa78
lea ecx, [ebp - 0x34]
push ecx
push eax
lea ecx, [ebp - 0x4c]
call fcn.1001f490
mov esi, dword [ebp - 0x34]
mov byte [ebp - 4], 2
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1001fa93
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x48]
sub eax, dword [ebp - 0x4c]
cmp eax, 4
jae 0x1001fb9c
call fcn.10004380
test eax, eax
je 0x1002028b
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x2c], eax
push str.none
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 5
call fcn.10004090
test al, al
jne 0x1001fb45
push 0
push 0
push 0xffffffffffffffff
push str.none
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edx, [eax - 1]
mov dword [ebp - 0x54], edx
test edx, edx
jle 0x1001fb3d
mov esi, dword [ebp - 0x2c]
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x1001fb13
push edx
lea ecx, [ebp - 0x2c]
call fcn.10004430
mov esi, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x54]
push edx
push esi
push 0xffffffffffffffff
push str.none
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 0x54]
cmp eax, dword [esi - 8]
jg 0x10020295
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
jmp 0x1001fb48
lea ecx, [ebp - 0x2c]
call fcn.10009fb0
mov esi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x48]
mov byte [ebp - 4], 6
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x44], eax
je 0x1001fb71
lea eax, [esi - 0x10]
push eax
call fcn.100041c0
mov ecx, dword [ebp - 0x38]
add eax, 0x10
add esp, 4
mov dword [ecx], eax
add dword [ebp - 0x48], 4
jmp 0x1001fb81
lea ecx, [ebp - 0x2c]
push ecx
push eax
lea ecx, [ebp - 0x4c]
call fcn.1001f490
mov esi, dword [ebp - 0x2c]
mov byte [ebp - 4], 2
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1001fb9c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x50]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x40]
lea edx, [edi - 0x10]
mov dword [ebp - 0x64], 0x208
cmp dword [edx + 4], 0
mov esi, dword [edx]
je 0x1001fbfb
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x1001fbdb
cmp dword [edi - 8], 0
jl 0x10020295
xor eax, eax
mov dword [edi - 0xc], 0
mov word [edi], ax
jmp 0x1001fbfb
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1001fbee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x3c], edi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x1001fc1f
push 0x104
lea ecx, [ebp - 0x3c]
call fcn.10004430
mov edi, dword [ebp - 0x3c]
cmp dword [edi - 8], 0x104
jl 0x10020295
xor eax, eax
mov dword [edi - 0xc], 0x104
push eax
push eax
push eax
push eax
mov word [edi + 0x208], ax
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebp - 0x40]
push edi
push eax
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
test esi, esi
je 0x1001f982
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x54], eax
cmp esi, eax
je 0x100201b2
nop dword [eax]
mov ecx, 0x10109d84
mov dword [ebp - 0x30], ecx
nop dword [eax + eax]
cmp byte [ecx + 9], 0
jne 0x10020183
call fcn.10004380
mov ecx, eax
test ecx, ecx
je 0x1002028b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x40], eax
push dword [esi]
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 7
push dword [ebp + 0xc]
push str._s_s
push eax
call fcn.100042c0
add esp, 0x10
call fcn.10004380
mov ecx, eax
test ecx, ecx
je 0x1002028b
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x34], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x100
or eax, ecx
mov byte [ebp - 4], 8
jge 0x1001fd10
push 0x100
lea ecx, [ebp - 0x34]
call fcn.10004430
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x30]
mov edi, dword [ebp - 0x40]
push esi
push dword [eax + 4]
push edi
push dword [ebp - 0x6c]
call fcn.1007b570
add esp, 0x10
test eax, eax
je 0x10020147
push dword [esi - 8]
push esi
call fcn.100a0806
add esp, 8
test eax, eax
js 0x10020295
cmp eax, dword [esi - 8]
jg 0x10020295
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov eax, dword [esi - 0xc]
test eax, eax
je 0x10020147
cmp eax, 4
jl 0x10020147
test eax, eax
jg 0x1001fd71
or edi, 0xffffffff
jmp 0x1001fd8b
push 0x22
push esi
call fcn.1009cf73
mov edi, eax
add esp, 8
test edi, edi
jne 0x1001fd87
or edi, 0xffffffff
jmp 0x1001fd8b
sub edi, esi
sar edi, 1
mov ecx, dword [esi - 0xc]
lea eax, [ecx - 1]
test eax, eax
js 0x1001fdb1
cmp eax, ecx
jge 0x1001fdb1
lea eax, [esi + eax*2]
push 0x22
push eax
call fcn.1009cf73
add esp, 8
test eax, eax
je 0x1001fdb1
sub eax, esi
sar eax, 1
jmp 0x1001fdb4
or eax, 0xffffffff
test edi, edi
jne 0x1001fef9
mov edx, dword [esi - 0xc]
lea edi, [edx - 1]
cmp eax, edi
jne 0x1001fef9
lea eax, [edx - 2]
xor ecx, ecx
test eax, eax
cmovns ecx, eax
cmp ecx, 0x7ffffffe
jg 0x100202a9
lea eax, [ecx + 1]
cmp eax, edx
lea eax, [esi - 0x10]
mov dword [ebp - 0x60], eax
cmovle edi, ecx
mov ecx, dword [eax]
mov dword [ebp - 0x38], edi
xor edi, edi
cmp edx, 1
cmovge edi, dword [ebp - 0x38]
mov dword [ebp - 0x38], edi
test ecx, ecx
je 0x1001fe0e
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x1001fe1c
call fcn.10004380
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
lea eax, [esi + 2]
test ecx, ecx
je 0x1002028b
test eax, eax
jne 0x1001fe33
test edi, edi
jne 0x10020295
mov eax, dword [ecx]
push 2
push edi
call dword [eax]
test eax, eax
je 0x100202a4
lea edi, [eax + 0x10]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x68], edi
test eax, eax
js 0x10020295
cmp eax, dword [edi - 8]
jg 0x10020295
mov dword [edi - 0xc], eax
xor ecx, ecx
add eax, eax
push eax
mov word [eax + edi], cx
lea ecx, [esi + 2]
push ecx
push eax
push edi
call fcn.10004850
add esp, 0x10
mov eax, dword [ebp - 0x5c]
lea ecx, [edi - 0x10]
or eax, 1
mov byte [ebp - 4], 9
mov dword [ebp - 0x5c], eax
lea eax, [esi - 0x10]
cmp ecx, eax
je 0x1001fed8
mov esi, dword [ebp - 0x60]
cmp dword [esi + 0xc], 0
jl 0x1001fec9
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x1001fec9
push ecx
call fcn.100041c0
add esp, 4
mov dword [ebp - 0x38], eax
mov ecx, ebx
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x1001fec1
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x38]
lea esi, [eax + 0x10]
mov dword [ebp - 0x34], esi
jmp 0x1001fed8
push dword [edi - 0xc]
lea ecx, [ebp - 0x34]
push edi
call fcn.100044d0
mov esi, dword [ebp - 0x34]
mov byte [ebp - 4], 8
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1001fef9
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x5c], eax
call fcn.10004380
mov ecx, eax
test ecx, ecx
je 0x1002028b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x60], eax
mov edi, dword [ebp - 0x30]
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xa
push dword [edi]
push eax
call fcn.1004be30
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xb
cmovae eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x60]
push 0x100d7b54
push eax
call fcn.100042c0
add esp, 0x14
cmp byte [edi + 8], 0
mov edi, dword [ebp - 0x60]
je 0x1001ffee
mov ecx, dword [edi - 0xc]
mov eax, edi
sub eax, esi
sar eax, 1
mov dword [ebp - 0x70], eax
mov eax, dword [esi - 0xc]
mov dword [ebp - 0x50], eax
test ecx, ecx
js 0x10020295
push ecx
push edi
call fcn.100a0806
mov edx, eax
mov ecx, 0x7fffffff
mov eax, dword [ebp - 0x50]
sub ecx, edx
add esp, 8
mov dword [ebp - 0x38], edx
cmp ecx, eax
jl 0x10020295
add edx, eax
js 0x10020295
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x1001ffb3
push edx
lea ecx, [ebp - 0x34]
call fcn.10004430
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x50]
lea edx, [esi + eax*2]
cmp eax, ecx
jbe 0x1001ffc2
mov edx, edi
mov eax, dword [ebp - 0x38]
add eax, eax
push eax
push edx
push eax
lea eax, [esi + ecx*2]
push eax
call fcn.10004850
mov eax, dword [ebp - 0x38]
add esp, 0x10
add eax, dword [ebp - 0x50]
cmp eax, dword [esi - 8]
jg 0x10020295
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test edi, edi
je 0x100200ee
cmp dword [esi - 0xc], 0
jl 0x100200ee
push edi
push esi
call fcn.1009cc75
add esp, 8
test eax, eax
je 0x100200ee
sub eax, esi
sar eax, 1
cmp eax, 4
jl 0x100200ee
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [ebp - 0x28]
test eax, eax
jne 0x1002008a
call fcn.10008bd0
mov byte [ebp - 4], 8
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1002004d
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 7
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10020068
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x40]
mov eax, ebx
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002017d
mov ecx, dword [edx]
push edx
jmp 0x10020178
mov eax, dword [ebp - 0x30]
mov byte [eax + 9], 1
call fcn.10008bd0
mov byte [ebp - 4], 8
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x100200b1
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 7
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100200cc
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x40]
mov eax, ebx
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002017d
mov ecx, dword [edx]
push edx
jmp 0x10020178
lea ecx, [ebp - 0x28]
call fcn.10008bd0
mov byte [ebp - 4], 8
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x10020111
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 7
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1002012c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x40]
mov eax, ebx
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002017d
mov ecx, dword [edx]
push edx
jmp 0x10020178
mov eax, ebx
mov byte [ebp - 4], 7
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10020162
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov byte [ebp - 4], 2
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1002017d
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
add ecx, 0x10
mov dword [ebp - 0x30], ecx
lea eax, [ecx - 4]
cmp eax, 0x10109e30
jne 0x1001fc90
add esi, 4
mov dword [ebp - 0x2c], esi
cmp esi, dword [ebp - 0x54]
jne 0x1001fc80
mov eax, dword [ebp - 0x48]
mov esi, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x3c]
mov dword [ebp - 0x54], eax
mov byte [ebp - 4], 1
test esi, esi
je 0x10020233
cmp esi, eax
je 0x100201e7
mov edi, dword [ebp - 0x54]
mov edx, dword [esi]
mov eax, ebx
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100201da
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, edi
jne 0x100201c1
mov esi, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x44]
sub eax, esi
sar eax, 2
lea ecx, [eax*4]
mov eax, esi
cmp ecx, 0x1000
jb 0x10020214
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002029f
push ecx
push esi
call fcn.100757e2
add esp, 8
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov eax, ebx
mov byte [ebp - 4], 0
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1002024e
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x1002026d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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.10075b61
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.10003f10
push 0x80070057
call fcn.10003f10
call fcn.100a0325
call fcn.10004600
push 0x80070216
call fcn.10003f10
int3