Function at 0x42e338
Capabilities:
Query service configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff68
push ebx
push esi
push edi
mov dword [ebp - 0x68], eax
mov eax, 0x4bfe68
call fcn.00497a7c
xor edx, edx
mov dword [ebp - 0x6c], edx
xor ecx, ecx
mov dword [ebp - 0x70], ecx
mov word [ebp - 0x54], 8
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0x6c], eax
push 0xf01ff
push 0x4bf83b
push dword [ebp - 0x6c]
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x42e3f2
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0x424
jne 0x42e3b6
mov al, 1
push eax
xor edx, edx
mov dword [ebp - 0x48], edx
lea ecx, [ebp - 0x64]
push ecx
call sub.CC3260MT.DLL___Return_unwind
pop ecx
pop eax
jmp 0x42e766
push 0x10
mov ecx, 0x4bf87c
mov edx, 0x4bf84a
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 - 0x48], edx
lea ecx, [ebp - 0x64]
push ecx
call sub.CC3260MT.DLL___Return_unwind
pop ecx
pop eax
jmp 0x42e766
xor ecx, ecx
mov dword [ebp - 0x7c], ecx
mov word [ebp - 0x54], 8
push 0x1000
push 0x40
call sub.kernel32.dll_LocalAlloc
mov dword [ebp - 0x7c], eax
lea eax, [ebp - 0x78]
push eax
push 0x1000
push dword [ebp - 0x7c]
push dword [ebp - 0x70]
call sub.advapi32.dll_QueryServiceConfigA
mov word [ebp - 0x54], 0x20
mov edx, dword [ebp - 0x7c]
mov edx, dword [edx + 0xc]
lea eax, [ebp - 0xc]
call fcn.00497bd0
inc dword [ebp - 0x48]
mov word [ebp - 0x54], 0x14
mov word [ebp - 0x54], 0x2c
lea eax, [ebp - 0x14]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x48]
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 - 0x48]
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 - 0x48]
mov edx, 0x4bf881
lea eax, [ebp - 0x1c]
call fcn.00497bd0
inc dword [ebp - 0x48]
lea edx, [ebp - 0x1c]
pop ecx
pop eax
call fcn.00497e78
dec dword [ebp - 0x48]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00497e20
mov word [ebp - 0x54], 0x14
mov word [ebp - 0x54], 0x38
lea eax, [ebp - 0x20]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x48]
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 - 0x48]
pop eax
call fcn.004980b8
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x28]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x48]
lea eax, [ebp - 0x10]
call fcn.004980b8
lea edx, [ebp - 0x28]
pop eax
call fcn.00498094
test eax, eax
setg dl
and edx, 1
push edx
dec dword [ebp - 0x48]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.00497e20
pop ecx
test cl, cl
jne 0x42e5a1
mov al, 1
push eax
dec dword [ebp - 0x48]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00497e20
pop eax
push eax
xor edx, edx
mov dword [ebp - 0x48], edx
lea ecx, [ebp - 0x64]
push ecx
call sub.CC3260MT.DLL___Return_unwind
pop ecx
pop eax
jmp 0x42e766
dec dword [ebp - 0x48]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00497e20
mov word [ebp - 0x54], 8
mov word [ebp - 0x54], 0
cmp dword [ebp - 0x70], 0
je 0x42e5db
push dword [ebp - 0x70]
call sub.advapi32.dll_CloseServiceHandle
cmp dword [ebp - 0x6c], 0
je 0x42e5e9
push dword [ebp - 0x6c]
call sub.advapi32.dll_CloseServiceHandle
cmp word [ebp - 0x52], 0
je 0x42e5f1
ret
mov word [ebp - 0x54], 0x50
lea eax, [ebp - 0x2c]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x48]
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 - 0x48]
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 - 0x48]
mov edx, 0x4bf88c
lea eax, [ebp - 0x34]
call fcn.00497bd0
inc dword [ebp - 0x48]
lea edx, [ebp - 0x34]
pop ecx
pop eax
call fcn.00497e78
dec dword [ebp - 0x48]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.00497e20
mov word [ebp - 0x54], 0x44
mov word [ebp - 0x54], 0x5c
lea eax, [ebp - 8]
call fcn.00402a14
inc dword [ebp - 0x48]
mov word [ebp - 0x54], 0x44
mov eax, dword [ebp - 4]
call sub.rtl60.bpl__Sysutils_SetCurrentDir_qqrx17System_AnsiString
mov word [ebp - 0x54], 0x68
lea eax, [ebp - 0x38]
call fcn.00402a14
mov ecx, eax
inc dword [ebp - 0x48]
lea edx, [ebp - 4]
mov eax, 0x4bf896
call fcn.004982ac
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x40]
call fcn.00402a14
push eax
inc dword [ebp - 0x48]
mov edx, 0x4bf898
lea eax, [ebp - 0x3c]
call fcn.00497bd0
inc dword [ebp - 0x48]
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 - 0x48]
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.00497e20
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x68]
call fcn.0042dc80
mov al, 1
push eax
dec dword [ebp - 0x48]
lea eax, [ebp - 8]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x48]
lea eax, [ebp - 4]
mov edx, 2
call fcn.00497e20
pop eax
mov edx, dword [ebp - 0x64]
mov dword fs:[0], edx
mov edi, dword [ebp - 0xa4]
mov esi, dword [ebp - 0xa0]
mov ebx, dword [ebp - 0x9c]
mov esp, ebp
pop ebp
ret