Function at 0x4012cb
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x240c
call fcn.004084b0
push ebx
push esi
push edi
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x52c], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x63c], 0
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x638], 0
mov dword [ebp - 0x644], 0
mov dword [ebp - 0x640], 0
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 3
jne 0x4013f7
push 0x103
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
push ecx
lea edx, [ebp - 0x1330]
push edx
call sub.MSVCRT.dll_wcsncpy
add esp, 0xc
mov word [ebp - 0x112a], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
push ecx
call sub.MSVCRT.dll__wtoi
add esp, 4
mov dword [ebp - 0xc], eax
push 0xa
lea edx, [ebp - 0x1b8c]
push edx
push 0xb
call sub.MSVCRT.dll__ultow
add esp, 0xc
lea eax, [ebp - 0x1330]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 4
test eax, eax
jne 0x4013bc
push 0
push 0
push 0xc0000065
push 1
call fcn.00405f5e
add esp, 0x10
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0xc0000065
xor eax, eax
jmp 0x40192f
cmp dword [ebp - 0xc], 1
jl 0x4013c8
cmp dword [ebp - 0xc], 0xb
jle 0x4013f5
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
push eax
lea ecx, [ebp - 0x1b8c]
push ecx
push 0xc0000066
push 1
call fcn.00405f5e
add esp, 0x10
mov edx, dword [ebp + 0x10]
mov dword [edx], 0xc0000066
xor eax, eax
jmp 0x40192f
jmp 0x401437
push 0xa
lea eax, [ebp - 0x1bdc]
push eax
mov ecx, dword [ebp + 8]
sub ecx, 1
push ecx
call sub.MSVCRT.dll__ultow
add esp, 0xc
push 0
lea edx, [ebp - 0x1bdc]
push edx
push 0xc0000064
push 1
call fcn.00405f5e
add esp, 0x10
mov eax, dword [ebp + 0x10]
mov dword [eax], 0xc0000064
xor eax, eax
jmp 0x40192f
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 0x52c], eax
cmp dword [ebp - 0x52c], 0
jge 0x401459
mov eax, dword [ebp - 0x52c]
jmp 0x40192f
push 0x40b3ec
lea ecx, [ebp - 0x420]
push ecx
call sub.MSVCRT.dll_wcscpy
add esp, 8
push str.MSSQLServerADHelper
lea edx, [ebp - 0x420]
push edx
call sub.MSVCRT.dll_wcscat
add esp, 8
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x1330]
push ecx
lea edx, [ebp - 0x218]
push edx
call fcn.004020d0
add esp, 0xc
lea eax, [ebp - 0x644]
push eax
push 0x20019
push 0
lea ecx, [ebp - 0x218]
push ecx
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401500
mov dword [ebp - 0x1be0], 4
lea edx, [ebp - 0x1be0]
push edx
push 0x40f4ec
lea eax, [ebp - 0x1be4]
push eax
push 0
push str.Debug
mov ecx, dword [ebp - 0x644]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [ebp - 0x644]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x40f4ec], 0
je 0x401526
push 0x200004
push 0x40b3f0
push str.Do_you_want_to_debug_
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
jne 0x401526
int3
cmp dword [ebp - 0xc], 0xa
jl 0x401563
cmp dword [ebp - 0xc], 0xb
jg 0x401563
lea eax, [ebp - 0x10]
push eax
push 0x409170
push 1
push 0
push 0x409190
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x52c], eax
cmp dword [ebp - 0x52c], 0
jge 0x40155e
jmp 0x40192d
jmp 0x401689
lea ecx, [ebp - 0x634]
push ecx
lea edx, [ebp - 0x1330]
push edx
call fcn.00404a07
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4015c5
mov eax, dword [ebp - 8]
push eax
push 0x410
lea ecx, [ebp - 0x2408]
push ecx
call fcn.00402044
add esp, 0xc
lea edx, [ebp - 0x2408]
push edx
lea eax, [ebp - 0x1330]
push eax
push 0xc0000069
push 1
call fcn.00405f5e
add esp, 0x10
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x52c], ecx
jmp 0x40192b
lea edx, [ebp - 0x634]
push edx
push str.LocalSystem
call sub.MSVCRT.dll__wcsicmp
add esp, 8
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x63c], eax
push str.activeds.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x648], eax
cmp dword [ebp - 0x648], 0
jne 0x401627
push 0
lea eax, [ebp - 0x1330]
push eax
push 0xc000006a
push 1
call fcn.00405f5e
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x52c], eax
jmp 0x401929
push str.ADsGetObject
mov ecx, dword [ebp - 0x648]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x40f4dc], eax
cmp dword [0x40f4dc], 0
jne 0x401658
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x52c], eax
jmp 0x401927
push str.FreeADsMem
mov edx, dword [ebp - 0x648]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x40f4e0], eax
cmp dword [0x40f4e0], 0
jne 0x401689
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x52c], eax
jmp 0x401925
cmp dword [ebp - 0xc], 1
jne 0x4016c5
mov eax, dword [ebp - 0x63c]
neg eax
sbb eax, eax
not eax
lea ecx, [ebp - 0x634]
and eax, ecx
push eax
lea edx, [ebp - 0x1b50]
push edx
push 1
push SysStringLen
call fcn.00407540
add esp, 0x10
mov dword [ebp - 0x52c], eax
jmp 0x4018cc
cmp dword [ebp - 0xc], 2
jne 0x401830
mov dword [ebp - 0x240c], 0
lea eax, [ebp - 0x1b50]
push eax
lea ecx, [ebp - 0x528]
push ecx
call fcn.00404cf1
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x401706
mov edx, dword [ebp - 8]
mov dword [ebp - 0x52c], edx
jmp 0x401923
lea eax, [ebp - 0x528]
push eax
push str.LocalSystem
call sub.MSVCRT.dll__wcsicmp
add esp, 8
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x240c], eax
lea ecx, [ebp - 0x528]
push ecx
lea edx, [ebp - 0x634]
push edx
call sub.MSVCRT.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x401744
jmp 0x401921
cmp dword [ebp - 0x240c], 0
je 0x40175b
cmp dword [ebp - 0x63c], 0
je 0x40175b
jmp 0x40191f
cmp dword [ebp - 0x240c], 0
je 0x401782
cmp dword [ebp - 0x63c], 0
jne 0x401782
lea eax, [ebp - 0x634]
mov dword [ebp - 0x640], eax
mov dword [ebp - 4], 0
jmp 0x4017d0
cmp dword [ebp - 0x240c], 0
jne 0x4017a9
cmp dword [ebp - 0x63c], 0
je 0x4017a9
mov dword [ebp - 0x640], 0
lea ecx, [ebp - 0x528]
mov dword [ebp - 4], ecx
jmp 0x4017d0
cmp dword [ebp - 0x240c], 0
jne 0x4017d0
cmp dword [ebp - 0x63c], 0
jne 0x4017d0
lea edx, [ebp - 0x634]
mov dword [ebp - 0x640], edx
lea eax, [ebp - 0x528]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x640]
push edx
lea eax, [ebp - 0x1b50]
push eax
push SysStringLen
call fcn.004057a8
add esp, 0x10
mov dword [ebp - 0x52c], eax
cmp dword [ebp - 0x52c], 0
jne 0x40182b
lea ecx, [ebp - 0x1b50]
push ecx
lea edx, [ebp - 0x634]
push edx
call fcn.00404d80
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40182b
mov eax, dword [ebp - 8]
mov dword [ebp - 0x52c], eax
jmp 0x40191d
jmp 0x4018cc
cmp dword [ebp - 0xc], 3
jne 0x401854
lea ecx, [ebp - 0x1b50]
push ecx
push 1
push SysStringLen
call fcn.00407fb4
add esp, 0xc
mov dword [ebp - 0x52c], eax
jmp 0x4018cc
cmp dword [ebp - 0xc], 0xa
jne 0x40187e
lea edx, [ebp - 0x638]
push edx
push 0xffffffffffffffff
push 1
push 0x40f4f0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x10]
push edx
call dword [ecx + 0x1c]
mov dword [ebp - 0x52c], eax
jmp 0x4018cc
cmp dword [ebp - 0xc], 0xb
jne 0x4018cc
lea eax, [ebp - 0x638]
push eax
push 0
push 1
push 0x40f4f4
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x10]
push eax
call dword [edx + 0x1c]
mov dword [ebp - 0x52c], eax
cmp dword [ebp - 0x638], 0
je 0x4018cc
push 0x40f4f8
mov ecx, dword [ebp - 0x638]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x638]
push eax
call dword [edx + 0x24]
mov dword [ebp - 0x52c], eax
cmp dword [ebp - 0x648], 0
je 0x4018e2
mov ecx, dword [ebp - 0x648]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x638], 0
je 0x4018fd
mov edx, dword [ebp - 0x638]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x638]
push ecx
call dword [eax + 8]
cmp dword [ebp - 0x10], 0
je 0x40190f
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [eax + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x52c]
jmp 0x40192f
jmp 0x4018cc
jmp 0x4018cc
jmp 0x4018cc
jmp 0x4018cc
jmp 0x4018cc
jmp 0x4018cc
jmp 0x4018cc
jmp 0x4018cc
jmp 0x4018cc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret