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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x415284]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
lea eax, [ebp - 0xc]
push eax
push 0x20019
xor esi, esi
push esi
push edi
push ecx
mov dword [ebp - 0xc], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40468a
xor al, al
lea esp, [ebp - 0x44]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d786
mov esp, ebp
pop ebp
ret
push esi
push esi
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 0xc]
push esi
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x14]
push eax
push esi
push esi
push esi
push ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x1c], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x404674
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x28]
cmp eax, ecx
mov dword [ebp - 0x10], eax
ja 0x4046d1
mov dword [ebp - 0x10], ecx
mov esi, dword [ebp + 8]
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4046e0
sub eax, edx
mov edx, eax
mov eax, edi
lea edi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4046f2
sub eax, edi
lea eax, [eax + edx + 0xa]
call fcn.0040d840
mov ebx, esp
mov edx, ebx
mov dword [ebp - 0x38], ebx
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x404711
mov edi, ebx
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x404722
mov dx, word [0x4110d4]
mov eax, dword [ebp + 0x10]
mov word [edi], dx
mov esi, eax
jmp 0x404740
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404740
mov edi, ebx
sub eax, esi
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x404750
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x14]
push edi
mov esi, 0x411480
call fcn.004043a0
push edi
mov esi, ebx
call fcn.004043a0
push edi
mov esi, 0x41147c
call fcn.004043a0
mov eax, dword [ebp - 0x10]
add esp, 0xc
lea eax, [eax + eax + 0xa]
call fcn.0040d840
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax + 0xa]
mov esi, esp
call fcn.0040d840
cmp dword [ebp - 0x18], 0
mov ebx, esp
mov byte [ebp - 5], 1
mov dword [ebp - 0x24], 0
jbe 0x40481e
cmp byte [ebp - 5], 0
je 0x40481e
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
add eax, 1
lea edx, [ebp - 0x34]
push edx
mov edx, dword [ebp - 0x24]
push ebx
mov dword [ebp - 0x20], eax
add ecx, 1
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0xc]
push 0
mov dword [ebp - 0x34], ecx
lea ecx, [ebp - 0x20]
push ecx
push esi
push edx
push eax
mov dword [ebp - 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x404810
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x2c]
push ecx
push ebx
push edx
mov ecx, esi
call fcn.00404410
add esp, 0xc
mov byte [ebp - 5], al
mov eax, dword [ebp - 0x24]
add eax, 1
cmp eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
jb 0x4047b9
xor ebx, ebx
cmp dword [ebp - 0x14], ebx
jbe 0x40486d
cmp byte [ebp - 5], 0
je 0x40486d
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x20]
push ecx
push esi
push ebx
add eax, 1
push edx
mov dword [ebp - 0x20], eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x404865
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x38]
push edi
push esi
push eax
push ecx
call fcn.00404640
add esp, 0x10
mov byte [ebp - 5], al
add ebx, 1
cmp ebx, dword [ebp - 0x14]
jb 0x404825
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [ebp - 5]
lea esp, [ebp - 0x44]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d786
mov esp, ebp
pop ebp
ret