Function at 0x405850
Capabilities:
Query or enumerate registry key

Disassembly:
push 0xffffffffffffffff
push 0x40cfd8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esp + 0x10], esi
mov eax, dword [esi + 8]
mov dword [esp + 0x18], ebx
cmp eax, ebx
jne 0x4058c3
mov esi, dword [esp + 0x44]
mov al, byte [esp + 0x44]
mov edi, 0x412ac0
or ecx, 0xffffffff
mov byte [esi], al
xor eax, eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x412ac0
mov ecx, esi
call fcn.00402340
mov eax, esi
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x34
ret 0xc
mov cl, byte [esp + 0x44]
push ebp
mov byte [esp + 0x28], cl
push ebx
lea ecx, [esp + 0x2c]
call fcn.00402160
mov edi, 0x412ac0
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x2c]
push ebp
call fcn.00402520
test al, al
je 0x405921
mov edi, dword [esp + 0x2c]
mov ecx, ebp
mov edx, ecx
mov esi, 0x412ac0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x14]
mov dword [esp + 0x30], ebp
mov byte [ebp + eax], 0
push 0x100
mov dword [esp + 0x44], ebx
call fcn.00407000
add esp, 4
mov ebp, eax
mov dword [esp + 0x14], ebp
push 0x100
call fcn.00407000
add esp, 4
mov edi, eax
lea ecx, [esp + 0x20]
mov eax, 0x100
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
push edx
mov edx, dword [esi + 4]
push edi
lea eax, [esp + 0x28]
push ebx
push eax
push ebp
push ecx
push edx
mov dword [esp + 0x30], edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x405a0d
mov ebx, dword [esp + 0x50]
test ebx, ebx
je 0x4059c7
or ecx, 0xffffffff
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, ebx
push ebp
call fcn.00402520
test al, al
je 0x4059c3
mov esi, dword [esp + 0x10]
mov edi, dword [ebx + 4]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov dword [ebx + 8], ebp
mov byte [ebp + ecx], 0
mov ebp, dword [esp + 0x14]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x2c]
push ebx
call fcn.00402520
test al, al
je 0x405a07
mov edi, dword [esp + 0x2c]
mov ecx, ebx
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], ebx
mov byte [ebx + eax], 0
mov edi, dword [esp + 0x10]
xor ebx, ebx
push ebp
call fcn.00405ea0
add esp, 4
push edi
call fcn.00405ea0
mov esi, dword [esp + 0x4c]
mov cl, byte [esp + 0x2c]
add esp, 4
lea eax, [esp + 0x28]
mov byte [esi], cl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov edx, dword [0x40e0f8]
mov ecx, esi
push edx
push ebx
push eax
call fcn.00401e40
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x405a6b
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x405a62
cmp al, 0xff
je 0x405a62
dec al
mov byte [ecx], al
jmp 0x405a6b
push ecx
call fcn.00405ea0
add esp, 4
mov ecx, dword [esp + 0x38]
pop ebp
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x34
ret 0xc