Function at 0x417a30
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x520
mov dword [ebp - 0x14], 0x130
mov byte [ebp - 0x144], 0
mov dword [0x424670], 0
call fcn.004180d0
cmp dword [0x424bb8], 0
je 0x417b09
mov dword [ebp - 0xc], 1
jmp 0x417a75
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xb
jae 0x417b04
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx*4 + 0x421188]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [ebp - 0xc]
mov dword [ecx*4 + 0x424670], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0xc]
cmp dword [edx*4 + 0x424670], 0
jne 0x417aff
mov eax, dword [ebp - 8]
push eax
push str.Could_not_be_loaded__NT_Error__d
lea ecx, [ebp - 0x318]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x183
push 0x423334
lea edx, [ebp - 0x318]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax*4 + 0x421188]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx*4 + 0x424670]
push eax
call fcn.0041800c
add esp, 0x14
xor eax, eax
jmp 0x417efb
jmp 0x417a6c
jmp 0x417cd7
mov ecx, dword [ebp - 0x14]
push ecx
lea edx, [ebp - 0x144]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x417b85
push 0x5c
lea ecx, [ebp - 0x144]
push ecx
call sub.MSVCRT.dll__mbsrchr
add esp, 8
mov dword [ebp - 0x31c], eax
cmp dword [ebp - 0x31c], 0
je 0x417b4c
mov edx, dword [ebp - 0x31c]
mov byte [edx + 1], 0
mov eax, dword [str.SQLSTR.DLL]
push eax
lea ecx, [ebp - 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 8
push 0
lea edx, [ebp - 0x144]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov dword [0x424670], eax
cmp dword [0x424670], 0
jne 0x417b85
mov byte [ebp - 0x144], 0
cmp dword [0x424670], 0
jne 0x417cd7
lea eax, [ebp - 0x218]
push eax
push str.SOFTWAREMicrosoftMSSQLServer_70Setup
push reloc.ODBC32.dll_SQLAllocEnv
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x417be2
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x144]
push edx
lea eax, [ebp - 0x210]
push eax
push 0
push 0x423370
mov ecx, dword [ebp - 0x218]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [ebp - 0x218]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x417c39
lea eax, [ebp - 0x218]
push eax
push str.SOFTWAREMicrosoftMSSQLServerSetup
push reloc.ODBC32.dll_SQLAllocEnv
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x417c32
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x144]
push edx
lea eax, [ebp - 0x210]
push eax
push 0
push str.SQLPath
mov ecx, dword [ebp - 0x218]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [ebp - 0x218]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x417c39
mov byte [ebp - 0x144], 0
mov eax, dword [str.SQLSTR.DLL]
push eax
lea ecx, [ebp - 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 8
push 0
lea edx, [ebp - 0x144]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov dword [0x424670], eax
cmp dword [0x424670], 0
jne 0x417c80
push 8
push 0
mov eax, dword [str.SQLSTR.DLL]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov dword [0x424670], eax
cmp dword [0x424670], 0
jne 0x417cd7
push 0
push 0
lea ecx, [ebp - 0x320]
push ecx
push 0x800
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0x30
push str.SQLUNI_Internal_Error:__Cannot_load_SQLSTR.DLL
mov edx, dword [ebp - 0x320]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [ebp - 0x320]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x417efb
mov dword [ebp - 0xc], 0
jmp 0x417ce9
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 0x13d
jae 0x417ed7
mov edx, dword [ebp - 0xc]
mov eax, dword [edx*4 + 0x4211b8]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call sub.MSVCRT.dll_strcpy
add esp, 8
cmp dword [0x424bb8], 0
je 0x417e03
push 0x4233d8
lea edx, [ebp - 0x20c]
push edx
call sub.MSVCRT.dll_strstr
add esp, 8
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x417d49
mov eax, dword [ebp - 0x214]
mov byte [eax], 0
movsx ecx, byte [ebp - 0x20c]
cmp ecx, 0x41
jl 0x417d70
movsx edx, byte [ebp - 0x20c]
cmp edx, 0x5a
jg 0x417d70
movsx eax, byte [ebp - 0x20c]
sub eax, 0x37
mov dword [ebp - 4], eax
jmp 0x417d7d
movsx ecx, byte [ebp - 0x20c]
sub ecx, 0x30
mov dword [ebp - 4], ecx
lea edx, [ebp - 0x20b]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax*4 + 0x424670]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0xc]
mov dword [edx*4 + 0x4246c0], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax*4 + 0x4246c0], 0
jne 0x417dfe
mov ecx, dword [ebp - 4]
mov edx, dword [ecx*4 + 0x421188]
push edx
push 0x4233dc
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x1d6
push 0x423400
lea ecx, [ebp - 0x420]
push ecx
lea edx, [ebp - 0x20b]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax*4 + 0x4246c0]
push ecx
call fcn.0041800c
add esp, 0x14
xor eax, eax
jmp 0x417efb
jmp 0x417ed2
mov byte [ebp - 0x20c], 0x5f
push 0x423414
lea edx, [ebp - 0x20c]
push edx
call sub.MSVCRT.dll_strstr
add esp, 8
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x417e62
mov eax, dword [ebp - 0x214]
movsx ecx, byte [eax + 1]
test ecx, ecx
jne 0x417e4f
lea edx, [ebp - 0x20b]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x214]
mov byte [eax], 0
jmp 0x417e58
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x214]
mov byte [edx - 1], 0x5f
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [0x424670]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0xc]
mov dword [edx*4 + 0x4246c0], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax*4 + 0x4246c0], 0
jne 0x417ed2
mov ecx, dword [str.SQLSTR.DLL]
push ecx
push str.entrypoint_could_not_be_found_in__s
lea edx, [ebp - 0x520]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x1f2
push str..._srcprocaddr.c
lea eax, [ebp - 0x520]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx*4 + 0x4246c0]
push eax
call fcn.0041800c
add esp, 0x14
xor eax, eax
jmp 0x417efb
jmp 0x417ce0
cmp dword [0x424bb8], 0
je 0x417ef6
cmp dword [0x424670], 0
je 0x417ef6
mov ecx, dword [0x424670]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 1
mov esp, ebp
pop ebp
ret