Function at 0x402d00
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2644
call fcn.00459eb0
mov eax, dword [ebp + 8]
test eax, eax
push ebx
push esi
push edi
mov dword [esp + 0x2c], 0
jne 0x402d2c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x28], ebx
jne 0x402d4d
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x469ea4
push ebx
call esi
push 0x469e94
push ebx
mov edi, eax
call esi
push str.QueryServiceConfigA
push ebx
mov dword [esp + 0x48], eax
call esi
push str.EnumServicesStatusExA
push ebx
mov dword [esp + 0x3c], eax
call esi
push 0x469e54
push ebx
mov dword [esp + 0x28], eax
call esi
test edi, edi
mov dword [esp + 0x44], eax
je 0x4030f9
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x4030f9
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x4030f9
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x4030f9
test eax, eax
je 0x4030f9
push 0xf003f
push 0
push 0
call edi
xor edi, edi
mov esi, eax
cmp esi, edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x30], edi
je 0x4030c4
push edi
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
push edi
push edi
push 3
push 0x30
push edi
push esi
mov dword [esp + 0x3c], edi
call dword [esp + 0x48]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4030a5
mov eax, dword [esp + 0x14]
cmp eax, edi
jbe 0x4030a5
push 1
push eax
call fcn.00459dd1
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x24], edi
je 0x403086
mov eax, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x20]
push ecx
push eax
push edi
push 3
push 0x30
push 0
push edx
mov esi, eax
call dword [esp + 0x48]
test eax, eax
je 0x40307c
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
imul eax, eax, 0x1a
mov edx, dword [ebp + 8]
lea esi, [esi + eax + 1]
mov eax, dword [edx]
lea ebx, [esi + ecx]
push ebx
push eax
call fcn.00459a66
mov ecx, dword [ebp + 8]
mov edx, eax
add esp, 8
test edx, edx
mov dword [ecx], edx
jne 0x402ea3
mov dword [esp + 0x10], 0xfffffff8
jmp 0x403054
mov ecx, esi
mov esi, dword [esp + 0x2c]
lea edi, [edx + esi]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x18]
test eax, eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x3c], 0
jle 0x403050
mov esi, dword [esp + 0x24]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402ee0
sub eax, edx
mov dword [esp + 0x48], eax
cmp dword [esi], 0
je 0x403038
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x150]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
mov ecx, dword [esi]
push 0xff
push ecx
lea edx, [esp + 0x158]
push edx
call fcn.00458f80
mov eax, dword [esi + 4]
add esp, 0xc
test eax, eax
je 0x402f43
push 0xff
push eax
lea eax, [esp + 0x58]
push eax
call fcn.00458f80
add esp, 0xc
xor eax, eax
mov ecx, 0x80
lea edi, [esp + 0x450]
rep stosd dword es:[edi], eax
mov ecx, 0x80
lea edi, [esp + 0x250]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x450]
push ecx
push 0x469e50
lea edx, [esp + 0x158]
push 0x469e4c
push edx
call fcn.0044dcb0
lea eax, [esp + 0x260]
push eax
push 0x469e50
lea ecx, [esp + 0x68]
push 0x469e4c
push ecx
call fcn.0044dcb0
mov edx, dword [esi]
mov eax, dword [esp + 0x3c]
add esp, 0x20
push 1
push edx
push eax
mov dword [esp + 0x44], 0xffffffff
call dword [esp + 0x4c]
mov ebx, eax
test ebx, ebx
je 0x403006
xor eax, eax
mov ecx, 0x800
lea edi, [esp + 0x650]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x4c]
push ecx
push 0x2000
lea edx, [esp + 0x658]
push edx
push ebx
mov dword [esp + 0x5c], 0x2000
call dword [esp + 0x44]
test eax, eax
je 0x402ffb
mov eax, dword [esp + 0x654]
mov dword [esp + 0x38], eax
jmp 0x403001
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call dword [esp + 0x48]
mov ecx, dword [esp + 0x38]
mov edx, dword [esi + 0xc]
push ecx
push edx
mov edx, dword [ebp + 8]
lea eax, [esp + 0x258]
push eax
mov eax, dword [edx]
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0x45c]
push ecx
add eax, edx
push str._s__s__d__d_r_n
push eax
call fcn.00458ee7
add esp, 0x18
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
inc eax
add esi, 0x2c
cmp eax, ecx
mov dword [esp + 0x3c], eax
jl 0x402ed8
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
push edi
call fcn.0045932f
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
jne 0x4030de
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4030de
mov esi, dword [esp + 0x1c]
xor edi, edi
jmp 0x402de4
mov dword [esp + 0x10], 0xfffffff9
jmp 0x403058
push esi
mov dword [esp + 0x14], 0xfffffffa
call dword [esp + 0x48]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
mov dword [esp + 0x14], 0xfffffffb
call dword [esp + 0x48]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
mov dword [esp + 0x14], 0xfffffffc
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x1c]
push esi
call dword [esp + 0x48]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
mov eax, 0xfffffffd
pop ebx
mov esp, ebp
pop ebp
ret