Function at 0xe6620
Capabilities:
Delete registry key
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x55
push 0
push 0
dec ecx
jne 0xe6629
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov esi, dword [ebp + 8]
xor eax, eax
push ebp
push 0xe6e07
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
call fcn.00013d18
mov dword [ebp - 0x1c], 0x10000
xor eax, eax
mov dword [ebp - 0x28], eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [0x2514d0]
mov eax, dword [eax]
add eax, 0x4001f
push eax
push 0
push 0xe6e18
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0xe671c
push 0xe6e4c
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegDeleteKeyA
mov dword [ebp - 0x34], 4
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0xe6e60
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
jne 0xe6945
cmp dword [ebp - 0x18], 4
jne 0xe6945
cmp dword [ebp - 0x1c], 0x2000
je 0xe6945
cmp dword [ebp - 0x1c], 0x4000
je 0xe6945
cmp dword [ebp - 0x1c], 0x8000
je 0xe6945
cmp dword [ebp - 0x1c], 0x10000
je 0xe6945
mov dword [ebp - 0x1c], 0x10000
jmp 0xe6945
cmp dword [ebp - 0x14], 0
je 0xe672b
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [0x2514d0]
mov eax, dword [eax]
add eax, 0x4001f
push eax
push 0
push 0
push 0
push 0xe6e18
push 0x80000001
call sub.advapi32.dll_RegCreateKeyExA
test eax, eax
je 0xe6864
cmp dword [ebp - 0x14], 0
je 0xe6773
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [0x2514d0]
mov eax, dword [eax]
add eax, 0x4001f
push eax
push 0
push 0
push 0
push 0xe6e74
push 0x80000001
call sub.advapi32.dll_RegCreateKeyExA
cmp dword [ebp - 0x14], 0
je 0xe67b3
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [0x2514d0]
mov eax, dword [eax]
add eax, 0x4001f
push eax
push 0
push 0
push 0
push 0xe6e7c
push 0x80000001
call sub.advapi32.dll_RegCreateKeyExA
cmp dword [ebp - 0x14], 0
je 0xe67f3
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [0x2514d0]
mov eax, dword [eax]
add eax, 0x4001f
push eax
push 0
push 0
push 0
push 0xe6e98
push 0x80000001
call sub.advapi32.dll_RegCreateKeyExA
cmp dword [ebp - 0x14], 0
je 0xe6833
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [0x2514d0]
mov eax, dword [eax]
add eax, 0x4001f
push eax
push 0
push 0
push 0
push 0xe6ebc
push 0x80000001
call sub.advapi32.dll_RegCreateKeyExA
cmp dword [ebp - 0x14], 0
je 0xe6873
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [0x2514d0]
mov eax, dword [eax]
add eax, 0x4001f
push eax
push 0
push 0
push 0
push 0xe6e18
push 0x80000001
call sub.advapi32.dll_RegCreateKeyExA
test eax, eax
jne 0xe6915
push 0xe6e4c
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegDeleteKeyA
mov dword [ebp - 0x34], 4
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0xe6e60
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
jne 0xe6945
cmp dword [ebp - 0x18], 4
jne 0xe6945
cmp dword [ebp - 0x1c], 0x2000
je 0xe6945
cmp dword [ebp - 0x1c], 0x4000
je 0xe6945
cmp dword [ebp - 0x1c], 0x8000
je 0xe6945
cmp dword [ebp - 0x1c], 0x10000
je 0xe6945
mov dword [ebp - 0x1c], 0x10000
jmp 0xe6945
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x3c]
mov eax, dword [ebp - 0x10]
call fcn.00027478
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
mov edx, 0xe6eec
call fcn.00013ff4
mov eax, dword [ebp - 0x38]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000ded38
xor eax, eax
mov dword [ebp - 0x20], eax
push 0
call fcn.000d2230
mov dword [ebp - 0x34], 4
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0xffff
mov eax, dword [ebp - 8]
push eax
call fcn.000d1fc0
call fcn.000d224c
mov ebx, eax
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x1c]
jne 0xe69cc
cmp dword [ebp - 0x20], 0
je 0xe69cc
cmp byte [ebp + 0xc], 0
je 0xe6d10
push 0xe6f0c
mov eax, dword [ebp - 0x20]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x44]
call fcn.00027444
push dword [ebp - 0x44]
push 0xe6f18
lea eax, [ebp - 0x40]
mov edx, 3
call fcn.00014068
mov eax, dword [ebp - 0x40]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000ded38
jmp 0xe6d10
test ebx, ebx
jne 0xe6d10
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
push 0
call fcn.000d2230
mov dword [ebp - 0x34], 4
mov eax, dword [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0xffff
mov eax, dword [ebp - 8]
push eax
call fcn.000d2160
call fcn.000d224c
mov dword [ebp - 0x28], eax
xor eax, eax
mov dword [ebp - 0x24], eax
push 0
call fcn.000d2230
mov dword [ebp - 0x34], 4
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0xffff
mov eax, dword [ebp - 8]
push eax
call fcn.000d1fc0
call fcn.000d224c
mov edi, eax
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x1c]
jne 0xe6ab9
cmp byte [ebp + 0xc], 0
je 0xe6d10
push 0xe6f0c
mov eax, dword [ebp - 0x20]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x4c]
call fcn.00027444
push dword [ebp - 0x4c]
push 0xe6f24
mov eax, dword [ebp - 0x2c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x50]
call fcn.00027444
push dword [ebp - 0x50]
push 0xe6f24
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x54]
call fcn.00027444
push dword [ebp - 0x54]
push 0xe6f18
lea eax, [ebp - 0x48]
mov edx, 7
call fcn.00014068
mov eax, dword [ebp - 0x48]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000ded38
jmp 0xe6d10
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x1c]
jbe 0xe6b2a
push 0xe6f0c
mov eax, dword [ebp - 0x20]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x5c]
call fcn.00027444
push dword [ebp - 0x5c]
push 0xe6f24
mov eax, dword [ebp - 0x2c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x60]
call fcn.00027444
push dword [ebp - 0x60]
push 0xe6f24
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x64]
call fcn.00027444
push dword [ebp - 0x64]
push 0xe6f18
lea eax, [ebp - 0x58]
mov edx, 7
call fcn.00014068
mov eax, dword [ebp - 0x58]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000dedec
jmp 0xe6d10
push 0xe6f0c
mov eax, dword [ebp - 0x20]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x6c]
call fcn.00027444
push dword [ebp - 0x6c]
push 0xe6f24
mov eax, dword [ebp - 0x2c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x70]
call fcn.00027444
push dword [ebp - 0x70]
push 0xe6f24
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x74]
call fcn.00027444
push dword [ebp - 0x74]
push 0xe6f18
lea eax, [ebp - 0x68]
mov edx, 7
call fcn.00014068
mov eax, dword [ebp - 0x68]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000deea0
cmp dword [ebp - 0x14], 0
je 0xe6c98
test ebx, ebx
jne 0xe6c98
test edi, edi
jne 0xe6c98
cmp dword [ebp - 0x1c], 0x4000
jb 0xe6d10
mov eax, dword [ebp - 0x1c]
shr eax, 1
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], 4
mov dword [ebp - 0x34], 4
mov eax, dword [ebp - 0x34]
push eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
push 0
push 0xe6e60
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegSetValueExA
not eax
test eax, eax
jne 0xe6c51
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x10], eax
push 0xe6f30
lea edx, [ebp - 0x17c]
mov eax, dword [ebp - 0x1c]
call fcn.00029850
lea edx, [ebp - 0x17c]
lea eax, [ebp - 0x7c]
call fcn.00013f4c
push dword [ebp - 0x7c]
push 0xe6f3c
lea edx, [ebp - 0x180]
mov eax, dword [ebp - 0x10]
call fcn.00027478
push dword [ebp - 0x180]
lea eax, [ebp - 0x78]
mov edx, 4
call fcn.00014068
mov eax, dword [ebp - 0x78]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000deea0
jmp 0xe6d10
lea edx, [ebp - 0x17c]
mov eax, dword [ebp - 0x1c]
call fcn.00029850
lea edx, [ebp - 0x17c]
lea eax, [ebp - 0x188]
call fcn.00013f4c
mov ecx, dword [ebp - 0x188]
lea eax, [ebp - 0x184]
mov edx, 0xe6f30
call fcn.00013ff4
mov eax, dword [ebp - 0x184]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000dedec
jmp 0xe6d10
push 0xe6f48
cmp dword [ebp - 0x14], 0
setne al
lea edx, [ebp - 0x17c]
call fcn.000294b8
lea edx, [ebp - 0x17c]
lea eax, [ebp - 0x190]
call fcn.00013f4c
push dword [ebp - 0x190]
push 0xe6f30
lea edx, [ebp - 0x294]
mov eax, dword [ebp - 0x1c]
call fcn.00029850
lea edx, [ebp - 0x294]
lea eax, [ebp - 0x194]
call fcn.00013f4c
push dword [ebp - 0x194]
lea eax, [ebp - 0x18c]
mov edx, 4
call fcn.00014068
mov eax, dword [ebp - 0x18c]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000deea0
cmp dword [ebp - 0x14], 0
je 0xe6d1f
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
mov dword [ebp - 0x14], eax
test ebx, ebx
je 0xe6d5b
lea edx, [ebp - 0x29c]
mov eax, ebx
call fcn.00027478
mov ecx, dword [ebp - 0x29c]
lea eax, [ebp - 0x298]
mov edx, 0xe6f74
call fcn.00013ff4
mov eax, dword [ebp - 0x298]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000deea0
cmp dword [ebp - 0x28], 0
je 0xe6d95
lea edx, [ebp - 0x2a4]
mov eax, dword [ebp - 0x28]
call fcn.00027478
mov ecx, dword [ebp - 0x2a4]
lea eax, [ebp - 0x2a0]
mov edx, 0xe6f84
call fcn.00013ff4
mov eax, dword [ebp - 0x2a0]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000deea0
test edi, edi
je 0xe6dcc
lea edx, [ebp - 0x2ac]
mov eax, edi
call fcn.00027478
mov ecx, dword [ebp - 0x2ac]
lea eax, [ebp - 0x2a8]
mov edx, 0xe6f94
call fcn.00013ff4
mov eax, dword [ebp - 0x2a8]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.000deea0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xe6e0e
lea eax, [ebp - 0x2ac]
mov edx, 6
call fcn.00013d3c
lea eax, [ebp - 0x194]
mov edx, 6
call fcn.00013d3c
lea eax, [ebp - 0x7c]
mov edx, 0x12
call fcn.00013d3c
ret