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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c4
push ebx
xor ebx, ebx
cmp ecx, ebx
push esi
push edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], 0x104
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], ebx
je 0x657c14
cmp edx, ebx
je 0x657c14
cmp dword [ebp + 8], 0xa
jl 0x657c14
mov edx, 0x64
lea ecx, [esp + 0x30]
call fcn.00651230
mov edx, 0x64
lea ecx, [esp + 0x168]
call fcn.00651580
mov edx, 0x64
lea ecx, [esp + 0x100]
call fcn.00651a50
mov edx, 0x64
lea ecx, [esp + 0x98]
call fcn.00651760
lea esp, [esp]
mov edx, dword [esp + 0x1c]
cmp edx, 0xff
jae 0x657c09
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x1d0]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x28]
push eax
push ebx
push ebx
push ebx
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x1e4]
push eax
push edx
push ecx
mov dword [esp + 0x38], 0x105
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ecx, dword [esp + 0x1c]
mov esi, eax
inc ecx
cmp esi, 0x103
mov dword [esp + 0x1c], ecx
je 0x657c09
cmp esi, ebx
jne 0x657bfd
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x6579d0
cmp eax, 0x106
jb 0x657a51
mov dword [esp + 0x18], 0x105
lea eax, [esp + 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x657a58
sub eax, edx
push eax
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x1d8]
push eax
call fcn.00698fb7
add esp, 0xc
test eax, eax
jne 0x6579d0
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x1dc]
push edx
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x6579d0
mov edx, dword [esp + 0x10]
cmp edx, ebx
je 0x6579d0
mov ecx, 0x7d
lea edi, [esp + 0x2d8]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
push ecx
lea eax, [esp + 0x2dc]
push eax
lea ecx, [esp + 0x1c]
push ecx
push ebx
lea eax, [esp + 0x178]
push eax
push edx
mov dword [esp + 0x24], 0x1f3
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
cmp esi, ebx
jne 0x657bf2
cmp dword [esp + 0x14], 1
jne 0x657bf2
lea ecx, [esp + 0x98]
push ecx
lea edx, [esp + 0x2dc]
push edx
call fcn.00697d4d
add esp, 8
test eax, eax
jne 0x657bf2
mov ecx, 0x7d
lea edi, [esp + 0x2d8]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x2dc]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
push ebx
lea eax, [esp + 0x110]
push eax
push ecx
mov dword [esp + 0x24], 0x1f3
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x10]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebx
jne 0x657bfd
cmp dword [esp + 0x14], 1
jne 0x6579d0
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x6579d0
cmp eax, 0x1f4
jb 0x657ba1
mov dword [esp + 0xc], 0x1f3
lea edx, [esp + 0xc]
lea ecx, [esp + 0x2d8]
call fcn.00657610
mov edi, dword [esp + 0xc]
cmp edi, ebx
jbe 0x6579d0
mov eax, dword [ebp + 8]
xor ecx, ecx
cmp eax, ebx
jle 0x6579d0
mov eax, dword [esp + 0x24]
lea esi, [esp + 0x2d8]
sub esi, eax
cmp ecx, edi
jge 0x6579d0
mov dl, byte [esi + eax]
add byte [eax], dl
mov edx, dword [ebp + 8]
inc ecx
inc eax
cmp ecx, edx
jl 0x657bd7
jmp 0x6579d0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, 0x103
jne 0x6579d0
xor eax, eax
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