Function at 0xa1d40
Capabilities:
Check os version
Create service
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1743bd
mov eax, dword fs:[0]
push eax
sub esp, 0x4d8
mov eax, dword [0x1a700c]
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 eax, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 0x4bc], eax
xor eax, eax
mov dword [ebp - 0x4b4], eax
mov dword [ebp - 0x4c4], eax
mov dword [ebp - 0x4d0], eax
mov dword [ebp - 0x4c0], eax
mov dword [ebp - 0x4b0], esi
call fcn.000a1b00
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0xa1db5
push 0x80004005
call fcn.000a1860
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x4c8], ebx
mov dword [ebp - 4], 0
call fcn.000a1b00
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0xa1de8
push 0x80004005
call fcn.000a1860
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x4cc], edi
mov byte [ebp - 4], 1
call fcn.000a1b00
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0xa1e18
push 0x80004005
call fcn.000a1860
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x4d4], eax
mov edx, dword [ebp - 0x4bc]
push ecx
mov ecx, dword [ebp + 8]
mov byte [ebp - 4], 2
call fcn.000a1be0
add esp, 4
cmp eax, 0xffffffff
je 0xa2274
mov edi, dword [ebp - 0x4bc]
xor ebx, ebx
nop
add eax, 0xffffff9f
cmp eax, 0x15
ja case.0xa1e63.98
movzx eax, byte [eax + 0xa2500]
jmp dword [eax*4 + 0xa24dc]
mov ebx, dword [0x1aa1ec]
jmp case.0xa1e63.98
mov esi, dword [0x1aa1ec]
mov dword [ebp - 0x4b0], esi
jmp 0xa1f2b
mov dword [0x1aa1f8], 1
jmp case.0xa1e63.98
mov eax, dword [0x1aa1ec]
mov dword [ebp - 0x4d0], eax
jmp case.0xa1e63.98
mov eax, dword [0x1aa1ec]
mov dword [ebp - 0x4c4], eax
jmp case.0xa1e63.98
mov eax, dword [0x1aa1ec]
mov dword [ebp - 0x4c0], eax
jmp case.0xa1e63.98
mov eax, dword [0x1aa1ec]
mov dword [ebp - 0x4b4], eax
jmp case.0xa1e63.98
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x104
mov esi, eax
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.00153d90
add esp, 0xc
lea eax, [ebp - 0x114]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x4d4]
push str._s.log
push eax
call fcn.000a3710
mov eax, dword [ebp - 0x4d4]
add esp, 0xc
mov dword [0x1aa1f4], eax
mov esi, dword [ebp - 0x4b0]
push ecx
mov ecx, dword [ebp + 8]
mov edx, edi
call fcn.000a1be0
add esp, 4
cmp eax, 0xffffffff
jne 0xa1e50
mov edi, dword [ebp - 0x4cc]
test ebx, ebx
mov dword [ebp - 0x4b8], ebx
mov ebx, dword [ebp - 0x4c8]
je 0xa21a0
call fcn.000a1b00
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0xa1f78
push 0x80004005
call fcn.000a1860
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x4b0], esi
push 0x104
lea eax, [ebp - 0x320]
mov byte [ebp - 4], 3
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0xa2167
lea ecx, [ebp - 0x320]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0xa1fb1
sub ecx, edx
lea eax, [ebp - 0x320]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x4b0]
call fcn.000a3280
push 5
push str.__v__
lea ecx, [ebp - 0x4b0]
call fcn.000a3280
mov edx, dword [ebp - 0x4b8]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0xa1ff0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x4b0]
call fcn.000a3280
push 1
push 0x17ba4c
lea ecx, [ebp - 0x4b0]
call fcn.000a3280
mov esi, dword [ebp - 0x4c0]
test esi, esi
je 0xa2046
push 4
push 0x17ba50
lea ecx, [ebp - 0x4b0]
call fcn.000a3280
push esi
lea ecx, [ebp - 0x4b0]
call fcn.000a2ff0
cmp dword [0x1aa1f8], 0
je 0xa2061
push 3
push 0x17ba5c
lea ecx, [ebp - 0x4b0]
call fcn.000a3280
mov esi, dword [ebp - 0x4d0]
test esi, esi
je 0xa2089
push 4
push str.__k
lea ecx, [ebp - 0x4b0]
call fcn.000a3280
push esi
lea ecx, [ebp - 0x4b0]
call fcn.000a2ff0
mov esi, dword [ebp - 0x4c4]
test esi, esi
je 0xa20b1
push 4
push str.__s
lea ecx, [ebp - 0x4b0]
call fcn.000a3280
push esi
lea ecx, [ebp - 0x4b0]
call fcn.000a2ff0
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x4bc], eax
test eax, eax
je 0xa214e
mov esi, dword [ebp - 0x4b0]
mov ecx, dword [ebp - 0x4b8]
push 0
push 0
push 0
push 0
push 0
push esi
push 1
push 3
push 0x10
push 0xf01ff
push ecx
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 0x4b4], eax
test eax, eax
jne 0xa2120
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x4b8]
push eax
push edx
push str.Error_creating_windows_service__s__error_code__lu.
call fcn.000a3900
add esp, 0xc
jmp 0xa2134
mov edx, dword [ebp - 0x4b8]
push edx
push str.Service__s_created_successfully.
call fcn.000a3900
add esp, 8
push dword [ebp - 0x4b4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x4bc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0xa217b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_opening_service_manager__error_code__lu.
call fcn.000a3900
mov esi, dword [ebp - 0x4b0]
jmp 0xa2178
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_getting_path_value__error_code__lu.
call fcn.000a3900
add esp, 8
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0xa2460
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0xa2460
test esi, esi
je 0xa2274
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x4b4], eax
test eax, eax
je 0xa225b
push 0x10000
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0xa223c
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0xa220c
push dword [ebp - 0x4b0]
push str.Service__s_deleted_succesfully.
call fcn.000a3900
add esp, 8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x4b4]
call esi
jmp 0xa2460
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x4b0]
push str.Unable_to_delete_service__s__error_code__lu.
call fcn.000a3900
add esp, 0xc
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x4b4]
call esi
jmp 0xa2460
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x4b0]
push str.Unable_to_open_service__s__error_code__lu.
call fcn.000a3900
add esp, 0xc
jmp 0xa2460
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Unable_to_open_service_manager__error_code__lu.
call fcn.000a3900
add esp, 8
jmp 0xa2460
mov esi, dword [ebp - 0x4c0]
lea eax, [ebp - 0x4c8]
push esi
push str.:_s_sub
push eax
call fcn.000a15a0
mov esi, dword [ebp - 0x4c4]
lea eax, [ebp - 0x4cc]
push esi
push str._s_lm
push eax
call fcn.000a15a0
mov ebx, dword [ebp - 0x4b4]
add esp, 0x18
test ebx, ebx
jne 0xa22b5
xor ecx, ecx
jmp 0xa22cf
mov ecx, ebx
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0xa22c0
sub ecx, edx
sar ecx, 1
push ecx
push ebx
call fcn.000a31c0
mov ebx, dword [ebp - 0x4c8]
lea eax, [ebp - 0x4a8]
push 3
push ebx
lea ecx, [ebp - 0x4ac]
mov dword [ebp - 0x4ac], eax
call fcn.000a3350
mov byte [ebp - 4], 4
lea eax, [ebp - 0x424]
mov edi, dword [ebp - 0x4cc]
lea ecx, [ebp - 0x428]
push 3
push edi
mov dword [ebp - 0x428], eax
call fcn.000a3350
mov esi, dword [ebp - 0x4d0]
lea eax, [ebp - 0x3a0]
push 3
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x3a4]
push esi
mov dword [ebp - 0x3a4], eax
call fcn.000a3350
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x4ac]
test edx, edx
jne 0xa2350
xor ecx, ecx
jmp 0xa235e
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0xa2355
sub ecx, esi
push ecx
push edx
mov ecx, 0x1aa228
call fcn.000a3050
mov edx, dword [ebp - 0x428]
test edx, edx
jne 0xa2378
xor ecx, ecx
jmp 0xa2389
mov ecx, edx
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0xa2380
sub ecx, esi
push ecx
push edx
mov ecx, 0x1aa22c
call fcn.000a3050
mov edx, dword [ebp - 0x3a4]
test edx, edx
jne 0xa23a3
xor ecx, ecx
jmp 0xa23b1
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0xa23a8
sub ecx, esi
push ecx
push edx
mov ecx, 0x1aa230
call fcn.000a3050
call dword [sym.imp.KERNEL32.dll_GetVersion]
movzx ecx, al
shr eax, 8
movzx eax, al
cmp ecx, 5
jne 0xa23d5
test eax, eax
je 0xa23e0
push 0xa13a0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [ebp - 0x4e4]
mov dword [ebp - 0x4e4], 0x17a9b4
push eax
mov dword [ebp - 0x4e0], 0xa2520
mov dword [ebp - 0x4dc], 0
mov dword [ebp - 0x4d8], 0
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
mov eax, dword [ebp - 0x3a4]
lea ecx, [ebp - 0x3a0]
cmp eax, ecx
je 0xa242e
push eax
call fcn.00158d47
add esp, 4
mov eax, dword [ebp - 0x428]
lea ecx, [ebp - 0x424]
cmp eax, ecx
je 0xa2447
push eax
call fcn.00158d47
add esp, 4
mov eax, dword [ebp - 0x4ac]
lea ecx, [ebp - 0x4a8]
cmp eax, ecx
je 0xa2460
push eax
call fcn.00158d47
add esp, 4
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov edx, dword [ebp - 0x4d4]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0xa2484
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0xa249f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add ebx, 0xfffffff0
lock xadd dword [ebx + 0xc], esi
dec esi
test esi, esi
jg 0xa24bb
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
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.00150cb2
mov esp, ebp
pop ebp
ret