Function at 0x402450
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565358
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5c2f60]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], ecx
call fcn.00405c10
mov edi, eax
mov dword [ebp - 0x18], edi
test edi, edi
je 0x402858
mov ebx, dword [edi]
mov ecx, dword [ebx - 0x10]
lea esi, [ebx - 0x10]
mov edx, dword [ecx]
call dword [edx + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x4024b1
cmp ecx, dword [esi]
jne 0x4024b1
lock inc dword [eax]
jmp 0x4024de
mov eax, dword [ecx]
lea edi, [esi + 4]
push 2
push dword [edi]
call dword [eax]
mov esi, eax
test esi, esi
je 0x40286c
mov eax, dword [edi]
lea ecx, [esi + 0x10]
mov dword [esi + 4], eax
mov edx, dword [edi]
inc edx
push edx
push ebx
call fcn.004036d0
mov edi, dword [ebp - 0x18]
add esp, 8
add esi, 0x10
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0
mov edx, dword [esi - 0xc]
test edx, edx
js 0x402871
mov eax, dword [esi - 8]
mov ebx, 1
mov ecx, ebx
sub eax, edx
sub ecx, dword [esi - 4]
or eax, ecx
jge 0x402515
push edx
lea ecx, [ebp - 0x14]
call fcn.00403860
mov esi, dword [ebp - 0x14]
push dword [esi - 8]
push esi
call fcn.005476ad
add esp, 8
test eax, eax
js 0x402871
cmp eax, dword [esi - 8]
jg 0x402871
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [edi + 4]
mov ecx, dword [eax - 0x10]
lea edi, [eax - 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
mov ecx, eax
lea eax, [edi + 0xc]
jl 0x402560
cmp ecx, dword [edi]
jne 0x402560
lock inc dword [eax]
jmp 0x402591
mov eax, dword [ecx]
lea ebx, [edi + 4]
push 2
push dword [ebx]
call dword [eax]
mov edi, eax
test edi, edi
je 0x40287b
mov eax, dword [ebx]
lea ecx, [edi + 0x10]
mov dword [edi + 4], eax
mov edx, dword [ebx]
inc edx
push edx
push dword [ebp - 0x20]
call fcn.004036d0
add esp, 8
mov ebx, 1
add edi, 0x10
mov dword [ebp - 0x10], edi
mov byte [ebp - 4], 1
mov edx, dword [edi - 0xc]
test edx, edx
js 0x402880
mov eax, dword [edi - 8]
mov ecx, ebx
sub ecx, dword [edi - 4]
sub eax, edx
or eax, ecx
jge 0x4025c0
push edx
lea ecx, [ebp - 0x10]
call fcn.00403860
mov edi, dword [ebp - 0x10]
push dword [edi - 8]
push edi
call fcn.005476ad
add esp, 8
test eax, eax
js 0x402871
cmp eax, dword [edi - 8]
jg 0x402871
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 8]
mov ecx, dword [eax - 0x10]
lea edi, [eax - 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
mov ecx, eax
lea eax, [edi + 0xc]
jl 0x40260e
cmp ecx, dword [edi]
jne 0x40260e
lock inc dword [eax]
jmp 0x40263f
mov eax, dword [ecx]
lea ebx, [edi + 4]
push 2
push dword [ebx]
call dword [eax]
mov edi, eax
test edi, edi
je 0x40288a
mov eax, dword [ebx]
lea ecx, [edi + 0x10]
mov dword [edi + 4], eax
mov edx, dword [ebx]
inc edx
push edx
push dword [ebp - 0x20]
call fcn.004036d0
add esp, 8
mov ebx, 1
add edi, 0x10
mov dword [ebp - 0x18], edi
mov byte [ebp - 4], 2
mov ecx, dword [edi - 0xc]
test ecx, ecx
js 0x40288f
mov eax, dword [edi - 8]
sub ebx, dword [edi - 4]
sub eax, ecx
or eax, ebx
jge 0x40266c
push ecx
lea ecx, [ebp - 0x18]
call fcn.00403860
mov edi, dword [ebp - 0x18]
push dword [edi - 8]
push edi
call fcn.005476ad
add esp, 8
test eax, eax
js 0x402871
cmp eax, dword [edi - 8]
jg 0x402871
xor ecx, ecx
mov dword [edi - 0xc], eax
push 5
push ecx
push ecx
mov word [edi + eax*2], cx
mov dword [ebp - 0x1c], ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x4026f9
push 1
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x4026c4
push eax
mov dword [ebp - 0x1c], 1
call ebx
push dword [ebp - 0x20]
call ebx
cmp dword [ebp - 0x1c], 0
je 0x4026f9
cmp dword [ebp - 0x24], 2
jle 0x4026f2
mov edx, dword [ebp - 0x28]
mov edx, dword [edx + 8]
movzx eax, word [edx]
cmp eax, 0x2d
je 0x4026e8
cmp eax, 0x2f
jne 0x4026f2
add edx, 2
mov ecx, esi
call fcn.00405600
xor bl, bl
jmp 0x4027ec
sub esp, 0x14
mov edx, edi
mov ecx, esi
call fcn.00405910
add esp, 0x14
mov dword [ebp - 0x20], 0
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x402740
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
push eax
push 0x5a60e8
call fcn.00404cf0
add esp, 8
jmp 0x4027c6
push eax
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x4027b7
push 2
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ecx, eax
mov dword [ebp - 0x24], ecx
test ecx, ecx
jne 0x40277b
call ebx
push eax
push 0x5a6188
call fcn.00404cf0
add esp, 8
jmp 0x4027b7
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x4027a5
call ebx
push eax
push str.ChangeServiceConfig2_failed_w_err_0x_08lx_n
call fcn.00404cf0
add esp, 8
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x20], 0
jne 0x4027d8
call ebx
push eax
push 0x5a5a40
call fcn.00403c90
add esp, 8
jmp 0x4027e5
push str.Service_Install_Success
call fcn.00403c90
add esp, 4
call fcn.00405d50
mov bl, 1
lea edx, [edi - 0x10]
mov byte [ebp - 4], 1
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40280a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x402828
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x402844
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00403810
push 0x80070057
call fcn.004037f0
call fcn.00403810
push 0x80070057
call fcn.004037f0
call fcn.00403810
push 0x80070057
call fcn.004037f0
int3