Function at 0x4c335c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, 7
push 0
push 0
dec ecx
jne 0x4c3364
push ebx
push esi
push edi
mov byte [ebp - 0xd], dl
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x4c35ec
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x44]
xor ebx, ebx
mov eax, dword [0x4d660c]
cmp dword [eax], 1
jne 0x4c3481
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 1
push 0
call sub.winspool.drv_EnumPortsW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xe], al
cmp byte [ebp - 0xe], 0
jne 0x4c35b9
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x7a
jne 0x4c35b9
mov eax, dword [ebp - 0x14]
call fcn.00404368
mov ebx, eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x14]
push eax
push ebx
push 1
push 0
call sub.winspool.drv_EnumPortsW
mov edi, dword [ebp - 0x18]
dec edi
test edi, edi
jl 0x4c35b9
inc edi
xor esi, esi
lea eax, [ebp - 4]
mov edx, esi
add edx, edx
add edx, edx
add edx, ebx
mov edx, dword [edx]
call fcn.004072b8
mov edx, dword [ebp - 4]
mov eax, 0x4c3608
call fcn.00407780
dec eax
jne 0x4c3478
mov edx, dword [ebp - 4]
mov eax, 0x4c361c
call fcn.00407780
test eax, eax
jle 0x4c3440
lea edx, [ebp - 4]
mov ecx, 1
xchg edx, eax
call fcn.0040765c
lea eax, [ebp - 4]
call fcn.00406e84
lea edx, [eax + 6]
lea eax, [ebp - 0x24]
call fcn.004072b8
mov eax, dword [ebp - 0x24]
call fcn.0041cd0c
push eax
lea eax, [ebp - 0x28]
mov ecx, 0x4c362c
mov edx, dword [ebp - 4]
call fcn.004074a4
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
pop edx
call fcn.004c329c
inc esi
dec edi
jne 0x4c33ff
jmp 0x4c35b9
mov eax, 0x104
call fcn.00404368
mov ebx, eax
lea eax, [ebp - 0x20]
push eax
push 1
push 0
push 0x4c3630
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW_1
test eax, eax
jne 0x4c35b9
xor esi, esi
mov dword [ebp - 0x14], 0x104
mov eax, dword [ebp - 0x14]
call fcn.00404368
mov edi, eax
mov dword [ebp - 0x14], 0x104
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x14]
push eax
push edi
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
push ebx
push esi
mov eax, dword [ebp - 0x20]
push eax
call sub.advapi32.dll_RegEnumValueW
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4c35a9
lea eax, [ebp - 0x2c]
mov edx, edi
call fcn.004072b8
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 4]
call fcn.0041c1f0
mov edx, dword [ebp - 4]
mov eax, 0x4c3608
call fcn.00407780
dec eax
jne 0x4c35a3
lea eax, [ebp - 8]
mov edx, ebx
call fcn.004072b8
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x58]
test eax, eax
jge 0x4c35a3
cmp byte [ebp - 0xd], 0
je 0x4c357b
lea eax, [ebp - 4]
call fcn.00406e84
lea edx, [eax + 6]
lea eax, [ebp - 0x30]
call fcn.004072b8
mov eax, dword [ebp - 0x30]
call fcn.0041cd0c
push eax
push dword [ebp - 4]
push 0x4c362c
push dword [ebp - 8]
lea eax, [ebp - 0x34]
mov edx, 3
call fcn.0040752c
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
pop edx
call fcn.004c329c
jmp 0x4c35a3
lea eax, [ebp - 4]
call fcn.00406e84
lea edx, [eax + 6]
lea eax, [ebp - 0x38]
call fcn.004072b8
mov eax, dword [ebp - 0x38]
call fcn.0041cd0c
mov edx, eax
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.004c329c
inc esi
jmp 0x4c34bf
mov eax, dword [ebp - 0x20]
push eax
call sub.advapi32.dll_RegCloseKey_1
mov eax, edi
call fcn.00404384
test ebx, ebx
je 0x4c35c4
mov eax, ebx
call fcn.00404384
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c35f3
lea eax, [ebp - 0x38]
mov edx, 6
call fcn.00406924
lea eax, [ebp - 8]
mov edx, 2
call fcn.00406924
ret