Function at 0x401010
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1954
call fcn.00408f10
mov eax, dword [0x40feb8]
mov dword [ebp - 8], eax
mov dword [ebp - 0x328], 0
mov dword [ebp - 0x1944], 0
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x320], 0
mov dword [ebp - 0x31c], 0
mov dword [ebp - 4], 0
push 0x1508
push 0
lea eax, [ebp - 0x1940]
push eax
call sub.MSVCR71.dll_memset
add esp, 0xc
cmp dword [ebp + 8], 3
jle 0x4011f7
push 0x103
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
push edx
lea eax, [ebp - 0x1120]
push eax
call sub.MSVCR71.dll_wcsncpy
add esp, 0xc
mov word [ebp - 0xf1a], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
push edx
call sub.MSVCR71.dll__wtoi
add esp, 4
mov dword [ebp - 0x1944], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0xc]
push ecx
call sub.MSVCR71.dll__wtoi
add esp, 4
mov dword [ebp - 0x32c], eax
cmp dword [ebp - 0x32c], 1
je 0x4010f4
cmp dword [ebp - 0x1944], 4
jne 0x4010f4
mov dword [ebp - 0x1944], 0
cmp dword [ebp - 0x32c], 1
jne 0x401138
cmp dword [ebp + 8], 4
jle 0x40112e
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
push eax
call sub.MSVCR71.dll__wtoi
add esp, 4
test eax, eax
jne 0x401122
mov dword [ebp - 0x84c], 0
jmp 0x40112c
mov dword [ebp - 0x84c], 1
jmp 0x401138
mov dword [ebp - 0x84c], 0
cmp dword [ebp + 8], 4
jle 0x401162
push 0x103
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
push edx
lea eax, [ebp - 0xf18]
push eax
call sub.MSVCR71.dll_wcsncpy
add esp, 0xc
mov word [ebp - 0xd12], 0
cmp dword [ebp - 0x32c], 4
jne 0x4011f7
cmp dword [ebp + 8], 5
jge 0x401181
mov dword [ebp - 0x1944], 0
jmp 0x40119a
cmp dword [ebp - 0x1944], 1
je 0x40119a
cmp dword [ebp + 8], 6
jg 0x40119a
mov dword [ebp - 0x1944], 0
cmp dword [ebp - 0x1944], 0
je 0x4011f7
push 0x103
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
push edx
lea eax, [ebp - 0xaa4]
push eax
call sub.MSVCR71.dll_wcsncpy
add esp, 0xc
mov word [ebp - 0x89e], 0
cmp dword [ebp + 8], 6
jle 0x4011f7
cmp dword [ebp - 0x1944], 1
je 0x4011f7
push 0x27
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x18]
push edx
lea eax, [ebp - 0x89c]
push eax
call sub.MSVCR71.dll_wcsncpy
add esp, 0xc
mov word [ebp - 0x84e], 0
cmp dword [ebp - 0x1944], 1
jl 0x401237
cmp dword [ebp - 0x1944], 4
jg 0x401237
cmp dword [ebp - 0x32c], 1
jl 0x401237
cmp dword [ebp - 0x32c], 4
jg 0x401237
cmp dword [ebp - 0x32c], 1
je 0x401241
lea ecx, [ebp - 0xf18]
push ecx
call sub.MSVCR71.dll_wcslen
add esp, 4
test eax, eax
ja 0x401241
mov eax, 0x20000100
jmp 0x40191a
push str.MSSQLServerCurrentVersion
lea edx, [ebp - 0x1120]
push edx
lea eax, [ebp - 0x318]
push eax
call fcn.00401ba0
add esp, 0xc
lea ecx, [ebp - 4]
push ecx
push 0x20019
push 0
lea edx, [ebp - 0x318]
push edx
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4012bc
mov dword [ebp - 0x194c], 4
lea eax, [ebp - 0x194c]
push eax
push 0x41051c
lea ecx, [ebp - 0x1948]
push ecx
push 0
push str.Language
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], 0
push 0x84
lea ecx, [ebp - 0x110]
push ecx
lea edx, [ebp - 0x1120]
push edx
call fcn.00405080
add esp, 0xc
mov dword [ebp - 0x324], eax
cmp dword [ebp - 0x324], 0
je 0x401304
mov eax, dword [ebp - 0x324]
push eax
push str.Could_not_query_SQL_instance_service_account.
call fcn.00402560
add esp, 8
mov eax, 0x20000004
jmp 0x40191a
lea ecx, [ebp - 0x110]
push ecx
push str.LocalSystem
call sub.MSVCR71.dll__wcsicmp
add esp, 8
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x320], eax
cmp dword [ebp - 0x1944], 3
jne 0x401339
cmp dword [ebp - 0x32c], 1
je 0x40148e
cmp dword [ebp - 0x320], 0
jne 0x40148e
cmp dword [ebp - 0x1944], 1
jne 0x4013cc
cmp dword [ebp - 0x32c], 1
jne 0x4013cc
mov dword [ebp - 0x1950], 0
push 1
lea edx, [ebp - 0x1940]
push edx
call fcn.00401930
add esp, 8
mov dword [ebp - 0x1950], eax
cmp dword [ebp - 0x1950], 0
je 0x4013c5
cmp dword [ebp - 0x1950], 0x20000006
jne 0x4013a7
push 0
push 0x40a1e0
call fcn.00402560
add esp, 8
mov eax, 0x20000006
jmp 0x40191a
mov eax, dword [ebp - 0x1950]
push eax
push str.Cannot_start_helper_service_to_create_SCP_object.
call fcn.00402560
add esp, 8
mov eax, 0x20000005
jmp 0x40191a
xor eax, eax
jmp 0x40191a
lea ecx, [ebp - 0x1940]
push ecx
lea edx, [ebp - 0x438]
push edx
call fcn.00405430
add esp, 8
test eax, eax
jne 0x401475
lea eax, [ebp - 0x438]
push eax
lea ecx, [ebp - 0x110]
push ecx
call sub.MSVCR71.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x401406
jmp 0x401473
mov dword [ebp - 0x1954], 0
push 2
lea edx, [ebp - 0x1940]
push edx
call fcn.00401930
add esp, 8
mov dword [ebp - 0x1954], eax
cmp dword [ebp - 0x1954], 0
je 0x401473
cmp dword [ebp - 0x1954], 0x20000006
jne 0x401455
push 0
push str.SQL_AD_Helper_service_is_busy__please_try_again_later.
call fcn.00402560
add esp, 8
mov eax, 0x20000006
jmp 0x40191a
mov eax, dword [ebp - 0x1954]
push eax
push str.Cannot_start_helper_service_to_update_DACLs_of_SCP_and_its_child_objects.
call fcn.00402560
add esp, 8
mov eax, 0x20000005
jmp 0x40191a
jmp 0x40148e
push 0
push str.Could_not_find_SQL_Server_instance_service_account_in_the_registry.
call fcn.00402560
add esp, 8
mov eax, 0x20000003
jmp 0x40191a
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x328], 0
jge 0x4014c3
mov ecx, dword [ebp - 0x328]
push ecx
push str.CoInitialize_failed.
call fcn.00402560
add esp, 8
mov eax, 0x20000001
jmp 0x40191a
push str.activeds.dll
call fcn.00401cc0
add esp, 4
mov dword [ebp - 0x31c], eax
cmp dword [ebp - 0x31c], 0
jne 0x4014ee
mov dword [ebp - 0x328], 0x20000007
jmp 0x4018c1
push str.ADsGetObject
mov edx, dword [ebp - 0x31c]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x410510], eax
cmp dword [0x410510], 0
jne 0x40151f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x328], eax
jmp 0x4018c1
push str.FreeADsMem
mov eax, dword [ebp - 0x31c]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x410514], eax
cmp dword [0x410514], 0
jne 0x401550
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x328], eax
jmp 0x4018c1
cmp dword [ebp - 0x1944], 4
jne 0x40157e
cmp dword [ebp - 0x32c], 1
jne 0x40157e
lea ecx, [ebp - 0x1940]
push ecx
push 1
push SysStringLen
call fcn.00408a80
add esp, 0xc
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x1944], 1
jne 0x40169a
cmp dword [ebp - 0x32c], 1
jne 0x4015c6
xor edx, edx
cmp dword [ebp - 0x320], 0
setne dl
dec edx
lea eax, [ebp - 0x110]
and edx, eax
push edx
lea ecx, [ebp - 0x1940]
push ecx
push 1
push SysStringLen
call fcn.00407ea0
add esp, 0x10
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x32c], 2
jne 0x401601
xor edx, edx
cmp dword [ebp - 0x320], 0
setne dl
dec edx
lea eax, [ebp - 0x110]
and edx, eax
push edx
lea ecx, [ebp - 0x1940]
push ecx
push 1
push SysStringLen
call fcn.004067c0
add esp, 0x10
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x32c], 4
jne 0x401675
xor edx, edx
cmp dword [ebp - 0x320], 0
setne dl
dec edx
lea eax, [ebp - 0x110]
and edx, eax
push edx
lea ecx, [ebp - 0x1940]
push ecx
push 1
push SysStringLen
call fcn.00407550
add esp, 0x10
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x328], 0
je 0x401675
mov edx, dword [ebp - 0x328]
and edx, 0xffff
cmp edx, 0x1392
jne 0x401675
lea eax, [ebp - 0x1940]
push eax
push 1
push SysStringLen
call fcn.00407890
add esp, 0xc
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x32c], 3
jne 0x40169a
lea ecx, [ebp - 0x1940]
push ecx
push 1
push SysStringLen
call fcn.00407160
add esp, 0xc
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x1944], 2
jne 0x401825
cmp dword [ebp - 0x32c], 1
jne 0x401714
lea edx, [ebp - 0x1940]
push edx
push 1
push SysStringLen
call fcn.00408610
add esp, 0xc
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x328], 0
jne 0x4016d7
jmp 0x401714
mov eax, dword [ebp - 0x328]
and eax, 0xffff
cmp eax, 0x2030
je 0x4016fd
mov ecx, dword [ebp - 0x328]
and ecx, 0xffff
cmp ecx, 0x202b
jne 0x401714
push 1
lea edx, [ebp - 0x1940]
push edx
call fcn.00401930
add esp, 8
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x32c], 2
jne 0x40178a
lea eax, [ebp - 0x1940]
push eax
push 1
push SysStringLen
call fcn.00406920
add esp, 0xc
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x328], 0
jne 0x401744
jmp 0x40178a
mov ecx, dword [ebp - 0x328]
and ecx, 0xffff
cmp ecx, 0x2030
jne 0x40178a
xor edx, edx
cmp dword [ebp - 0x320], 0
setne dl
dec edx
lea eax, [ebp - 0x110]
and edx, eax
push edx
lea ecx, [ebp - 0x1940]
push ecx
push 1
push SysStringLen
call fcn.004067c0
add esp, 0x10
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x32c], 4
jne 0x401825
lea edx, [ebp - 0x1940]
push edx
push 1
push SysStringLen
call fcn.00407890
add esp, 0xc
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x328], 0
je 0x401800
mov eax, dword [ebp - 0x328]
and eax, 0xffff
cmp eax, 0x2030
jne 0x401800
xor ecx, ecx
cmp dword [ebp - 0x320], 0
setne cl
dec ecx
lea edx, [ebp - 0x110]
and ecx, edx
push ecx
lea eax, [ebp - 0x1940]
push eax
push 1
push SysStringLen
call fcn.00407550
add esp, 0x10
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x32c], 3
jne 0x401825
lea ecx, [ebp - 0x1940]
push ecx
push 1
push SysStringLen
call fcn.004072d0
add esp, 0xc
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x1944], 3
jne 0x4018c1
cmp dword [ebp - 0x32c], 1
jne 0x401852
push 3
lea edx, [ebp - 0x1940]
push edx
call fcn.00401930
add esp, 8
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x32c], 2
jne 0x401877
lea eax, [ebp - 0x1940]
push eax
push 1
push SysStringLen
call fcn.00406bc0
add esp, 0xc
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x32c], 4
jne 0x40189c
lea ecx, [ebp - 0x1940]
push ecx
push 1
push SysStringLen
call fcn.00407c70
add esp, 0xc
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x32c], 3
jne 0x4018c1
lea edx, [ebp - 0x1940]
push edx
push 1
push SysStringLen
call fcn.00407400
add esp, 0xc
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x31c], 0
je 0x4018d7
mov eax, dword [ebp - 0x31c]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call dword [sym.imp.ole32.dll_CoUninitialize]
cmp dword [ebp - 0x328], 0
jne 0x4018ea
xor eax, eax
jmp 0x40191a
mov ecx, dword [ebp - 0x328]
and ecx, 0x20000000
je 0x401900
mov eax, dword [ebp - 0x328]
jmp 0x40191a
mov edx, dword [ebp - 0x328]
push edx
push str.Operation_failed.
call fcn.00402560
add esp, 8
mov eax, dword [ebp - 0x328]
mov ecx, dword [ebp - 8]
call fcn.00408ef1
mov esp, ebp
pop ebp
ret