Function at 0x658140
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x644
push ebx
xor ebx, ebx
push esi
push edi
mov edi, ecx
cmp edi, ebx
mov eax, 0x104
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], ebx
je 0x6584f5
cmp edx, 0xa
jl 0x6584f5
mov ecx, edx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, 0x64
lea ecx, [esp + 0x1e0]
call fcn.006505c0
mov edx, 0x64
lea ecx, [esp + 0x110]
call fcn.006508c0
mov edx, 0x64
lea ecx, [esp + 0x178]
call fcn.00650ae0
mov edx, 0x64
lea ecx, [esp + 0x40]
call fcn.006509d0
mov edx, 0x64
lea ecx, [esp + 0xa8]
call fcn.00650bb0
lea eax, [esp + 0x1c]
push eax
push 0x20019
push ebx
lea ecx, [esp + 0x1ec]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x6584e7
cmp dword [esp + 0x1c], ebx
je 0x6584e7
jmp 0x658230
mov edx, dword [esp + 0x24]
cmp edx, 0xff
jae 0x6584c1
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x248]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x38]
push eax
push ebx
push ebx
push ebx
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x25c]
push eax
push edx
push ecx
mov dword [esp + 0x34], 0x105
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ecx, dword [esp + 0x24]
mov esi, eax
inc ecx
cmp esi, 0x103
mov dword [esp + 0x24], ecx
je 0x6584c1
cmp esi, ebx
jne 0x6584b5
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x658230
cmp eax, 0x106
jb 0x6582b1
mov dword [esp + 0x14], 0x105
cmp dword [ebp + 8], 1
jne 0x65846a
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0xc]
push edx
push 0x20019
push ebx
lea eax, [esp + 0x254]
push eax
push ecx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x658230
mov edx, dword [esp + 0xc]
cmp edx, ebx
je 0x658230
mov ecx, 0x41
lea edi, [esp + 0x548]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x38]
push eax
push ebx
push ebx
push ebx
lea ecx, [esp + 0x40]
push ecx
lea eax, [esp + 0x55c]
push eax
push ebx
push edx
mov dword [esp + 0x50], 0x105
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ecx, dword [esp + 0xc]
mov esi, eax
cmp esi, ebx
je 0x658340
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x6584b5
lea edx, [esp + 0x18]
push edx
push 0x20019
push ebx
lea eax, [esp + 0x554]
push eax
push ecx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x6584d7
mov edx, dword [esp + 0x18]
cmp edx, ebx
je 0x6584d7
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, 0x7d
lea edi, [esp + 0x350]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x354]
push ecx
lea eax, [esp + 0x18]
push eax
push ebx
lea ecx, [esp + 0x120]
push ecx
push edx
mov dword [esp + 0x38], 0x1f3
mov dword [esp + 0x28], ebx
call esi
test eax, eax
jne 0x6583de
mov eax, dword [esp + 0x10]
mov edi, 1
cmp eax, edi
jne 0x6583de
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x354]
push eax
call fcn.00697d4d
add esp, 8
test eax, eax
jne 0x6583de
mov dword [esp + 0x28], edi
xor eax, eax
mov ecx, 0x7d
lea edi, [esp + 0x350]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x354]
push edx
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x18]
push eax
push ebx
lea ecx, [esp + 0x188]
push ecx
push edx
mov dword [esp + 0x38], 0x1f3
mov dword [esp + 0x28], ebx
call esi
mov esi, eax
cmp esi, ebx
jne 0x65844f
mov eax, dword [esp + 0x10]
mov edi, 1
cmp eax, edi
jne 0x65844f
lea eax, [esp + 0xa8]
push eax
lea ecx, [esp + 0x354]
push ecx
call fcn.00697d4d
add esp, 8
test eax, eax
jne 0x65844f
mov dword [esp + 0x28], edi
mov edx, dword [esp + 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call edi
mov eax, dword [esp + 0xc]
push eax
call edi
cmp dword [esp + 0x28], 1
jne 0x6584b5
lea edx, [esp + 0x14]
lea ecx, [esp + 0x248]
call fcn.00657610
mov edx, dword [esp + 0x14]
cmp edx, ebx
jbe 0x6584b5
mov eax, dword [esp + 0x2c]
xor ecx, ecx
cmp eax, ebx
jle 0x6584b5
mov eax, dword [esp + 0x34]
lea edi, [esp + 0x248]
sub edi, eax
lea esp, [esp]
cmp ecx, edx
jge 0x6584b3
mov bl, byte [edi + eax]
add byte [eax], bl
mov ebx, dword [esp + 0x2c]
inc ecx
inc eax
cmp ecx, ebx
jl 0x6584a0
xor ebx, ebx
cmp esi, 0x103
jne 0x658230
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x658230
mov eax, 0x338
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
mov eax, 0x325
pop ebx
mov esp, ebp
pop ebp
ret 4