Function at 0x42dda0
Capabilities:
Modify service
Query service configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff54
push ebx
push esi
push edi
mov dword [ebp - 0x74], eax
mov eax, 0x4bfccc
call fcn.00497a7c
xor edx, edx
mov dword [ebp - 0x78], edx
xor ecx, ecx
mov dword [ebp - 0x7c], ecx
mov byte [ebp - 0x81], 1
mov word [ebp - 0x60], 8
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0x78], eax
push 0xf01ff
push 0x4bf79f
push dword [ebp - 0x78]
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
jne 0x42de5c
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 0x424
jne 0x42de19
mov byte [ebp - 0x81], 0
jmp 0x42e040
push 0x10
mov ecx, 0x4bf7e0
mov edx, 0x4bf7ae
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
call fcn.00497b24
xor eax, eax
push eax
xor edx, edx
mov dword [ebp - 0x54], edx
lea ecx, [ebp - 0x70]
push ecx
call sub.CC3260MT.DLL___Return_unwind
pop ecx
pop eax
jmp 0x42e322
xor edx, edx
mov dword [ebp - 0x8c], edx
mov word [ebp - 0x60], 8
push 0x1000
push 0x40
call sub.kernel32.dll_LocalAlloc
mov dword [ebp - 0x8c], eax
lea ecx, [ebp - 0x88]
push ecx
push 0x1000
push dword [ebp - 0x8c]
push dword [ebp - 0x7c]
call sub.advapi32.dll_QueryServiceConfigA
mov word [ebp - 0x60], 0x20
mov eax, dword [ebp - 0x8c]
mov edx, dword [eax + 0xc]
lea eax, [ebp - 0xc]
call fcn.00497bd0
inc dword [ebp - 0x54]
mov word [ebp - 0x60], 0x14
mov word [ebp - 0x60], 0x2c
lea eax, [ebp - 0x14]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x54]
mov ecx, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [ecx]
call sub.vcl60.bpl__Forms_TApplication_GetExeName_qqrv
lea edx, [ebp - 0x14]
push dword [edx]
lea eax, [ebp - 0x18]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x54]
pop eax
call sub.rtl60.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x10]
call fcn.00402a14
push eax
inc dword [ebp - 0x54]
mov edx, 0x4bf7e5
lea eax, [ebp - 0x1c]
call fcn.00497bd0
inc dword [ebp - 0x54]
lea edx, [ebp - 0x1c]
pop ecx
pop eax
call fcn.00497e78
dec dword [ebp - 0x54]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00497e20
mov word [ebp - 0x60], 0x14
mov word [ebp - 0x60], 0x38
lea eax, [ebp - 0x20]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x54]
mov eax, dword [ebp - 0xc]
call sub.rtl60.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x24]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x54]
pop eax
call fcn.004980b8
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x28]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x54]
lea eax, [ebp - 0x10]
call fcn.004980b8
lea edx, [ebp - 0x28]
pop eax
call fcn.00498094
test eax, eax
setle dl
and edx, 1
push edx
dec dword [ebp - 0x54]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.00497e20
pop ecx
test cl, cl
jne 0x42e01a
mov al, 1
push eax
dec dword [ebp - 0x54]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00497e20
pop eax
push eax
xor edx, edx
mov dword [ebp - 0x54], edx
lea ecx, [ebp - 0x70]
push ecx
call sub.CC3260MT.DLL___Return_unwind
pop ecx
pop eax
jmp 0x42e322
dec dword [ebp - 0x54]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00497e20
mov word [ebp - 0x60], 8
mov word [ebp - 0x60], 0
cmp dword [ebp - 0x7c], 0
je 0x42e054
push dword [ebp - 0x7c]
call sub.advapi32.dll_CloseServiceHandle
cmp dword [ebp - 0x78], 0
je 0x42e062
push dword [ebp - 0x78]
call sub.advapi32.dll_CloseServiceHandle
cmp word [ebp - 0x5e], 0
je 0x42e06a
ret
mov word [ebp - 0x60], 0x50
lea eax, [ebp - 0x2c]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x54]
mov ecx, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [ecx]
call sub.vcl60.bpl__Forms_TApplication_GetExeName_qqrv
lea edx, [ebp - 0x2c]
push dword [edx]
lea eax, [ebp - 0x30]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x54]
pop eax
call sub.rtl60.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea edx, [ebp - 0x30]
push edx
lea eax, [ebp - 4]
call fcn.00402a14
push eax
inc dword [ebp - 0x54]
mov edx, 0x4bf7f0
lea eax, [ebp - 0x34]
call fcn.00497bd0
inc dword [ebp - 0x54]
lea edx, [ebp - 0x34]
pop ecx
pop eax
call fcn.00497e78
dec dword [ebp - 0x54]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.00497e20
mov word [ebp - 0x60], 0x44
mov word [ebp - 0x60], 0x5c
lea eax, [ebp - 8]
call fcn.00402a14
inc dword [ebp - 0x54]
mov word [ebp - 0x60], 0x44
mov eax, dword [ebp - 4]
call sub.rtl60.bpl__Sysutils_SetCurrentDir_qqrx17System_AnsiString
cmp byte [ebp - 0x81], 0
je 0x42e1be
mov word [ebp - 0x60], 0x68
lea eax, [ebp - 0x38]
call fcn.00402a14
mov ecx, eax
inc dword [ebp - 0x54]
lea edx, [ebp - 4]
mov eax, 0x4bf7fa
call fcn.004982ac
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x40]
call fcn.00402a14
push eax
inc dword [ebp - 0x54]
mov edx, 0x4bf7fc
lea eax, [ebp - 0x3c]
call fcn.00497bd0
inc dword [ebp - 0x54]
lea edx, [ebp - 0x3c]
pop ecx
pop eax
call fcn.00497e78
lea edx, [ebp - 0x40]
lea eax, [ebp - 8]
call fcn.00497e50
dec dword [ebp - 0x54]
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.00497e20
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x74]
call fcn.0042dc80
mov word [ebp - 0x60], 0x74
lea eax, [ebp - 0x44]
call fcn.00402a14
mov ecx, eax
inc dword [ebp - 0x54]
lea edx, [ebp - 4]
mov eax, 0x4bf814
call fcn.004982ac
lea edx, [ebp - 0x44]
push edx
lea eax, [ebp - 0x4c]
call fcn.00402a14
push eax
inc dword [ebp - 0x54]
mov edx, 0x4bf816
lea eax, [ebp - 0x48]
call fcn.00497bd0
inc dword [ebp - 0x54]
lea edx, [ebp - 0x48]
pop ecx
pop eax
call fcn.00497e78
lea edx, [ebp - 0x4c]
lea eax, [ebp - 8]
call fcn.00497e50
dec dword [ebp - 0x54]
lea eax, [ebp - 0x4c]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0x48]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.00497e20
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x74]
call fcn.0042dc80
mov word [ebp - 0x60], pe_nt_image_headers32
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0x78], eax
push 0xf01ff
push 0x4bf82c
push dword [ebp - 0x78]
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
je 0x42e2bf
mov ecx, dword [sym.servercontrol.exe__SdServerForm]
mov eax, dword [ecx]
mov eax, dword [eax + 0x3b0]
mov edx, dword [eax]
call dword [edx + 0xc4]
test al, al
je 0x42e2b6
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push dword [ebp - 0x7c]
call sub.advapi32.dll_ChangeServiceConfigA
mov byte [ebp - 0x8d], 1
jmp 0x42e2c6
mov byte [ebp - 0x8d], 0
mov word [ebp - 0x60], 0x44
cmp dword [ebp - 0x7c], 0
je 0x42e2da
push dword [ebp - 0x7c]
call sub.advapi32.dll_CloseServiceHandle
cmp dword [ebp - 0x78], 0
je 0x42e2e8
push dword [ebp - 0x78]
call sub.advapi32.dll_CloseServiceHandle
cmp word [ebp - 0x5e], 0
je 0x42e2f0
ret
mov al, byte [ebp - 0x8d]
push eax
dec dword [ebp - 0x54]
lea eax, [ebp - 8]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x54]
lea eax, [ebp - 4]
mov edx, 2
call fcn.00497e20
pop eax
mov edx, dword [ebp - 0x70]
mov dword fs:[0], edx
mov edi, dword [ebp - 0xb8]
mov esi, dword [ebp - 0xb4]
mov ebx, dword [ebp - 0xb0]
mov esp, ebp
pop ebp
ret