Function at 0x3d658
Capabilities:
Modify service
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x11
push 0
push 0
dec ecx
jne 0x3d660
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x3da48
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
lea eax, [ebp - 0x18]
mov ecx, dword [ebp - 4]
mov edx, 0x3da64
call fcn.00013ff4
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [0x2514d0]
mov eax, dword [eax]
add eax, 0xf003f
push eax
push 0
mov eax, dword [ebp - 0x18]
call fcn.0001416c
push eax
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
mov esi, eax
test esi, esi
jne 0x3d9d3
mov eax, 0x800
call fcn.0001271c
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov edx, 0x800
call fcn.00012c70
mov dword [ebp - 0x14], 0x800
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x20]
push eax
push 0
push 0x3da88
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
mov esi, eax
test esi, esi
jne 0x3d7cc
cmp dword [ebp - 0x14], 0
jbe 0x3d7fb
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0xc]
call fcn.00013ee0
lea edx, [ebp - 0x50]
mov eax, dword [ebp - 0x18]
call fcn.00027408
mov eax, dword [ebp - 0x50]
push eax
lea edx, [ebp - 0x54]
mov eax, 0x3da9c
call fcn.00027408
mov eax, dword [ebp - 0x54]
pop edx
call fcn.00014294
test eax, eax
jbe 0x3d7fb
lea edx, [ebp - 0x18]
mov ecx, 0xe
xchg edx, eax
call fcn.000141f0
lea eax, [ebp - 0x18]
mov edx, 0x3dab4
call fcn.00013fb0
mov eax, dword [ebp - 0x18]
call fcn.00013fa8
mov dword [ebp - 0x14], eax
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
call fcn.0001416c
push eax
mov eax, dword [ebp - 0x20]
push eax
push 0
push 0x3da88
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_RegSetValueExA
mov esi, eax
test esi, esi
je 0x3d7fb
mov eax, dword [ebp + 8]
push eax
push dword [ebp - 4]
push 0x3dacc
lea edx, [ebp - 0x5c]
mov eax, esi
call fcn.00027478
push dword [ebp - 0x5c]
lea eax, [ebp - 0x58]
mov edx, 3
call fcn.00014068
mov eax, dword [ebp - 0x58]
call fcn.0003d5ac
pop ecx
jmp 0x3d7fb
mov eax, dword [ebp + 8]
push eax
push dword [ebp - 4]
push 0x3dadc
lea edx, [ebp - 0x64]
mov eax, esi
call fcn.00027478
push dword [ebp - 0x64]
lea eax, [ebp - 0x60]
mov edx, 3
call fcn.00014068
mov eax, dword [ebp - 0x60]
call fcn.0003d5ac
pop ecx
mov dword [ebp - 0x10], 2
mov dword [ebp - 0x20], 4
mov dword [ebp - 0x14], 4
mov eax, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x20]
push eax
push 0
push 0x3dae4
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_RegSetValueExA
mov esi, eax
test esi, esi
je 0x3d861
mov eax, dword [ebp + 8]
push eax
push dword [ebp - 4]
push 0x3daf4
lea edx, [ebp - 0x6c]
mov eax, esi
call fcn.00027478
push dword [ebp - 0x6c]
lea eax, [ebp - 0x68]
mov edx, 3
call fcn.00014068
mov eax, dword [ebp - 0x68]
call fcn.0003d5ac
pop ecx
lea eax, [ebp - 0x4c]
xor ecx, ecx
mov edx, 0x14
call fcn.00012c70
xor eax, eax
mov dword [ebp - 0x4c], eax
xor eax, eax
mov dword [ebp - 0x48], eax
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], 3
lea eax, [ebp - 0x38]
xor ecx, ecx
mov edx, 0x18
call fcn.00012c70
mov edx, 3
lea eax, [ebp - 0x38]
mov byte [eax], 1
mov dword [eax + 4], 0xea60
add eax, 8
dec edx
jne 0x3d89d
lea eax, [ebp - 0x38]
mov dword [ebp - 0x3c], eax
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov edi, eax
test edi, edi
je 0x3d98d
push 0
call sub.kernel32.dll_SetLastError
push 0xf01ff
mov eax, dword [ebp - 4]
call fcn.0001416c
push eax
push edi
call sub.advapi32.dll_OpenServiceA
mov ebx, eax
test ebx, ebx
je 0x3d8f5
push 0
call sub.kernel32.dll_SetLastError
jmp 0x3d92b
call sub.kernel32.dll_GetLastError_1
mov esi, eax
mov eax, dword [ebp + 8]
push eax
push dword [ebp - 4]
push 0x3db04
lea edx, [ebp - 0x74]
mov eax, esi
call fcn.00027478
push dword [ebp - 0x74]
lea eax, [ebp - 0x70]
mov edx, 3
call fcn.00014068
mov eax, dword [ebp - 0x70]
call fcn.0003d5ac
pop ecx
test ebx, ebx
je 0x3d97b
lea eax, [ebp - 0x4c]
push eax
push 2
push ebx
call sub.advapi32.dll_ChangeServiceConfig2A
test eax, eax
je 0x3d945
mov byte [ebp - 5], 1
jmp 0x3d97b
call sub.kernel32.dll_GetLastError_1
mov esi, eax
mov eax, dword [ebp + 8]
push eax
push dword [ebp - 4]
push 0x3db14
lea edx, [ebp - 0x7c]
mov eax, esi
call fcn.00027478
push dword [ebp - 0x7c]
lea eax, [ebp - 0x78]
mov edx, 3
call fcn.00014068
mov eax, dword [ebp - 0x78]
call fcn.0003d5ac
pop ecx
test ebx, ebx
je 0x3d985
push ebx
call sub.advapi32.dll_CloseServiceHandle
push edi
call sub.advapi32.dll_CloseServiceHandle
jmp 0x3d9c9
call sub.kernel32.dll_GetLastError_1
mov esi, eax
mov eax, dword [ebp + 8]
push eax
push dword [ebp - 4]
push 0x3db24
lea edx, [ebp - 0x84]
mov eax, esi
call fcn.00027478
push dword [ebp - 0x84]
lea eax, [ebp - 0x80]
mov edx, 3
call fcn.00014068
mov eax, dword [ebp - 0x80]
call fcn.0003d5ac
pop ecx
mov eax, dword [ebp - 0xc]
call fcn.00012734
jmp 0x3da0e
mov eax, dword [ebp + 8]
push eax
push dword [ebp - 4]
push 0x3db34
lea edx, [ebp - 0x8c]
mov eax, esi
call fcn.00027478
push dword [ebp - 0x8c]
lea eax, [ebp - 0x88]
mov edx, 3
call fcn.00014068
mov eax, dword [ebp - 0x88]
call fcn.0003d5ac
pop ecx
cmp dword [ebp - 0x1c], 0
je 0x3da1d
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x3da4f
lea eax, [ebp - 0x8c]
mov edx, 0x10
call fcn.00013d3c
lea eax, [ebp - 0x18]
call fcn.00013d18
ret