Function at 0x416d0c
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, 0x5a66f4
call fcn.0057c5c8
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 0x5a58c2
push dword [ebp - 0x6c]
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x416dc6
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0x424
jne 0x416d8a
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 0x41713a
push 0x10
mov ecx, 0x5a5903
mov edx, 0x5a58d1
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
call fcn.0058f760
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 0x41713a
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.0058f82c
inc dword [ebp - 0x48]
mov word [ebp - 0x54], 0x14
mov word [ebp - 0x54], 0x2c
lea eax, [ebp - 0x14]
call fcn.004025f4
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.004025f4
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.004025f4
push eax
inc dword [ebp - 0x48]
mov edx, 0x5a5908
lea eax, [ebp - 0x1c]
call fcn.0058f82c
inc dword [ebp - 0x48]
lea edx, [ebp - 0x1c]
pop ecx
pop eax
call fcn.0058fb5c
dec dword [ebp - 0x48]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.0058fb04
mov word [ebp - 0x54], 0x14
mov word [ebp - 0x54], 0x38
lea eax, [ebp - 0x20]
call fcn.004025f4
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.004025f4
mov edx, eax
inc dword [ebp - 0x48]
pop eax
call fcn.0058fe88
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x28]
call fcn.004025f4
mov edx, eax
inc dword [ebp - 0x48]
lea eax, [ebp - 0x10]
call fcn.0058fe88
lea edx, [ebp - 0x28]
pop eax
call fcn.0058fe64
test eax, eax
setg dl
and edx, 1
push edx
dec dword [ebp - 0x48]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.0058fb04
pop ecx
test cl, cl
jne 0x416f75
mov al, 1
push eax
dec dword [ebp - 0x48]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.0058fb04
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 0x41713a
dec dword [ebp - 0x48]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.0058fb04
mov word [ebp - 0x54], 8
mov word [ebp - 0x54], 0
cmp dword [ebp - 0x70], 0
je 0x416faf
push dword [ebp - 0x70]
call sub.advapi32.dll_CloseServiceHandle
cmp dword [ebp - 0x6c], 0
je 0x416fbd
push dword [ebp - 0x6c]
call sub.advapi32.dll_CloseServiceHandle
cmp word [ebp - 0x52], 0
je 0x416fc5
ret
mov word [ebp - 0x54], 0x50
lea eax, [ebp - 0x2c]
call fcn.004025f4
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.004025f4
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.004025f4
push eax
inc dword [ebp - 0x48]
mov edx, 0x5a5913
lea eax, [ebp - 0x34]
call fcn.0058f82c
inc dword [ebp - 0x48]
lea edx, [ebp - 0x34]
pop ecx
pop eax
call fcn.0058fb5c
dec dword [ebp - 0x48]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.0058fb04
mov word [ebp - 0x54], 0x44
mov word [ebp - 0x54], 0x5c
lea eax, [ebp - 8]
call fcn.004025f4
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.004025f4
mov ecx, eax
inc dword [ebp - 0x48]
lea edx, [ebp - 4]
mov eax, 0x5a591d
call fcn.0059021c
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x40]
call fcn.004025f4
push eax
inc dword [ebp - 0x48]
mov edx, 0x5a591f
lea eax, [ebp - 0x3c]
call fcn.0058f82c
inc dword [ebp - 0x48]
lea edx, [ebp - 0x3c]
pop ecx
pop eax
call fcn.0058fb5c
lea edx, [ebp - 0x40]
lea eax, [ebp - 8]
call fcn.0058fb34
dec dword [ebp - 0x48]
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.0058fb04
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x68]
call fcn.00416654
mov al, 1
push eax
dec dword [ebp - 0x48]
lea eax, [ebp - 8]
mov edx, 2
call fcn.0058fb04
dec dword [ebp - 0x48]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0058fb04
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