Function at 0x405818
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push 0x419698
call fcn.00403cd9
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
xor ebx, ebx
pop ecx
mov dword [esi], ebx
mov dword [eax], ebx
lea eax, [ebp - 0xc]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push eax
push 0x20019
push ebx
push 0x419660
push dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
call edi
push eax
push 0x419648
mov dword [ebp + 0x10], eax
call fcn.00403cd9
cmp dword [ebp + 0x10], ebx
pop ecx
pop ecx
jne 0x4059a5
lea eax, [ebp - 4]
mov dword [ebp - 4], 4
push eax
lea eax, [ebp - 0x14]
push dword [ebp + 0x18]
push eax
push ebx
push 0x419638
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [ebp + 0x18]
mov dword [ebp + 0x10], eax
push dword [ecx]
push eax
push 0x419600
call fcn.00403cd9
add esp, 0xc
cmp dword [ebp + 0x10], ebx
jne 0x4059a5
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push 0x4195f8
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x18]
mov dword [ebp + 0x10], eax
push eax
push 0x4195cc
call fcn.00403cd9
add esp, 0xc
cmp dword [ebp + 0x10], ebx
je 0x40591b
lea eax, [ebp - 0x10]
mov dword [ebp - 8], 0x4195c0
push eax
push 0x20019
push ebx
push 0x419584
push dword [ebp + 8]
call edi
push eax
push 0x419648
mov dword [ebp + 0x10], eax
call fcn.00403cd9
cmp dword [ebp + 0x10], ebx
pop ecx
pop ecx
jne 0x4059a5
jmp 0x405928
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], 0x419578
mov dword [ebp - 0x10], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x14]
push ebx
push eax
push ebx
push dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x14]
mov dword [ebp + 0x10], eax
push eax
push dword [ebp - 8]
push 0x419550
call fcn.00403cd9
add esp, 0x10
cmp dword [ebp + 0x10], ebx
jne 0x4059a5
push dword [ebp - 4]
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push ebx
call edi
cmp eax, ebx
mov dword [esi], eax
je 0x405993
push esi
push 0x419540
call fcn.00403cd9
mov eax, dword [ebp + 0x18]
pop ecx
pop ecx
mov eax, dword [eax]
lea eax, [eax*4 + 4]
push eax
push 0x40
call edi
mov ecx, dword [ebp + 0x14]
cmp eax, ebx
mov dword [ecx], eax
jne 0x405a02
push 0x419528
mov dword [ebp + 0x10], 8
call fcn.00403cd9
pop ecx
push 0x419520
call fcn.00403cd9
cmp dword [ebp + 0x10], ebx
pop ecx
je 0x4059d0
mov esi, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
cmp esi, ebx
je 0x4059c4
push esi
call edi
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
cmp eax, ebx
je 0x4059d0
push eax
call edi
cmp dword [ebp - 0xc], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x4059e0
push dword [ebp - 0xc]
call esi
mov eax, dword [ebp - 0x10]
cmp eax, ebx
je 0x4059ef
cmp eax, dword [ebp + 0xc]
je 0x4059ef
push eax
call esi
push 0x41950c
call fcn.00403cd9
mov eax, dword [ebp + 0x10]
pop ecx
pop edi
pop esi
pop ebx
leave
ret
push ecx
push 0x419500
call fcn.00403cd9
pop ecx
lea eax, [ebp - 4]
pop ecx
push eax
lea eax, [ebp - 0x14]
push dword [esi]
push eax
push ebx
push dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [esi]
mov dword [ebp + 0x10], eax
push eax
push dword [ebp - 8]
push 0x4194d4
call fcn.00403cd9
add esp, 0x10
cmp dword [ebp + 0x10], ebx
jne 0x4059a5
mov edi, dword [esi]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x4059a5
push edi
call fcn.0040d292
push eax
push 0x4194c8
mov dword [ebp + 8], eax
call fcn.00403cd9
mov eax, dword [ebp - 8]
lea edi, [edi + eax + 1]
mov eax, dword [ebp + 0x18]
push dword [eax]
push dword [ebp + 8]
push 0x4194ac
call fcn.00403cd9
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp + 8]
add esp, 0x18
cmp eax, dword [ecx]
ja 0x405aab
push edi
push 0x4194a0
call fcn.00403cd9
mov eax, dword [ebp + 0x14]
pop ecx
pop ecx
mov eax, dword [eax]
mov ecx, dword [ebp + 8]
mov dword [eax + ecx*4], edi
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [edi + eax + 1]
jmp 0x405a47