Function at 0x405110
Capabilities:
Query service configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a33c8
mov eax, dword fs:[0]
push eax
mov eax, 0x4c
call fcn.00596bf0
mov eax, dword [0x616930]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x104
push 1
mov esi, ecx
mov dword [ebp - 0x54], eax
call fcn.0057b222
add esp, 8
push closesocket
push 0
push 0
mov dword [ebp - 0x58], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [ebp - 0x4c], edi
test edi, edi
je 0x4052de
push 1
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
test ebx, ebx
jne 0x405194
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4052de
lea ecx, [ebp - 0x50]
push ecx
push 0
push 0
push ebx
mov dword [ebp - 0x50], 0
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x4051e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4051d2
mov eax, dword [ebp - 0x50]
push eax
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
jmp 0x4051e7
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push edi
jmp 0x4052dc
mov esi, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x4c]
lea edx, [ebp - 0x50]
push edx
push esi
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x4052bf
mov eax, dword [edi + 0xc]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00408fb0
push 0x16
push str.bindcagentservice.exe
lea ecx, [ebp - 0x2c]
push ecx
mov dword [ebp - 4], 0
call fcn.0040aa90
cmp eax, 0xffffffff
je 0x405295
mov edx, dword [edi + 0xc]
xor ecx, ecx
cmp byte [edx], 0x22
jne 0x405233
mov ecx, 1
sub eax, ecx
push eax
lea esi, [ebp - 0x48]
lea edx, [ebp - 0x2c]
call fcn.004090e0
cmp dword [eax + 0x14], 0x10
jb 0x405249
mov eax, dword [eax]
mov esi, dword [ebp - 0x58]
mov edx, esi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405250
lea ecx, [ebp - 0x48]
call fcn.00409020
mov eax, dword [ebp - 0x54]
push edi
push 0
mov dword [eax], esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
mov ecx, dword [ebp - 0x4c]
push ecx
call esi
lea ecx, [ebp - 0x2c]
call fcn.00409020
mov eax, 1
jmp 0x4052e0
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
jae 0x4052a1
lea eax, [ebp - 0x2c]
mov esi, dword [ebp - 0x58]
mov edx, esi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4052a8
mov edx, dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
mov dword [edx], esi
call fcn.00409020
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
mov eax, dword [ebp - 0x4c]
push eax
call esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0057af8a
mov esp, ebp
pop ebp
ret