Function at 0x524c90
Capabilities:
Query service configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e193d
mov eax, dword fs:[0]
push eax
sub esp, 0x38
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 dword [ebp - 0x38], ecx
push reloc.WS2_32.dll_accept
xor edi, edi
xor bl, bl
push edi
push edi
mov byte [ebp - 0x31], bl
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
mov dword [ebp - 0x44], esi
test esi, esi
je 0x524e8e
mov ecx, dword [ebp - 0x38]
call fcn.00525ca0
mov ecx, dword [0x613f64]
test al, al
push closesocket
cmovne ecx, dword [0x613f68]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x524e7a
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 0x524e6e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x524e6e
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x524e6e
push eax
call fcn.004db390
mov edi, eax
add esp, 4
test edi, edi
je 0x524e6e
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x30]
push edi
push dword [ebp - 0x38]
call esi
test eax, eax
je 0x524e6e
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x524d7c
cmp byte [ebp + 8], bl
jne 0x524d8e
jmp 0x524e6e
cmp eax, 3
jne 0x524e6e
cmp byte [ebp + 0xc], bl
je 0x524e6e
push dword [edi + 0xc]
lea ecx, [ebp - 0x2c]
call fcn.004bd280
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 - 0x40], ecx
cmovae eax, esi
mov dword [ebp - 4], 0
add eax, ecx
cmp edx, 0x10
mov dword [ebp - 0x3c], 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.005be960
add esp, 0xc
mov ecx, ebx
test eax, eax
cmovne ecx, eax
mov esi, ecx
cmp ecx, ebx
je 0x524e03
inc ecx
cmp ecx, ebx
je 0x524e03
mov al, byte [ecx]
cmp al, 0x22
je 0x524df9
mov byte [esi], al
inc esi
inc ecx
cmp ecx, ebx
jne 0x524df0
mov ebx, dword [ebp - 0x18]
jmp 0x524e06
mov ebx, dword [ebp - 0x40]
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov edx, esi
lea ecx, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
sub dword [ebp - 0x3c], esi
sub edx, eax
mov esi, dword [ebp - 0x3c]
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.005be280
add esp, 0xc
lea ecx, [ebp - 0x2c]
call fcn.004bdc70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
test al, al
jne 0x524e67
call fcn.00451c50
mov bl, byte [ebp - 0x31]
jmp 0x524e6e
mov bl, 1
call fcn.00451c50
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [ebp - 0x44]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x524e8e
push edi
call fcn.004d80ec
add esp, 4
mov al, bl
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.005bca10
mov esp, ebp
pop ebp
ret 8