Function at 0x4c5d20
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fc470
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x334
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], esp
push 0x100
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x34], 1
call fcn.004f266a
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x14], ebx
push eax
push 0x20019
push edi
push str.SYSTEMCurrentControlSetControlSafeBootNetwork
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
jne 0x4c60c7
xor esi, esi
mov edx, dword [ebp - 0x2c]
mov ecx, 0x100
push ecx
lea ecx, [ebp - 0x140]
mov eax, esi
push ecx
inc esi
push eax
push edx
mov dword [ebp - 0x40], esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edx, eax
cmp edx, edi
mov dword [ebp - 0x3c], edx
jne 0x4c60ad
lea edi, [ebp - 0x140]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jle 0x4c60ab
mov byte [ebp - 0x240], al
lea eax, [ebp - 0x140]
push eax
lea ecx, [ebp - 0x240]
push str.SYSTEMCurrentControlSetServices_s
push ecx
call fcn.004f175f
add esp, 0xc
lea edx, [ebp - 0x1c]
lea eax, [ebp - 0x240]
push edx
push 0x20019
push 0
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4c5fa2
lea ecx, [ebp - 0x30]
lea edx, [ebp - 0x34]
push ecx
push ebx
push edx
push eax
mov eax, dword [ebp - 0x1c]
push str.ImagePath
push eax
mov dword [ebp - 0x30], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4c5fa2
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x340]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5249f0
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x340]
push ecx
call fcn.004f2d80
add esp, 8
test eax, eax
jne 0x4c5f2a
lea edx, [ebp - 0x340]
push 0x5249ec
push edx
call fcn.004f2d80
add esp, 8
test eax, eax
jne 0x4c5f2a
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x14]
or ecx, 0xffffffff
shl ebx, 8
lea edx, [ebx + eax]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebx + 0xf11b08]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x140]
push ecx
push str.HKLMSYSTEMCurrentControlSetControlSafeBootNetwork
push str._s_s
push edx
call fcn.004f175f
lea eax, [ebp - 0x140]
lea ecx, [ebx + 0xf333ec]
push eax
push str.HKLMSYSTEMCurrentControlSetControlSafeBootMinimal
push str._s_s
push ecx
call fcn.004f175f
mov eax, dword [ebp - 0x20]
add esp, 0x20
inc eax
cmp eax, 0x40
mov dword [ebp - 0x20], eax
jne 0x4c5fa2
jmp 0x4c60c7
mov ebx, dword [ebp - 0x28]
mov edx, dword [ebp + 0x18]
mov edi, dword [ebp - 0x14]
or ecx, 0xffffffff
shl ebx, 8
xor eax, eax
add edx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebx + 0xf1b188]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x140]
push ecx
push str.HKLMSYSTEMCurrentControlSetControlSafeBootNetwork
push str._s_s
push edx
call fcn.004f175f
lea eax, [ebp - 0x140]
lea ecx, [ebx + 0xf3b3ec]
push eax
push str.HKLMSYSTEMCurrentControlSetControlSafeBootMinimal
push str._s_s
push ecx
call fcn.004f175f
mov eax, dword [ebp - 0x28]
add esp, 0x20
inc eax
cmp eax, 0x40
mov dword [ebp - 0x28], eax
je 0x4c60c7
mov edx, dword [ebp - 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
lea eax, [ebp - 0x140]
lea ecx, [ebp - 0x240]
push eax
push str.SYSTEMCurrentControlSetServices_sParameters
push ecx
mov byte [ebp - 0x240], 0
call fcn.004f175f
add esp, 0xc
lea edx, [ebp - 0x24]
lea eax, [ebp - 0x240]
push edx
push 0x20019
push 0
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4c6098
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x30]
push ecx
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x34]
push edx
push eax
push 0
push str.ServiceDll
push ecx
mov dword [ebp - 0x30], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4c6098
mov edx, dword [ebp - 0x24]
push edx
call esi
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp - 0x14]
or ecx, 0xffffffff
shl ebx, 8
lea edx, [ebx + eax]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebx + 0xf17008]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x140]
push ecx
push str.HKLMSYSTEMCurrentControlSetControlSafeBootNetwork
push str._s_s
push edx
call fcn.004f175f
lea eax, [ebp - 0x140]
lea ecx, [ebx + 0xf1f24c]
push eax
push str.HKLMSYSTEMCurrentControlSetControlSafeBootMinimal
push str._s_s
push ecx
call fcn.004f175f
mov eax, dword [ebp - 0x18]
add esp, 0x20
inc eax
cmp eax, 0x40
mov dword [ebp - 0x18], eax
je 0x4c60c7
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x40]
xor edi, edi
mov eax, dword [ebp - 0x38]
inc eax
cmp eax, 0x190
mov dword [ebp - 0x38], eax
jg 0x4c60c7
cmp edx, 0x103
jne 0x4c5d9b
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 0x14]
mov dword [ecx], edx
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 0x1c]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
push ecx
mov dword [edx], eax
call fcn.004f265f
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret