Function at 0x406d91
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x12b]
mov byte [ebp - 0x12c], bl
cmp dword [ebp + 0xc], ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov esi, 0xf003f
je 0x406ee0
lea eax, [ebp - 0x14]
push eax
push esi
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvcHost
push closesocket
call edi
cmp eax, ebx
jne 0x406ee0
mov eax, 0x10000
push eax
mov dword [ebp - 4], eax
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 0x18], eax
lea eax, [ebp - 4]
mov dword [ebp - 0x28], 0x104
push eax
lea eax, [ebp - 0x20]
push dword [ebp - 0x18]
mov dword [ebp - 4], 0x10000
push eax
lea eax, [ebp - 0x28]
push ebx
push eax
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x406ea1
mov eax, dword [ebp - 0x18]
push eax
mov dword [ebp - 8], eax
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x406e94
push dword [ebp + 8]
push dword [ebp - 8]
call dword [sym.imp.MSVCRT.dll__mbscmp]
pop ecx
test eax, eax
pop ecx
je 0x406e83
push dword [ebp - 8]
call sub.MSVCRT.dll_strlen
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax + 1]
push eax
mov dword [ebp - 8], eax
call sub.MSVCRT.dll_strlen
pop ecx
jmp 0x406e51
lea eax, [ebp - 0x12c]
push eax
push dword [ebp + 0xc]
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push dword [ebp - 8]
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
ja 0x406ead
inc dword [ebp - 0x24]
cmp dword [ebp - 0xc], ebx
je 0x406e0d
push dword [ebp - 8]
call sub.MSVCRT.dll_strlen
pop ecx
push dword [ebp - 0x18]
test eax, eax
jne 0x406ed1
call sub.MFC42.DLL_operatordelete
pop ecx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x406fa5
call sub.MFC42.DLL_operatordelete
pop ecx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
add eax, 0x104
push eax
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp + 0xc], eax
pop ecx
push dword [ebp + 8]
push str.SYSTEMCurrentControlSetServices_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp + 0xc]
push closesocket
call edi
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x406f9c
cmp dword [ebp + 0x10], ebx
je 0x406f6a
lea eax, [ebp - 0x1c]
push eax
push esi
push ebx
push str.Parameters
push dword [ebp - 0x10]
call edi
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x406f6a
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x208
push eax
lea eax, [ebp - 0x20]
push dword [ebp + 0x10]
push eax
push ebx
push str.ServiceDll
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 0x14], ebx
je 0x406f93
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x208
push eax
lea eax, [ebp - 0x20]
push dword [ebp + 0x14]
push eax
push ebx
push str.ImagePath
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0xc], eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
call sub.MFC42.DLL_operatordelete
pop ecx
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0x10