Function at 0x41a04c
Capabilities:
Query service configuration
Query service status

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff6c
push ebx
push esi
push edi
mov dword [ebp - 0x44], eax
mov eax, 0x4b9a70
call fcn.00497a7c
xor edx, edx
mov dword [ebp - 0x48], edx
xor ecx, ecx
mov dword [ebp - 0x4c], ecx
xor eax, eax
mov dword [ebp - 0x54], eax
mov word [ebp - 0x30], 8
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0x48], eax
push 0xf01ff
push 0x4b2a77
push dword [ebp - 0x48]
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x50], 0x424
cmp dword [ebp - 0x4c], 0
jne 0x41a164
cmp dword [ebp - 0x50], 0x424
jne 0x41a147
mov eax, dword [ebp - 0x44]
call fcn.0041aa90
test al, al
je 0x41a133
push 0xf01ff
push 0x4b2a85
push dword [ebp - 0x48]
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x41a164
mov word [ebp - 0x30], 0x14
mov edx, 0x4b2a93
lea eax, [ebp - 8]
call fcn.00497bd0
inc dword [ebp - 0x24]
push dword [eax]
call fcn.0042ad50
pop ecx
dec dword [ebp - 0x24]
lea eax, [ebp - 8]
mov edx, 2
call fcn.00497e20
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x40]
push eax
call sub.CC3260MT.DLL___Return_unwind
pop ecx
jmp 0x41a487
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x40]
push eax
call sub.CC3260MT.DLL___Return_unwind
pop ecx
jmp 0x41a487
xor edx, edx
mov dword [ebp - 0x24], edx
lea ecx, [ebp - 0x40]
push ecx
call sub.CC3260MT.DLL___Return_unwind
pop ecx
jmp 0x41a487
push 0x1000
push 0x40
call sub.kernel32.dll_LocalAlloc
mov dword [ebp - 0x54], eax
lea edx, [ebp - 0x58]
push edx
push 0x1000
push dword [ebp - 0x54]
push dword [ebp - 0x4c]
call sub.advapi32.dll_QueryServiceConfigA
mov ecx, dword [ebp - 0x44]
mov eax, dword [ecx + 0x3b0]
xor edx, edx
mov dword [ebp - 0x60], edx
xor ecx, ecx
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp - 0x60]
mov dword [eax + 0x120], edx
mov edx, dword [ebp - 0x5c]
mov dword [eax + 0x124], edx
mov eax, dword [ebp - 0x54]
cmp dword [eax + 4], 2
jne 0x41a1ca
mov ecx, dword [ebp - 0x44]
mov eax, dword [ecx + 0x3b0]
mov dl, 1
mov ecx, dword [eax]
call dword [ecx + 0xc8]
jmp 0x41a1dd
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x3b0]
xor edx, edx
mov ecx, dword [eax]
call dword [ecx + 0xc8]
mov eax, dword [ebp - 0x44]
mov edx, dword [eax + 0x3b0]
mov dword [ebp - 0x68], 0x41a4a0
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x64], ecx
mov eax, dword [ebp - 0x68]
mov dword [edx + 0x120], eax
mov eax, dword [ebp - 0x64]
mov dword [edx + 0x124], eax
mov word [ebp - 0x30], 0x2c
mov edx, dword [ebp - 0x54]
mov edx, dword [edx + 0xc]
lea eax, [ebp - 4]
call fcn.00497bd0
inc dword [ebp - 0x24]
mov word [ebp - 0x30], 0x20
lea eax, [ebp - 0x14]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x24]
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 - 0x24]
pop eax
call sub.rtl60.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x1c]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x24]
pop eax
call fcn.004980b8
lea edx, [ebp - 0x1c]
push edx
mov word [ebp - 0x30], 0x38
lea eax, [ebp - 0xc]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x24]
mov eax, dword [ebp - 4]
call sub.rtl60.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x10]
call fcn.00402a14
mov edx, eax
inc dword [ebp - 0x24]
pop eax
call fcn.004980b8
lea eax, [ebp - 0x10]
pop edx
call fcn.00497f1c
push eax
dec dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x24]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x24]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x24]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00497e20
dec dword [ebp - 0x24]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00497e20
pop ecx
test cl, cl
je 0x41a360
push 0x24
mov ecx, 0x4b2ad6
mov edx, 0x4b2aad
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
call fcn.00497b24
cmp eax, 6
jne 0x41a360
mov eax, dword [ebp - 0x44]
call fcn.0041aca8
mov eax, dword [sym.servercontrol.exe__SdServerForm]
call sub.vcl60.bpl__Forms_TCustomForm_Close_qqrv
mov edx, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [edx]
call sub.vcl60.bpl__Forms_TApplication_Terminate_qqrv
dec dword [ebp - 0x24]
lea eax, [ebp - 4]
mov edx, 2
call fcn.00497e20
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x40]
push eax
call sub.CC3260MT.DLL___Return_unwind
pop ecx
jmp 0x41a487
lea edx, [ebp - 0x94]
push edx
push dword [ebp - 0x4c]
call sub.advapi32.dll_QueryServiceStatus
cmp dword [ebp - 0x90], 4
jne 0x41a384
mov dl, 1
mov eax, dword [ebp - 0x44]
call fcn.00416f1c
jmp 0x41a397
cmp dword [ebp - 0x90], 1
jne 0x41a397
xor edx, edx
mov eax, dword [ebp - 0x44]
call fcn.0041c5ec
dec dword [ebp - 0x24]
lea eax, [ebp - 4]
mov edx, 2
call fcn.00497e20
mov word [ebp - 0x30], 8
mov word [ebp - 0x30], 0
cmp dword [ebp - 0x4c], 0
je 0x41a3c1
push dword [ebp - 0x4c]
call sub.advapi32.dll_CloseServiceHandle
cmp dword [ebp - 0x48], 0
je 0x41a3cf
push dword [ebp - 0x48]
call sub.advapi32.dll_CloseServiceHandle
cmp dword [ebp - 0x54], 0
je 0x41a3dd
push dword [ebp - 0x54]
call sub.kernel32.dll_LocalFree
cmp word [ebp - 0x2e], 0
je 0x41a3e5
ret
mov ecx, dword [ebp - 0x44]
mov eax, dword [ecx + 0x3cc]
mov edx, dword [eax]
call dword [edx + 0x54]
test al, al
je 0x41a47d
mov ecx, dword [0x4d8738]
cmp byte [ecx + 1], 0
je 0x41a47d
mov eax, dword [0x4d8738]
cmp dword [eax + 0x2c], 0
jne 0x41a47d
mov byte [0x4b07c9], 0
mov edx, dword [ebp - 0x44]
mov ecx, dword [edx + 0x3cc]
xor eax, eax
mov dword [ebp - 0x70], eax
xor edx, edx
mov dword [ebp - 0x6c], edx
mov eax, dword [ebp - 0x70]
mov dword [ecx + 0x90], eax
mov eax, dword [ebp - 0x6c]
mov dword [ecx + 0x94], eax
mov eax, dword [ebp - 0x44]
call fcn.004173ec
mov edx, dword [ebp - 0x44]
mov ecx, dword [edx + 0x3cc]
mov dword [ebp - 0x78], fcn.0041c5ec
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x74], eax
mov edx, dword [ebp - 0x78]
mov dword [ecx + 0x90], edx
mov edx, dword [ebp - 0x74]
mov dword [ecx + 0x94], edx
mov eax, dword [ebp - 0x44]
call fcn.00417170
mov byte [0x4b07c9], 1
mov edx, dword [ebp - 0x40]
mov dword fs:[0], edx
mov edi, dword [ebp - 0xa0]
mov esi, dword [ebp - 0x9c]
mov ebx, dword [ebp - 0x98]
mov esp, ebp
pop ebp
ret