Function at 0x10052e5d
Capabilities:
Create service
Modify service

Disassembly:
push 0x154
mov eax, 0x10169297
call fcn.101673d5
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0xb8], edi
mov dword [ebp - 4], ebx
test edi, edi
jne 0x10052ebe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10052e9f
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x10053607
test byte [eax + 0x44], 1
jne 0x100535f3
jmp 0x10053607
xor eax, eax
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], ebx
mov word [ebp - 0x64], ax
lea eax, [ebp - 0x64]
mov byte [ebp - 4], 1
push eax
call fcn.10053a00
push ecx
push ecx
lea ecx, [ebp - 0x160]
call fcn.1004d585
mov esi, 0x1001a4ec
mov byte [ebp - 4], 2
push 1
mov edx, esi
lea ecx, [ebp - 0x150]
call fcn.1004e242
lea edx, [ebp - 0x64]
mov ecx, eax
call fcn.1004e430
mov edx, 0x1001a4e4
mov ecx, eax
call fcn.1004e242
mov ecx, eax
call fcn.1005417c
lea eax, [ebp - 0x9c]
push eax
lea ecx, [ebp - 0x148]
call fcn.1004dead
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x48]
push ebx
xor eax, eax
mov dword [ebp - 0x34], 7
push 0x10018bdc
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
call fcn.100451ec
lea ecx, [ebp - 0x148]
mov byte [ebp - 4], 4
call fcn.1004de6d
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x10052f6c
lea eax, [ebp - 0x48]
cmp dword [ebp - 0x38], 0
mov dword [ebp - 0x10c], ebx
je 0x10052f87
push dword [ebp - 0x38]
lea ecx, [ebp - 0x148]
push eax
call fcn.1004e001
push ebx
push 1
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 3
call fcn.10045637
push 2
mov edx, esi
lea ecx, [ebp - 0x150]
call fcn.1004e242
lea edx, [ebp - 0x64]
mov ecx, eax
call fcn.1004e430
mov edx, 0x1001a4e4
mov ecx, eax
call fcn.1004e242
mov ecx, eax
call fcn.1005417c
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x148]
call fcn.1004dead
cmp dword [ebp - 0x88], 8
mov eax, dword [ebp - 0x9c]
jae 0x10052fe6
lea eax, [ebp - 0x9c]
push ebx
push str.LocalSystem
push str.RpcSs
push ebx
push ebx
push str._SystemRoot__system32_svchost.exe__k_print
push 1
push 3
push 0x120
push sym.PrintConfig.dll_Ordinal_276
push eax
push str.PrintNotify
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
mov dword [ebp - 0xb4], esi
mov byte [ebp - 4], 6
test esi, esi
jne 0x1005354b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0x431
jne 0x1005350a
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x10053060
test byte [eax + 0x44], 0x40
je 0x10053060
push dword [eax + 0x3c]
mov edx, 0x1001a698
push dword [eax + 0x38]
push 0x17
pop ecx
call fcn.1003f5d3
xor ebx, ebx
mov dword [ebp - 0xa8], ebx
mov ecx, str.SYSTEMCurrentControlSetServicesPrintNotifyParameters
mov byte [ebp - 4], 7
xor eax, eax
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x10053084
sub ecx, edx
sar ecx, 1
push ecx
push str.SYSTEMCurrentControlSetServicesPrintNotifyParameters
lea ecx, [ebp - 0x48]
call fcn.100451ec
lea eax, [ebp - 0xa8]
mov byte [ebp - 4], 8
push eax
lea edx, [ebp - 0x48]
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.1005cd60
push ebx
push 1
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 7
call fcn.10045637
push 0xa
xor eax, eax
mov dword [ebp - 0x34], 7
push 0x1001a4f0
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
call fcn.100451ec
push 2
lea eax, [ebp - 0x64]
mov byte [ebp - 4], 9
push eax
lea edx, [ebp - 0x48]
lea ecx, [ebp - 0xa8]
call fcn.1005d507
push ebx
push 1
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 7
call fcn.10045637
mov ecx, str.ServiceMain
mov dword [ebp - 0x18], 7
xor eax, eax
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x10053126
sub ecx, edx
sar ecx, 1
push ecx
push str.ServiceMain
lea ecx, [ebp - 0x2c]
call fcn.100451ec
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x48]
push 0xb
xor eax, eax
mov dword [ebp - 0x34], 7
push 0x1001a508
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
call fcn.100451ec
push 1
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0xb
push eax
lea edx, [ebp - 0x48]
lea ecx, [ebp - 0xa8]
call fcn.1005d507
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.10045637
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.10045637
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x100531cb
test byte [eax + 0x44], 0x40
je 0x100531cb
cmp dword [ebp - 0x50], 8
mov ecx, dword [ebp - 0x64]
jae 0x100531b2
lea ecx, [ebp - 0x64]
push str.ServiceMain
push ecx
push dword [eax + 0x3c]
mov edx, 0x1001a698
push dword [eax + 0x38]
push 0x1b
pop ecx
call fcn.1005285a
mov dword [ebp - 0xa4], ebx
mov edx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvcHost
mov byte [ebp - 4], 0xc
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, bx
jne 0x100531ed
sub edx, ecx
lea ecx, [ebp - 0x2c]
sar edx, 1
push edx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvcHost
call fcn.100451ec
lea eax, [ebp - 0xa4]
mov byte [ebp - 4], 0xd
push eax
lea edx, [ebp - 0x2c]
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.1005cd60
push ebx
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0xc
call fcn.10045637
push dword [ebp - 0xb4]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x3c], ebx
push 0x101a4e6a
push 0x101a4e50
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
call fcn.10056b82
mov ecx, str.print
mov byte [ebp - 4], 0xe
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x1005326e
sub ecx, edx
sar ecx, 1
push ecx
push str.print
lea ecx, [ebp - 0x2c]
call fcn.100451ec
push ecx
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 0xf
push eax
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0xa4]
call fcn.1005d61f
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.10045637
mov dword [ebp - 0xa0], ebx
mov ecx, str.print
mov byte [ebp - 4], 0x10
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x100532cf
sub ecx, edx
sar ecx, 1
push ecx
push str.print
lea ecx, [ebp - 0x2c]
call fcn.100451ec
lea eax, [ebp - 0xa0]
mov byte [ebp - 4], 0x11
mov ecx, dword [ebp - 0xa4]
lea edx, [ebp - 0x2c]
push eax
call fcn.1005cd60
push ebx
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0x10
call fcn.10045637
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x1005333e
test byte [eax + 0x44], 0x40
je 0x1005333e
push 0x1001a520
push dword [eax + 0x3c]
mov edx, 0x1001a698
push dword [eax + 0x38]
push 0x1c
pop ecx
call fcn.1003f5f1
push 0x1a
xor eax, eax
mov dword [ebp - 0x18], 7
push 0x1001a52c
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
call fcn.100451ec
push 0x3020
lea edx, [ebp - 0x2c]
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0xa0]
call fcn.1005d6fe
push ebx
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0x10
call fcn.10045637
push 0x19
xor eax, eax
mov dword [ebp - 0x18], 7
push 0x1001a564
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
call fcn.100451ec
push 1
lea edx, [ebp - 0x2c]
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0xa0]
call fcn.1005d6fe
push ebx
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0x10
call fcn.10045637
push 0x13
xor eax, eax
mov dword [ebp - 0x18], 7
push 0x1001a598
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
call fcn.100451ec
push 5
lea edx, [ebp - 0x2c]
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0xa0]
call fcn.1005d6fe
push ebx
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0x10
call fcn.10045637
push 0x12
xor eax, eax
mov dword [ebp - 0x18], 7
push 0x1001a5c0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
call fcn.100451ec
push 3
lea edx, [ebp - 0x2c]
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0xa0]
call fcn.1005d6fe
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.10045637
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x1005346a
test byte [eax + 0x44], 0x40
je 0x1005346a
push dword [eax + 0x3c]
mov edx, 0x1001a698
push dword [eax + 0x38]
push 0x1d
pop ecx
call fcn.1003f5d3
cmp dword [ebp - 0xa0], 0
je 0x10053485
push dword [ebp - 0xa0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0xa0], ebx
lea ecx, [ebp - 0x3c]
call fcn.10044371
cmp dword [ebp - 0xa4], 0
je 0x100534a8
push dword [ebp - 0xa4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0xa4], ebx
cmp dword [ebp - 0xa8], 0
je 0x100534c3
push dword [ebp - 0xa8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0xa8], ebx
test esi, esi
je 0x100534ce
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
push 1
lea ecx, [ebp - 0x80]
call fcn.10045637
push ebx
push 1
lea ecx, [ebp - 0x9c]
call fcn.10045637
lea ecx, [ebp - 0x160]
call fcn.1004b9c1
push ebx
push 1
lea ecx, [ebp - 0x64]
call fcn.10045637
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.10167384
ret
test ebx, ebx
jle 0x10053519
movzx ebx, bx
or ebx, 0x80070000
test ebx, ebx
jns 0x10053060
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x10053545
test byte [eax + 0x44], 1
je 0x10053545
push ebx
push dword [eax + 0x3c]
mov edx, 0x1001a698
push dword [eax + 0x38]
push 0x18
pop ecx
call fcn.1003f754
push ebx
jmp 0x10053608
cmp dword [ebp - 0x6c], 8
mov eax, dword [ebp - 0x80]
jae 0x10053557
lea eax, [ebp - 0x80]
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0xac]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x100535c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10053586
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x100535ac
test byte [eax + 0x44], 1
je 0x100535ac
push esi
push dword [eax + 0x3c]
mov edx, 0x1001a698
push dword [eax + 0x38]
push 0x19
pop ecx
call fcn.1003f754
push esi
lea ecx, [ebp - 0xb0]
call fcn.1003ecfb
push 0x10196090
mov eax, ecx
jmp 0x1005361a
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x10053062
test byte [eax + 0x44], 0x40
je 0x10053062
push dword [eax + 0x3c]
mov edx, 0x1001a698
push dword [eax + 0x38]
push 0x1a
pop ecx
call fcn.1003f5d3
jmp 0x10053062
push esi
push dword [eax + 0x3c]
mov edx, 0x1001a698
push dword [eax + 0x38]
push 0x16
pop ecx
call fcn.1003f754
push esi
lea ecx, [ebp - 0xac]
call fcn.1003ecfb
push 0x10196090
mov eax, ecx
push eax
call sub.msvcrt.dll__CxxThrowException
int3