Function at 0x40a090
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x544
mov eax, dword [0x4204c4]
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x540], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 4], ecx
push ebx
xor ebx, ebx
push esi
push edi
mov byte [esp + 0x28], bl
mov ecx, 0x40
lea edi, [esp + 0x29]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x238], bl
mov ecx, 0x40
lea edi, [esp + 0x239]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x130], bl
mov ecx, 0x40
lea edi, [esp + 0x131]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov word [esp + 0x340], bx
mov ecx, 0x81
lea edi, [esp + 0x342]
rep stosd dword es:[edi], eax
lea edx, [esp + 0x28]
test edx, edx
stosw word es:[edi], ax
je 0x40a15f
mov ecx, 0xc
mov esi, str.SoftwareMicrosoftMicrosoft_SQL_Server80Tools
lea edi, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
cmp eax, str.Help
movsb byte es:[edi], byte [esi]
je 0x40a15f
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x40a144
mov ecx, dword [str.Help]
mov dx, word [0x4192e0]
mov dword [edi], ecx
mov word [edi + 4], dx
lea eax, [esp + 0x238]
test eax, eax
mov dword [esp + 0x14], 0x104
mov dword [esp + 0xc], ebx
je 0x40a1ce
lea ecx, [esp + 0xc]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x34]
push edx
push 0x80000002
mov byte [esp + 0x24c], bl
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40a1ce
mov edx, dword [esp + 0xc]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x23c]
push ecx
push ebx
push ebx
push str.HelpFile
push edx
call edi
mov esi, eax
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebx
je 0x40a1e3
xor eax, eax
mov ecx, dword [esp + 0x54c]
call fcn.0040d00b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x10]
mov edx, dword [ebp + 0x10]
lea eax, [esp + 0x130]
test eax, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x10], 0x104
mov dword [esp + 0xc], ebx
je 0x40a26d
lea ecx, [esp + 0xc]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x34]
push edx
push 0x80000002
mov byte [esp + 0x144], bl
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40a26d
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x134]
push ecx
push ebx
push ebx
push str.HelpLCID
push edx
call edi
mov esi, eax
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebx
jne 0x40a26d
lea ecx, [esp + 0x130]
push ecx
call fcn.0040e5f6
add esp, 4
jmp 0x40a273
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLCID]
push 0x104
lea edx, [esp + 0x344]
push edx
push 0xffffffffffffffff
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x244]
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
push 0xfe
lea edx, [esp + 0x348]
push edx
push eax
call fcn.0040cea5
mov ecx, dword [esp + 0x54c]
call fcn.0040d00b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret