Function at 0x401730
Capabilities:
Query service configuration

Disassembly:
push 0xffffffffffffffff
push 0x4249b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov ebx, ecx
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x34]
push 1
push eax
push esi
mov dword [esp + 0x38], 0
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
mov dword [esp + 0x20], edi
jne 0x401778
push esi
jmp 0x401936
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x4017a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401772
mov ebp, dword [esp + 0x14]
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
jmp 0x4017b0
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x38]
lea edx, [esp + 0x14]
push edx
push ebp
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x4017cc
mov eax, dword [esp + 0x34]
push eax
jmp 0x401936
push 0x28
call fcn.00419cb8
add esp, 4
test eax, eax
je 0x4017ea
mov ecx, dword [0x42f48c]
mov edi, eax
mov dword [eax], ecx
mov dword [esp + 0x10], edi
jmp 0x4017f6
mov dword [esp + 0x10], 0
mov edi, dword [esp + 0x10]
lea edx, [esp + 0x38]
mov ecx, edi
push edx
call fcn.004199cf
add edi, 4
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x1c]
mov esi, edx
xor edi, edi
mov dword [esp + 0x1c], esi
lea ebp, [esi + 1]
cmp ebp, edi
jne 0x40183c
cmp eax, edi
je 0x401831
push eax
call fcn.00419ce1
add esp, 4
mov dword [ebx + 0x1c], edi
mov dword [ebx + 0x24], edi
mov dword [ebx + 0x20], edi
jmp 0x401927
cmp eax, edi
jne 0x401874
lea edi, [ebp*4]
push edi
call fcn.00419cb8
mov edx, eax
mov ecx, edi
mov dword [ebx + 0x1c], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [ebx + 0x24], ebp
mov dword [ebx + 0x20], ebp
jmp 0x401927
mov ecx, dword [ebx + 0x24]
cmp ebp, ecx
jg 0x401892
cmp ebp, edx
jle 0x40188a
mov ecx, ebp
lea edi, [eax + edx*4]
sub ecx, edx
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [ebx + 0x20], ebp
jmp 0x401927
mov eax, dword [ebx + 0x28]
cmp eax, edi
jne 0x4018bc
mov eax, edx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x4018b0
mov eax, 4
jmp 0x4018bc
cmp eax, 0x400
jle 0x4018bc
mov eax, 0x400
add eax, ecx
cmp ebp, eax
mov dword [esp + 0x34], eax
jl 0x4018ca
mov dword [esp + 0x34], ebp
mov eax, dword [esp + 0x34]
lea ecx, [eax*4]
push ecx
call fcn.00419cb8
mov ecx, dword [ebx + 0x20]
mov esi, dword [ebx + 0x1c]
shl ecx, 2
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x1c], eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx + 0x20]
mov ecx, ebp
sub ecx, edx
lea edi, [eax + edx*4]
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x1c]
push eax
call fcn.00419ce1
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x24]
add esp, 8
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x20], ebp
mov dword [ebx + 0x24], ecx
mov edx, dword [ebx + 0x1c]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov dword [edx + esi*4], eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea ecx, [esp + 0x38]
mov dword [esp + 0x2c], 0xffffffff
call fcn.004198da
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 8