Function at 0x4069c0
Capabilities:
Delete registry value
Set registry value

Disassembly:
sub esp, 0x870
mov eax, dword [esp + 0x878]
push ebp
mov ebp, dword [eax]
mov eax, dword [0x40dbf4]
test eax, eax
mov dword [esp + 8], ebp
je 0x406d2a
lea ecx, [esp + 0x20]
lea edx, [esp + 4]
push ecx
push edx
push 0
push 0x2001f
push 0
push 0
push 0
push str.SOFTWAREMicrosoftMSSQLServerMSSQLServer
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406d2a
mov eax, dword [esp + 0x880]
push edi
push esi
push ebx
test eax, eax
je 0x406a67
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push str.ListenOn
push eax
call esi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push 0x20006
push 0
push str.RPCNetLib
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406a67
mov eax, dword [esp + 0x18]
push str.Security
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0x30]
push 0x28
rep stosd dword es:[edi], eax
mov eax, dword [0x40e224]
push edx
lea ebx, [esp + 0x88]
push 0x48
push eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x34], ebx
call esi
mov edx, dword [0x40e224]
lea ecx, [esp + 0x58]
push 0x28
push ecx
push 0x47
push edx
call esi
mov eax, dword [esp + 0x884]
mov dword [esp + 0x20], 0
test eax, eax
jle 0x406ce2
jmp 0x406ad0
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x406afa
add ebp, 0x100
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x406b22
add ebp, 0x100
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
mov eax, dword [esp + 0x14]
rep movsb byte es:[edi], byte [esi]
lea edx, [eax + 0x120]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406b9c
mov edi, 0x40b054
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov dword [esp + 0x28], eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x28]
dec edi
mov ecx, eax
mov ebx, dword [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1c]
not ecx
dec ecx
add eax, ecx
cmp eax, 0x7fe
mov dword [esp + 0x1c], eax
ja 0x406bbe
add ebx, ecx
mov byte [ebx], 0
inc ebx
mov esi, ebp
mov dword [esp + 0x24], ebx
lea eax, [esp + 0x30]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406bed
test cl, cl
je 0x406be9
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406bed
add eax, 2
add esi, 2
test cl, cl
jne 0x406bc9
xor eax, eax
jmp 0x406bf2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406c54
mov eax, dword [esp + 0x14]
cmp word [eax + 0x320], 0
je 0x406c54
lea ecx, [esp + 0x2c]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
push edx
push 0
push 0x2001f
push 0
push 0
push 0
push str.RPCNetLib
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406c54
mov ecx, dword [esp + 0x18]
push 7
push str.Encrypt
push 1
push eax
push str.Security
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, ebp
lea eax, [esp + 0x58]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406c7e
test cl, cl
je 0x406c7a
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406c7e
add eax, 2
add esi, 2
test cl, cl
jne 0x406c5a
xor eax, eax
jmp 0x406c83
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406cb1
mov eax, dword [esp + 0x14]
or ecx, 0xffffffff
lea edx, [eax + 0x220]
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x14]
push edx
push 1
push eax
push str.RWSListenAddress
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x324]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
cmp eax, 0x7fe
jae 0x406ce2
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x884]
inc eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x406acc
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x884]
mov byte [ebx], 0
lea eax, [ecx + edx + 1]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x80]
push eax
push ecx
push 7
push 0
push str.ListenOn
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
pop esi
pop edi
pop ebp
add esp, 0x870
ret