Function at 0x658470
Capabilities:
Query service configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7137ed
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x76e964]
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 esi, ecx
push reloc.WS2_32.dll_accept
xor edi, edi
mov byte [ebp - 0x31], 0
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [ebp - 0x40], ebx
test ebx, ebx
je 0x6586bf
mov ecx, esi
call fcn.00659520
mov ecx, dword [0x76bf54]
test al, al
push accept
cmovne ecx, dword [0x76bf58]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x44], eax
test eax, eax
je 0x6586ab
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
lea ecx, [ebp - 0x30]
push ecx
push edi
push edi
push eax
mov dword [ebp - 0x30], edi
call esi
test eax, eax
jne 0x6586a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x6586a2
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x6586a2
push eax
call fcn.006117b0
mov edi, eax
add esp, 4
test edi, edi
je 0x6586a2
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x30]
push edi
push dword [ebp - 0x44]
call esi
test eax, eax
je 0x6586a2
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x65855a
cmp byte [ebp + 8], 0
jne 0x65856d
jmp 0x6586a2
cmp eax, 3
jne 0x6586a2
cmp byte [ebp + 0xc], 0
je 0x6586a2
push dword [edi + 0xc]
lea ecx, [ebp - 0x2c]
call fcn.005f3510
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov esi, dword [ebp - 0x28]
lea ebx, [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
cmp edx, 0x10
mov dword [ebp - 0x3c], ecx
cmovae eax, esi
mov dword [ebp - 4], 0
add eax, ecx
cmp edx, 0x10
mov dword [ebp - 0x38], eax
cmovae ebx, esi
add ebx, ecx
cmp edx, 0x10
lea ecx, [ebp - 0x28]
mov eax, ebx
cmovae ecx, esi
sub eax, ecx
push eax
push 0x22
push ecx
call fcn.006f42f0
add esp, 0xc
mov ecx, ebx
test eax, eax
cmovne ecx, eax
mov esi, ecx
cmp ecx, ebx
je 0x6585e3
inc ecx
cmp ecx, ebx
je 0x6585e3
nop
mov al, byte [ecx]
cmp al, 0x22
je 0x6585d9
mov byte [esi], al
inc esi
inc ecx
cmp ecx, ebx
jne 0x6585d0
mov ebx, dword [ebp - 0x18]
jmp 0x6585e6
mov ebx, dword [ebp - 0x3c]
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov edx, esi
lea ecx, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
sub dword [ebp - 0x38], esi
sub edx, eax
mov esi, dword [ebp - 0x38]
mov eax, ebx
sub eax, edx
cmp eax, esi
cmovb esi, eax
cmp dword [ebp - 0x14], 0x10
cmovae ecx, dword [ebp - 0x28]
sub ebx, esi
add ecx, edx
mov dword [ebp - 0x18], ebx
sub ebx, edx
inc ebx
push ebx
lea eax, [ecx + esi]
push eax
push ecx
call fcn.006f3c10
add esp, 0xc
lea ecx, [ebp - 0x2c]
call fcn.005f3ee0
mov dword [ebp - 4], 0xffffffff
test al, al
jne 0x658644
lea ecx, [ebp - 0x2c]
call fcn.00592960
jmp 0x65869f
mov edx, dword [ebp - 0x14]
mov byte [ebp - 0x31], 1
mov dword [ebp - 0x2c], 0x560c38
cmp edx, 0x10
jb 0x65868d
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
mov dword [ebp - 4], 1
cmp edx, 0x1000
jb 0x65867c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x6586e0
push edx
push ecx
call fcn.006dd246
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov ebx, dword [ebp - 0x40]
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x6586bf
push edi
call fcn.0060e50c
add esp, 4
mov al, byte [ebp - 0x31]
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.006dd760
mov esp, ebp
pop ebp
ret 8
call fcn.0060e3b4
int3