Function at 0x40e9f0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x57146c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov ebx, 1
mov edx, dword [edi + 8]
cmp dword [edx - 0xc], 0
jne 0x40eaa0
mov eax, dword [edx - 8]
mov ecx, ebx
sub ecx, dword [edx - 4]
sub eax, 0x104
or ecx, eax
jge 0x40ea3b
push 0x104
lea ecx, [edi + 8]
call fcn.00405b70
mov edx, dword [edi + 8]
cmp dword [edx - 8], 0x104
jl 0x40edb9
mov dword [edx - 0xc], 0x104
xor ecx, ecx
mov eax, dword [edi + 8]
push 0x104
push edx
push edi
mov word [eax + 0x208], cx
mov eax, dword [edi]
call dword [eax + 0x14]
mov eax, dword [edi + 8]
test eax, eax
jne 0x40ea72
xor ecx, ecx
jmp 0x40ea88
push dword [eax - 8]
push eax
call fcn.004c2ee3
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40edb9
mov eax, dword [edi + 8]
cmp ecx, dword [eax - 8]
jg 0x40edb9
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi + 8]
mov word [eax + ecx*2], dx
mov edx, dword [edi + 0x18]
cmp dword [edx - 0xc], 0
jne 0x40eb32
mov eax, dword [edx - 8]
mov ecx, ebx
sub ecx, dword [edx - 4]
sub eax, 0x104
or ecx, eax
jge 0x40eace
push 0x104
lea ecx, [edi + 0x18]
call fcn.00405b70
mov edx, dword [edi + 0x18]
cmp dword [edx - 8], 0x104
jl 0x40edb9
mov dword [edx - 0xc], 0x104
xor ecx, ecx
mov eax, dword [edi + 0x18]
push 0x104
push edx
mov word [eax + 0x208], cx
call fcn.00479880
mov eax, dword [edi + 0x18]
test eax, eax
jne 0x40eb04
xor ecx, ecx
jmp 0x40eb1a
push dword [eax - 8]
push eax
call fcn.004c2ee3
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40edb9
mov eax, dword [edi + 0x18]
cmp ecx, dword [eax - 8]
jg 0x40edb9
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi + 0x18]
mov word [eax + ecx*2], dx
mov eax, dword [edi + 4]
cmp dword [eax - 0xc], 0
jne 0x40ec18
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004a7120
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x52ee4c
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [edi + 4]
mov ecx, ebx
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, 0x104
or ecx, eax
jge 0x40ebac
push 0x104
lea ecx, [edi + 4]
call fcn.00405b70
mov edx, dword [edi + 4]
cmp dword [edx - 8], 0x104
jl 0x40edb9
mov dword [edx - 0xc], 0x104
xor ecx, ecx
mov eax, dword [edi + 4]
push 0x104
push edx
mov word [eax + 0x208], cx
lea ecx, [ebp - 0x20c]
mov eax, dword [edi]
push ecx
push edi
call dword [eax + 4]
mov eax, dword [edi + 4]
test eax, eax
jne 0x40ebea
xor ecx, ecx
jmp 0x40ec00
push dword [eax - 8]
push eax
call fcn.004c2ee3
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40edb9
mov eax, dword [edi + 4]
cmp ecx, dword [eax - 8]
jg 0x40edb9
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi + 4]
mov word [eax + ecx*2], dx
mov edx, dword [edi + 0x10]
cmp dword [edx - 0xc], 0
jne 0x40ecd3
mov dword [ebp - 0x210], 0x104
mov ecx, ebx
mov dword [ebp - 0x214], ebx
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, 0x104
or ecx, eax
jge 0x40ec56
push 0x104
lea ecx, [edi + 0x10]
call fcn.00405b70
mov edx, dword [edi + 0x10]
cmp dword [edx - 8], 0x104
jl 0x40edb9
mov dword [edx - 0xc], 0x104
xor ecx, ecx
mov eax, dword [edi + 0x10]
mov word [eax + 0x208], cx
lea eax, [ebp - 0x210]
push eax
push edx
lea eax, [ebp - 0x214]
push eax
push 0x52ee68
push str.SOFTWAREHaloDeskPets
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x40eca5
xor ecx, ecx
jmp 0x40ecbb
push dword [eax - 8]
push eax
call fcn.004c2ee3
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40edb9
mov eax, dword [edi + 0x10]
cmp ecx, dword [eax - 8]
jg 0x40edb9
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi + 0x10]
mov word [eax + ecx*2], dx
mov eax, dword [edi + 0x14]
cmp dword [eax - 0xc], 0
jne 0x40ed90
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004a7120
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, dword [edi + 0x14]
mov eax, dword [ecx - 8]
sub ebx, dword [ecx - 4]
sub eax, 0x104
or ebx, eax
jge 0x40ed2c
push 0x104
lea ecx, [edi + 0x14]
call fcn.00405b70
mov ecx, dword [edi + 0x14]
cmp dword [ecx - 8], 0x104
jl 0x40edb9
mov dword [ecx - 0xc], 0x104
xor edx, edx
mov eax, dword [edi + 0x14]
push 0x104
push ecx
lea ecx, [ebp - 0x20c]
mov word [eax + 0x208], dx
mov eax, dword [edi]
push ecx
push edi
call dword [eax + 4]
mov eax, dword [edi + 0x14]
test eax, eax
jne 0x40ed6a
xor ecx, ecx
jmp 0x40ed7c
push dword [eax - 8]
push eax
call fcn.004c2ee3
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40edb9
mov eax, dword [edi + 0x14]
cmp ecx, dword [eax - 8]
jg 0x40edb9
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi + 0x14]
mov word [eax + ecx*2], dx
mov eax, dword [edi + 0x1c]
lea ecx, [edi + 0x1c]
pop edi
pop esi
pop ebx
cmp dword [eax - 0xc], 0
jne 0x40edab
push 8
push str.HaloPets
call fcn.00405fa0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00477d68
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00404b90
int3