Function at 0x10002270
Capabilities:
Create service
Modify service
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10023eb8
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x10031008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x34], edx
mov ebx, ecx
mov dword [ebp - 0x38], ebx
mov ecx, dword [ebp + 0x10]
xor esi, esi
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x48], ecx
mov ecx, dword [ebp + 0x20]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x2c], ecx
test eax, eax
jne 0x100022d5
lea eax, [esi + 0x57]
jmp 0x1000262c
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x100022f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1000262c
push 0
push 0
push dword [ebp - 0x3c]
push 0
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push 1
push edi
push dword [ebp - 0x34]
push 0xf01ff
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
jne 0x10002648
cmp dword [0x100317e0], esi
je 0x10002415
push eax
mov ecx, 0x100317e0
call fcn.1001ed30
mov eax, dword [0x100317e0]
cmp byte [eax + 0x54], 0
je 0x10002415
cmp dword [eax + 0x58], 2
jb 0x10002415
mov bl, byte [eax + 0x5c]
xor eax, eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x38]
lea eax, [ebp - 0x28]
push str.CreateService__s__error.__d_
push eax
call fcn.1001ffc0
add esp, 0x10
lea eax, [ebp - 0x28]
mov ecx, 0x100317e0
push 0xe4
push 0x10028744
push 0x10028744
push eax
push 2
call fcn.1001fa50
test bl, bl
je 0x100023bb
lea eax, [ebp - 0x28]
mov ecx, 0x100317e0
push eax
call fcn.1001fdf0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x100023fe
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100023f4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100023f4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002251a
add esp, 8
mov ebx, dword [ebp - 0x38]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
push dword [ebp - 0x2c]
mov edx, ebx
push dword [ebp - 0x48]
push dword [ebp + 0x18]
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push ecx
push dword [ebp - 0x30]
mov ecx, ebx
push dword [ebp - 0x34]
call fcn.10002020
add esp, 0x24
test eax, eax
jne 0x10002523
push 2
mov ecx, 0x100317e0
call fcn.1001fa10
mov edi, eax
test edi, edi
je 0x10002523
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
lea eax, [ebp - 0x28]
push str.RKCreateService__s__error.__d_
push eax
call fcn.1001ffc0
add esp, 0x10
lea eax, [ebp - 0x28]
mov ecx, 0x100317e0
push 0xf4
push 0x10028744
push 0x10028744
push eax
push 2
call fcn.1001fa50
cmp edi, 1
jbe 0x100024cc
lea eax, [ebp - 0x28]
mov ecx, 0x100317e0
push eax
call fcn.1001fdf0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x1000250f
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10002505
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10002505
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002251a
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
push 0xf01ff
push ebx
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x10002648
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 3
mov ecx, 0x100317e0
mov esi, eax
call fcn.1001fa10
mov edi, eax
test edi, edi
je 0x1000261f
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 2
lea eax, [ebp - 0x28]
push esi
push ebx
push str.OpenService__s__error.__d_
push eax
call fcn.1001ffc0
add esp, 0x10
lea eax, [ebp - 0x28]
mov ecx, 0x100317e0
push 0xfb
push 0x10028744
push 0x10028744
push eax
push 3
call fcn.1001fa50
cmp edi, 1
jbe 0x100025c8
lea eax, [ebp - 0x28]
mov ecx, 0x100317e0
push eax
call fcn.1001fdf0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x1000260b
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10002601
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10002601
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002251a
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x4c]
call edi
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 - 0x10]
xor ecx, ebp
call fcn.100224d9
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x10002654
push dword [ebp - 0x2c]
call eax
cmp dword [ebp - 0x30], 3
je 0x10002865
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x10002674
xor esi, esi
jmp 0x10002865
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x420
jne 0x1000268b
xor esi, esi
jmp 0x10002865
cmp esi, 0x430
jne 0x1000269a
xor esi, esi
jmp 0x10002865
cmp esi, 0x422
jne 0x10002865
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 1
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
je 0x100027b4
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x100026e1
xor esi, esi
jmp 0x10002865
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 3
mov ecx, 0x100317e0
mov esi, eax
call fcn.1001fa10
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x10002865
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 3
lea eax, [ebp - 0x28]
push esi
push ebx
push str.StartService2__s__error.__d_
push eax
call fcn.1001ffc0
add esp, 0x10
lea eax, [ebp - 0x28]
mov ecx, 0x100317e0
push 0x125
push 0x10028744
push 0x10028744
push eax
push 3
call fcn.1001fa50
cmp dword [ebp - 0x2c], 1
jbe 0x1000276f
lea eax, [ebp - 0x28]
mov ecx, 0x100317e0
push eax
call fcn.1001fdf0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x10002855
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1000284b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1000284b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, 0x100317e0
xor eax, eax
cmp esi, 0x430
push 3
cmove esi, eax
call fcn.1001fa10
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x10002865
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 4
lea eax, [ebp - 0x28]
push esi
push dword [ebp - 0x30]
push ebx
push str.ChangeServiceConfig__s__StartType:_d__error.__d_
push eax
call fcn.1001ffc0
add esp, 0x14
lea eax, [ebp - 0x28]
mov ecx, 0x100317e0
push 0x130
push 0x10028744
push 0x10028744
push eax
push 3
call fcn.1001fa50
cmp dword [ebp - 0x2c], 1
jbe 0x1000276f
jmp 0x10002761
push edx
push ecx
call fcn.1002251a
add esp, 8
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 0x18], eax
test edi, edi
je 0x1000261f
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
jmp 0x10002625