Function at 0x470340
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4705e4
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 1
push 0x80000004
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x470392
mov byte [ebp - 5], 0
jmp 0x4705bc
mov ebx, 0x4800
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 0x4a1d30
lea eax, [ebp - 0x10]
push eax
push ebx
push 0x4a1d34
push 3
push 0x30
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_EnumServicesStatusA
test eax, eax
jne 0x4703ce
mov byte [ebp - 5], 0
jmp 0x4705bc
mov eax, dword [0x4a1d30]
dec eax
test eax, eax
jl 0x4705b3
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], 0
mov edi, 0x4a1d40
mov eax, dword [edi]
cmp eax, 7
ja case.0x4703f3.0
jmp dword [eax*4 + 0x4703fa]
lea eax, [ebp - 0x1c]
call fcn.00404b2c
jmp case.0x4703f3.0
lea eax, [ebp - 0x1c]
call fcn.00404b2c
jmp case.0x4703f3.0
lea eax, [ebp - 0x1c]
call fcn.00404b2c
jmp case.0x4703f3.0
lea eax, [ebp - 0x1c]
call fcn.0046fd00
jmp case.0x4703f3.0
lea eax, [ebp - 0x1c]
call fcn.00404b2c
jmp case.0x4703f3.0
lea eax, [ebp - 0x1c]
call fcn.00404b2c
jmp case.0x4703f3.0
lea eax, [ebp - 0x1c]
call fcn.00404b2c
lea eax, [ebp - 0x20]
call fcn.00404b2c
mov bl, byte [ebp - 0x18]
mov eax, ebx
call fcn.00470244
and eax, 0xff
cmp eax, 4
ja case.default.0x47047a
jmp dword [eax*4 + 0x470481]
lea eax, [ebp - 0x20]
call fcn.0046fcd8
jmp case.default.0x47047a
lea eax, [ebp - 0x20]
call fcn.0046fcd8
jmp case.default.0x47047a
lea eax, [ebp - 0x20]
call fcn.0046fcd8
jmp case.default.0x47047a
lea eax, [ebp - 0x20]
call fcn.0046fd38
jmp case.default.0x47047a
lea eax, [ebp - 0x20]
call fcn.0046fd60
lea eax, [ebp - 0x24]
mov edx, dword [edi - 8]
call fcn.00404d24
mov eax, ebx
lea edx, [ebp - 0x28]
call fcn.00470288
cmp dword [ebp - 0x24], 0
je 0x470517
mov eax, dword [ebp - 0x24]
call fcn.00404dec
mov esi, eax
test esi, esi
jle 0x470517
mov ebx, 1
mov eax, dword [ebp - 0x24]
mov al, byte [eax + ebx - 1]
cmp al, 0x26
je 0x470506
cmp al, 0x3c
je 0x470506
cmp al, 0x3e
jne 0x470513
lea eax, [ebp - 0x24]
call fcn.00405044
mov byte [eax + ebx - 1], 0x5f
inc ebx
dec esi
jne 0x4704f3
cmp dword [ebp - 0x28], 0
je 0x470554
mov eax, dword [ebp - 0x28]
call fcn.00404dec
mov esi, eax
test esi, esi
jle 0x470554
mov ebx, 1
mov eax, dword [ebp - 0x28]
mov al, byte [eax + ebx - 1]
cmp al, 0x26
je 0x470543
cmp al, 0x3c
je 0x470543
cmp al, 0x3e
jne 0x470550
lea eax, [ebp - 0x28]
call fcn.00405044
mov byte [eax + ebx - 1], 0x5f
inc ebx
dec esi
jne 0x470530
mov eax, dword [ebp - 4]
push dword [eax]
push dword [ebp - 0x24]
push 0x470600
lea edx, [ebp - 0x30]
mov eax, dword [ebp - 0x28]
call fcn.004702e4
push dword [ebp - 0x30]
push 0x470600
push dword [ebp - 0x1c]
push 0x470600
push dword [ebp - 0x20]
push 0x470600
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0x18]
call fcn.004090d8
push dword [ebp - 0x34]
push 0x47060c
mov eax, dword [ebp - 4]
mov edx, 0xb
call fcn.00404eac
inc dword [ebp - 0x18]
add edi, 0x24
dec dword [ebp - 0x2c]
jne 0x4703ec
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4705eb
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.00404b50
lea eax, [ebp - 0x28]
mov edx, 4
call fcn.00404b50
ret