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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47b6e2
mov eax, dword fs:[0]
push eax
sub esp, 0x844
mov eax, dword [0x4a0144]
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]
mov esi, 0x4c8368
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x824], ebx
mov dword [ebp - 0x838], ecx
mov dword [ebp - 0x81c], esi
mov dword [ebp - 0x844], 0
mov eax, dword [esi + 0xc]
test dword [ecx], eax
jne 0x4104fa
xor eax, eax
mov dword [ebp - 0x830], eax
call fcn.00409570
mov ecx, eax
test ecx, ecx
je 0x41053b
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x820], edi
mov dword [ebp - 0x82c], 0x104
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
mov dword [ebp - 4], 0
jge 0x40ffa0
push 0x104
lea ecx, [ebp - 0x820]
call fcn.0040d750
mov edi, dword [ebp - 0x820]
cmp dword [edi - 8], 0x104
jl 0x410545
xor eax, eax
mov dword [edi - 0xc], 0x104
push eax
push eax
push eax
push eax
mov word [edi + 0x208], ax
lea eax, [ebp - 0x82c]
push eax
push edi
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
push dword [edi - 8]
mov ebx, eax
push edi
call fcn.004619e7
add esp, 8
test eax, eax
js 0x410545
cmp eax, dword [edi - 8]
jg 0x410545
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
test ebx, ebx
jne 0x4104c9
cmp ebx, 0xea
je 0x4104c9
lea eax, [ebp - 0x828]
mov dword [ebp - 0x828], 0
push eax
push 0x20019
push 0
push edi
push dword [ebp - 0x824]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x410476
push 0x800
push eax
lea eax, [ebp - 0x810]
push eax
call fcn.00452600
add esp, 0xc
mov dword [ebp - 0x84c], 1
lea eax, [ebp - 0x848]
mov dword [ebp - 0x848], 0x200000
push eax
lea eax, [ebp - 0x810]
push eax
lea eax, [ebp - 0x84c]
push eax
push 0
push dword [esi + 4]
push dword [ebp - 0x828]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
cmp dword [esi + 8], 0
je 0x4100ac
push dword [esi]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebp - 0x828]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov ebx, eax
mov dword [ebp - 0x840], ebx
call fcn.00409570
test eax, eax
je 0x41053b
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x818], esi
mov byte [ebp - 4], 1
test ebx, ebx
je 0x4101eb
test ebx, 0xffff0000
jne 0x410112
movzx eax, bx
lea ecx, [ebp - 0x818]
push eax
call fcn.00409720
jmp 0x4101f6
lea ecx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x410115
sub ebx, ecx
sar ebx, 1
je 0x4101eb
mov edx, dword [ebp - 0x840]
mov eax, dword [esi - 0xc]
sub edx, esi
sar edx, 1
mov dword [ebp - 0x83c], eax
mov dword [ebp - 0x850], edx
test ebx, ebx
js 0x410545
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x410174
push ebx
lea ecx, [ebp - 0x818]
call fcn.0040d750
mov esi, dword [ebp - 0x818]
mov edx, dword [ebp - 0x850]
cmp edx, dword [ebp - 0x83c]
ja 0x4101c4
mov eax, dword [esi - 8]
lea ecx, [ebx + ebx]
lea edx, [esi + edx*2]
test ecx, ecx
je 0x4101d7
test edx, edx
jne 0x41019f
call fcn.00456202
mov dword [eax], 0x16
call fcn.00456129
jmp 0x4101d7
add eax, eax
cmp eax, ecx
jae 0x4101b7
call fcn.00456202
mov dword [eax], 0x22
call fcn.00456129
jmp 0x4101d7
push ecx
push edx
push esi
call fcn.00452d10
add esp, 0xc
jmp 0x4101d7
push ebx
push dword [ebp - 0x840]
push dword [esi - 8]
push esi
call fcn.0040f9e0
add esp, 0x10
cmp ebx, dword [esi - 8]
jg 0x410545
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
jmp 0x4101fc
lea ecx, [ebp - 0x818]
call fcn.00409330
mov esi, dword [ebp - 0x818]
mov byte [ebp - 4], 2
call fcn.00409570
mov ecx, eax
test ecx, ecx
je 0x41053b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x814], eax
mov edx, 0x481240
mov byte [ebp - 4], 3
test edx, 0xffff0000
jne 0x410242
movzx eax, dx
lea ecx, [ebp - 0x814]
push eax
call fcn.00409720
jmp 0x4102f7
mov ecx, dword [eax - 0xc]
mov ebx, edx
mov dword [ebp - 0x83c], ecx
sub ebx, eax
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, 0x24
sar ebx, 1
or ecx, edx
jge 0x410276
push 0x24
lea ecx, [ebp - 0x814]
call fcn.0040d750
mov eax, dword [ebp - 0x814]
cmp ebx, dword [ebp - 0x83c]
ja 0x4102c1
mov ecx, dword [eax - 8]
lea edx, [eax + ebx*2]
test edx, edx
jne 0x41029a
call fcn.00456202
mov dword [eax], 0x16
call fcn.00456129
jmp 0x4102d4
add ecx, ecx
cmp ecx, 0x48
jae 0x4102b3
call fcn.00456202
mov dword [eax], 0x22
call fcn.00456129
jmp 0x4102d4
push 0x48
push edx
push eax
call fcn.00452d10
add esp, 0xc
jmp 0x4102d4
push 0x24
push 0x481240
push dword [eax - 8]
push eax
call fcn.0040f9e0
add esp, 0x10
mov eax, dword [ebp - 0x814]
cmp dword [eax - 8], 0x24
jl 0x410545
mov dword [eax - 0xc], 0x24
xor ecx, ecx
mov eax, dword [ebp - 0x814]
mov word [eax + 0x48], cx
mov ebx, dword [ebp - 0x81c]
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x834]
mov byte [ebp - 4], 4
push ebx
push eax
call fcn.0042ab20
add esp, 0xc
mov edx, dword [ebp - 0x814]
or eax, 0xffffffff
mov byte [ebp - 4], 6
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41033a
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]
test eax, eax
je 0x41036a
test esi, esi
je 0x41053b
push esi
push dword [ebp - 0x834]
call fcn.004615eb
add esp, 8
test eax, eax
je 0x410480
inc dword [ebp - 0x830]
lea edx, [edi - 0x10]
mov dword [ebp - 0x82c], 0x104
cmp dword [edx + 4], 0
mov ebx, dword [edx]
je 0x4103ca
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x4103a6
cmp dword [edi - 8], 0
jl 0x410545
xor eax, eax
mov dword [edi - 0xc], 0
mov word [edi], ax
jmp 0x4103ca
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4103ba
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 edi, [eax + 0x10]
mov dword [ebp - 0x820], edi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x4103f4
push 0x104
lea ecx, [ebp - 0x820]
call fcn.0040d750
mov edi, dword [ebp - 0x820]
cmp dword [edi - 8], 0x104
jl 0x410545
xor eax, eax
mov dword [edi - 0xc], 0x104
push eax
push eax
push eax
push eax
mov word [edi + 0x208], ax
lea eax, [ebp - 0x82c]
push eax
mov eax, dword [ebp - 0x830]
push edi
push eax
push dword [ebp - 0x824]
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 0x410454
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x410470
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x81c]
test ebx, ebx
je 0x410002
jmp 0x4104c9
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 0x4104ad
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4104c9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4104e8
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x838]
mov ebx, dword [ebp - 0x824]
mov esi, dword [ebp - 0x81c]
mov eax, dword [ebp - 0x844]
add esi, 0x10
add eax, 0x10
mov dword [ebp - 0x81c], esi
mov dword [ebp - 0x844], eax
cmp eax, 0xb0
jb 0x40ff35
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.00429abf
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.00403510
push 0x80070057
call fcn.00403510
int3