Function at 0x4dcbc0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
lea eax, [ebp - 0x28]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftMicrosoft_SQL_ServerInstance_NamesSQL
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4dcbe8
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
push esi
push edi
push 0x208
call fcn.004e4629
push 0x208
mov ebx, eax
call fcn.004e4629
mov esi, 0x104
push 0x208
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x2c], 0
call fcn.004e4629
mov edi, eax
push 0x208
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x24], esi
call fcn.004e4629
mov esi, eax
push 0x208
mov dword [ebp - 0x14], esi
call fcn.004e4629
add esp, 0x14
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], 0
jmp 0x4dcc50
lea ecx, [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x18]
push edi
lea edx, [ebp - 0x2c]
push edx
mov edx, dword [ebp - 0xc]
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x28]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x4dd003
push 0x208
push eax
push ebx
call fcn.004e7d90
push 7
push str.MSSQL.1
push edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0x104
call fcn.004e4207
add esp, 0x18
test eax, eax
jne 0x4dccc4
mov eax, str.Microsoft_SQL_Server_2005
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4dccb0
jmp 0x4dcdb2
push 8
push str.MSSQL10.
push edi
call fcn.004e4207
add esp, 0xc
test eax, eax
jne 0x4dccf5
mov eax, str.Microsoft_SQL_Server_2008
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4dcce1
jmp 0x4dcdb2
push 0xb
push str.MSSQL10_50.
push edi
call fcn.004e4207
add esp, 0xc
test eax, eax
jne 0x4dcd26
mov eax, str.Microsoft_SQL_Server_2008R2
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4dcd12
jmp 0x4dcdb2
push 8
push str.MSSQL11.
push edi
call fcn.004e4207
add esp, 0xc
test eax, eax
jne 0x4dcd54
mov eax, str.Microsoft_SQL_Server_2012
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4dcd43
jmp 0x4dcdb2
push 8
push str.MSSQL12.
push edi
call fcn.004e4207
add esp, 0xc
test eax, eax
jne 0x4dcd82
mov eax, str.Microsoft_SQL_Server_2014
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4dcd71
jmp 0x4dcdb2
push 8
push str.MSSQL13.
push edi
call fcn.004e4207
add esp, 0xc
test eax, eax
jne 0x4dcc50
mov eax, str.Microsoft_SQL_Server_2016
mov edx, ebx
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4dcda3
push edi
push str.SOFTWAREMicrosoftMicrosoft_SQL_Server_sSetup
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 4]
push ecx
push 1
push 0
push esi
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4dce59
mov esi, dword [ebp - 8]
mov ecx, dword [ebp - 4]
lea edx, [ebp - 0x1c]
push edx
push esi
lea eax, [ebp - 0x30]
push eax
push 0
push str.Edition
push ecx
mov dword [ebp - 0x30], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, esi
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x4dce10
sub eax, ecx
lea edi, [ebx - 2]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4dce20
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]
lea edi, [ebx - 2]
lea ecx, [ecx]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4dce40
mov eax, dword [0x51d454]
mov esi, dword [ebp - 0x14]
mov dword [edi], eax
mov edi, dword [ebp - 0x10]
push edi
push str.SOFTWAREMicrosoftMicrosoft_SQL_Server_sMSSQLServerCurrentVersion
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 4]
push ecx
push 1
push 0
push esi
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4dcf00
mov esi, dword [ebp - 8]
mov ecx, dword [ebp - 4]
lea edx, [ebp - 0x1c]
push edx
push esi
lea eax, [ebp - 0x30]
push eax
push 0
push str.CurrentVersion
push ecx
mov dword [ebp - 0x30], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edi, [ebx - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4dceb6
mov eax, dword [0x51d454]
mov dword [edi], eax
mov eax, esi
mov edx, esi
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4dced0
sub eax, edx
lea edi, [ebx - 2]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4dcee0
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 - 0x10]
mov esi, dword [ebp - 0x14]
lea eax, [ebx - 2]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4dcf03
mov ecx, dword [0x526530]
mov dword [eax], ecx
mov dx, word [0x526534]
push 0x208
mov word [eax + 4], dx
mov eax, dword [ebp - 8]
push 0
push eax
call fcn.004e7d90
push 0x208
push 0
push esi
call fcn.004e7d90
mov ecx, dword [ebp - 0x18]
push 0x208
push 0
push ecx
call fcn.004e7d90
push 0x208
push 0
push edi
call fcn.004e7d90
mov eax, 0x104
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
add esp, 0x30
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4dcf70
sub eax, edx
sar eax, 1
mov eax, ebx
jne 0x4dcfa1
mov edx, dword [ebp + 8]
sub edx, ebx
jmp 0x4dcf90
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4dcf90
jmp 0x4dcfd8
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4dcfa3
mov edi, dword [ebp + 8]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4dcfb6
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4dcfe0
mov ecx, dword [ebp + 8]
sub eax, edx
sar eax, 1
inc dword [ebp - 0xc]
mov edx, 1
mov word [ecx + eax*2], dx
jmp 0x4dcc50
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 8]
push eax
call fcn.004e41ab
push esi
call fcn.004e41ab
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.004e41ab
push edi
call fcn.004e41ab
add esp, 0x10
xor eax, eax
cmp dword [ebp - 0xc], eax
pop edi
pop esi
setg al
pop ebx
mov esp, ebp
pop ebp
ret