Function at 0x402ea0
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56d208
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x618f60]
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.004072b0
mov edi, eax
mov dword [ebp - 0x18], edi
test edi, edi
je 0x4032a8
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 0x402f01
cmp ecx, dword [esi]
jne 0x402f01
lock inc dword [eax]
jmp 0x402f2e
mov eax, dword [ecx]
lea edi, [esi + 4]
push 2
push dword [edi]
call dword [eax]
mov esi, eax
test esi, esi
je 0x4032bc
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.00404120
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 0x4032c1
mov eax, dword [esi - 8]
mov ebx, 1
mov ecx, ebx
sub eax, edx
sub ecx, dword [esi - 4]
or eax, ecx
jge 0x402f65
push edx
lea ecx, [ebp - 0x14]
call fcn.004042b0
mov esi, dword [ebp - 0x14]
push dword [esi - 8]
push esi
call fcn.0054c7d1
add esp, 8
test eax, eax
js 0x4032c1
cmp eax, dword [esi - 8]
jg 0x4032c1
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 0x402fb0
cmp ecx, dword [edi]
jne 0x402fb0
lock inc dword [eax]
jmp 0x402fe1
mov eax, dword [ecx]
lea ebx, [edi + 4]
push 2
push dword [ebx]
call dword [eax]
mov edi, eax
test edi, edi
je 0x4032cb
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.00404120
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 0x4032d0
mov eax, dword [edi - 8]
mov ecx, ebx
sub ecx, dword [edi - 4]
sub eax, edx
or eax, ecx
jge 0x403010
push edx
lea ecx, [ebp - 0x10]
call fcn.004042b0
mov edi, dword [ebp - 0x10]
push dword [edi - 8]
push edi
call fcn.0054c7d1
add esp, 8
test eax, eax
js 0x4032c1
cmp eax, dword [edi - 8]
jg 0x4032c1
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 0x40305e
cmp ecx, dword [edi]
jne 0x40305e
lock inc dword [eax]
jmp 0x40308f
mov eax, dword [ecx]
lea ebx, [edi + 4]
push 2
push dword [ebx]
call dword [eax]
mov edi, eax
test edi, edi
je 0x4032da
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.00404120
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 0x4032df
mov eax, dword [edi - 8]
sub ebx, dword [edi - 4]
sub eax, ecx
or eax, ebx
jge 0x4030bc
push ecx
lea ecx, [ebp - 0x18]
call fcn.004042b0
mov edi, dword [ebp - 0x18]
push dword [edi - 8]
push edi
call fcn.0054c7d1
add esp, 8
test eax, eax
js 0x4032c1
cmp eax, dword [edi - 8]
jg 0x4032c1
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 0x403149
push 1
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x403114
push eax
mov dword [ebp - 0x1c], 1
call ebx
push dword [ebp - 0x20]
call ebx
cmp dword [ebp - 0x1c], 0
je 0x403149
cmp dword [ebp - 0x24], 2
jle 0x403142
mov edx, dword [ebp - 0x28]
mov edx, dword [edx + 8]
movzx eax, word [edx]
cmp eax, 0x2d
je 0x403138
cmp eax, 0x2f
jne 0x403142
add edx, 2
mov ecx, esi
call fcn.00406ca0
xor bl, bl
jmp 0x40323c
sub esp, 0x14
mov edx, edi
mov ecx, esi
call fcn.00406fb0
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 0x403190
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
push eax
push 0x5fc3d8
call fcn.00406250
add esp, 8
jmp 0x403216
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 0x403207
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 0x4031cb
call ebx
push eax
push 0x5fc478
call fcn.00406250
add esp, 8
jmp 0x403207
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 0x4031f5
call ebx
push eax
push str.ChangeServiceConfig2_failed_w_err_0x_08lx_n
call fcn.00406250
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 0x403228
call ebx
push eax
push 0x5fbc28
call fcn.004046e0
add esp, 8
jmp 0x403235
push str.Service_Install_Success
call fcn.004046e0
add esp, 4
call fcn.004073f0
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 0x40325a
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 0x403278
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 0x403294
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.00404260
push 0x80070057
call fcn.00404240
call fcn.00404260
push 0x80070057
call fcn.00404240
call fcn.00404260
push 0x80070057
call fcn.00404240
int3