Function at 0x100032f0
Capabilities:
Create service
Get common file path
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10137ddd
mov eax, dword fs:[0]
push eax
sub esp, 0xa90
mov eax, dword [0x10196fc0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [0x1019bc40]
test eax, eax
jne 0x1000335f
push 0x228
call fcn.10007357
add esp, 4
mov dword [ebp - 0xa6c], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x10003351
mov ecx, eax
call fcn.10002f90
jmp 0x10003353
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x1019bc40], eax
push 0
mov ecx, eax
call fcn.10003000
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x424], ax
lea eax, [ebp - 0x422]
push eax
call fcn.1011e210
mov eax, dword [0x1019bc40]
add esp, 0xc
test eax, eax
jne 0x100033c4
push 0x228
call fcn.10007357
add esp, 4
mov dword [ebp - 0xa6c], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x100033b6
mov ecx, eax
call fcn.10002f90
jmp 0x100033b8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x1019bc40], eax
mov ecx, eax
call fcn.10005010
mov edx, eax
mov dword [ebp - 0xa18], 7
xor eax, eax
mov dword [ebp - 0xa1c], 0
mov word [ebp - 0xa2c], ax
cmp word [edx], ax
jne 0x100033f3
xor ecx, ecx
jmp 0x1000340f
mov ecx, edx
lea esi, [ecx + 2]
jmp 0x10003400
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10003400
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0xa2c]
call fcn.10002c30
push 0xb
push 0x10148224
lea ecx, [ebp - 0xa2c]
mov dword [ebp - 4], 2
call fcn.10003ec0
cmp dword [ebp - 0xa18], 8
lea ecx, [ebp - 0xa2c]
lea edx, [ebp - 0x424]
cmovae ecx, dword [ebp - 0xa2c]
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x10003450
push str.InstallService_Start
push 0x101482e4
call fcn.100070c0
xor eax, eax
mov dword [ebp - 0xa68], 0
push 0x3e6
push eax
mov word [ebp - 0x80c], ax
lea eax, [ebp - 0x80a]
push eax
mov dword [ebp - 0xa74], 0
mov dword [ebp - 0xa6c], 0
mov byte [ebp - 4], 3
call fcn.1011e210
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0xa70]
add esp, 0x14
mov dword [ebp - 0xa70], 0
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvchost
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
mov esi, eax
mov dword [ebp - 0xa64], esi
test esi, esi
je 0x10003526
push str.InstallService_if__ERROR_SUCCESS___rc__1
push 0x101482e4
call fcn.100070c0
add esp, 8
push esi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvchost
push str.RegOpenKeyEx__s__KEY_QUERY_VALUE_error__d.
call fcn.10050870
add esp, 0xc
mov dword [ebp - 0xa80], 0x10148178
lea eax, [ebp - 0xa80]
push 0x10183b00
push eax
call fcn.1011d771
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push eax
call fcn.1011e210
push str.WnPicService
lea eax, [ebp - 0x21c]
push 0x101482e4
push eax
call fcn.1011d6a3
lea ecx, [ebp - 0x21c]
add esp, 0x18
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10003563
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x21c]
push eax
push 7
push 0
push str.WnPicService
push dword [ebp - 0xa70]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0xa70]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push reloc.OLEAUT32.dll_SysReAllocString
call esi
xor ecx, ecx
lea esp, [esp]
movzx eax, word [ecx + str.SYSTEMCurrentControlSetServices_]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x80e], ax
test ax, ax
jne 0x100035b0
lea edi, [ebp - 0x80c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x100035d0
mov ecx, 6
mov dword [ebp - 0xa60], 0
mov esi, str.WnPicService
lea eax, [ebp - 0xa60]
rep movsd dword es:[edi], dword [esi]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0x80c]
movsw word es:[edi], word [esi]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
mov dword [ebp - 0xa64], eax
test eax, eax
jne 0x1000364c
push str.InstallService_if__ERROR_SUCCESS___rc__2
push 0x101482e4
call fcn.100070c0
add esp, 8
call fcn.100030f0
push 0x10183b00
lea eax, [ebp - 0xa84]
mov dword [ebp - 0xa84], str.Svchost_already_install
push eax
call fcn.1011d771
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0xa74], ebx
test ebx, ebx
jne 0x100036bc
lea eax, [ebp - 0xa5c]
push eax
call fcn.10006e50
add esp, 4
cmp dword [ebp - 0xa48], 8
lea eax, [ebp - 0xa5c]
mov byte [ebp - 4], 4
cmovae eax, dword [ebp - 0xa5c]
push eax
push str.InstallService_hscm__NULL
push str._s__________s
call fcn.100070c0
add esp, 0xc
mov dword [ebp - 0xa94], str.OpenSCManager__
lea eax, [ebp - 0xa94]
push 0x10183b00
push eax
call fcn.1011d771
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xa14], ax
lea eax, [ebp - 0xa12]
push eax
call fcn.1011e210
add esp, 0xc
lea eax, [ebp - 0xa14]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0xa14]
push eax
lea ecx, [ebp - 0xa44]
call fcn.10003040
push str._svchost.exe__k
lea ecx, [ebp - 0xa44]
mov byte [ebp - 4], 5
call fcn.100030a0
push str.WnPicService
lea ecx, [ebp - 0xa44]
call fcn.100030a0
cmp dword [ebp - 0xa30], 8
lea eax, [ebp - 0xa44]
push 0
cmovae eax, dword [ebp - 0xa44]
push 0
push 0
push 0
push 0
push eax
push 1
push 2
push 0x20
push 0xf01ff
push 0
push str.WnPicService
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 0xa6c], eax
test eax, eax
jne 0x10003791
push str.InstallService_schService__NULL
push 0x101482e4
call fcn.100070c0
add esp, 8
mov dword [ebp - 0xa7c], 0x10148178
lea eax, [ebp - 0xa7c]
push 0x10183b00
push eax
call fcn.1011d771
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push ebx
call esi
xor ecx, ecx
nop
movzx eax, word [ecx + str.SOFTWARE]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x80e], ax
test ax, ax
jne 0x100037a0
lea eax, [ebp - 0xa60]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0x80c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0xa64], eax
test eax, eax
je 0x10003818
push str.InstallService_ERROR_SUCCESS___rc_3
push 0x101482e4
call fcn.100070c0
add esp, 8
mov dword [ebp - 0xa60], 0
lea eax, [ebp - 0xa78]
mov dword [ebp - 0xa78], 0x10148178
push 0x10183b00
push eax
call fcn.1011d771
lea eax, [ebp - 0xa68]
push eax
push str.WnPicService
push dword [ebp - 0xa60]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov dword [ebp - 0xa64], eax
test eax, eax
je 0x10003867
push str.InstallService_ERROR_SUCCESS___rc_4
push 0x101482e4
call fcn.100070c0
add esp, 8
mov dword [ebp - 0xa88], str.RegCreateKey_PeopleCalendarService_
lea eax, [ebp - 0xa88]
push 0x10183b00
push eax
call fcn.1011d771
lea ecx, [ebp - 0x424]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10003870
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x424]
push eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 2
push 0
push str.ServiceDll
push dword [ebp - 0xa68]
call eax
xor ecx, ecx
movzx eax, word [ecx + str.SYSTEMCurrentControlSetServices_]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x80e], ax
test ax, ax
jne 0x100038a2
lea edi, [ebp - 0x80c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x100038c2
mov ecx, 6
lea eax, [ebp - 0xa60]
mov esi, str.WnPicService
rep movsd dword es:[edi], dword [esi]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0x80c]
movsw word es:[edi], word [esi]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0xa64], eax
test eax, eax
je 0x1000393d
push str.InstallService_ERROR_SUCCESS___rc_5
push 0x101482e4
call fcn.100070c0
add esp, 8
mov dword [ebp - 0xa60], 0
lea eax, [ebp - 0xa90]
mov dword [ebp - 0xa90], 0x10148178
push 0x10183b00
push eax
call fcn.1011d771
xor ecx, ecx
nop
movzx eax, word [ecx + 0x101486c0]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x21e], ax
test ax, ax
jne 0x10003940
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10003960
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x21c]
push eax
push 1
push 0
push str.Description
push dword [ebp - 0xa60]
call esi
xor ecx, ecx
movzx eax, word [ecx + str.WnPicView_Service]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x21e], ax
test ax, ax
jne 0x10003993
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100039b3
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x21c]
push eax
push 1
push 0
push str.DisplayName
push dword [ebp - 0xa60]
call esi
lea eax, [ebp - 0xa68]
push eax
push str.Parameters
push dword [ebp - 0xa60]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, eax
push esi
mov dword [ebp - 0xa64], esi
call edi
test esi, esi
je 0x10003a38
push str.InstallService_ERROR_SUCCESS___rc_6
push 0x101482e4
call fcn.100070c0
add esp, 8
mov dword [ebp - 0xa98], str.RegCreateKey_Parameters_
lea eax, [ebp - 0xa98]
push 0x10183b00
push eax
call fcn.1011d771
lea eax, [ebp - 0x424]
push eax
push str.ServiceDll:__s_
call fcn.100070c0
lea ecx, [ebp - 0x424]
add esp, 8
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10003a55
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x424]
push eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 2
push 0
push str.ServiceDll
push dword [ebp - 0xa68]
call eax
mov esi, eax
push esi
mov dword [ebp - 0xa64], esi
call edi
test esi, esi
je 0x10003ac1
push str.InstallService_ERROR_SUCCESS___rc_7
push 0x101482e4
call fcn.100070c0
add esp, 8
mov dword [ebp - 0xa8c], str.RegSetValueEx_ServiceDll_
lea eax, [ebp - 0xa8c]
push 0x10183b00
push eax
call fcn.1011d771
lea ecx, [ebp - 0xa44]
call fcn.10001b50
jmp 0x10003ae0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 4], 2
call edi
push dword [ebp - 0xa68]
call edi
mov eax, dword [ebp - 0xa6c]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x10003b0f
push eax
call edi
test ebx, ebx
je 0x10003b16
push ebx
call edi
push str.InstallService_End
push 0x101482e4
call fcn.100070c0
add esp, 8
lea ecx, [ebp - 0xa2c]
call fcn.10001b50
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1011d762
mov esp, ebp
pop ebp
ret