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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x5c
mov dword [ebp - 0x20], 0
test byte [0x651531d8], 8
jne 0x65148a48
movzx eax, word [ebx]
cmp ax, 0x7c
je 0x6514892d
cmp ax, 0x2f
je 0x6514892d
mov dword [esp + 8], 4
mov esi, dword [sym.imp.ucrtbase.dll_wcsncmp]
mov dword [esp + 4], str.LPR:
mov dword [esp], ebx
call esi
test eax, eax
jne 0x65148948
xor edx, edx
mov eax, str.Local_Port
call sym._monitor_load
mov edx, eax
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 5
mov dword [esp + 4], str.CUPS:
mov dword [esp], ebx
call esi
test eax, eax
je 0x6514892d
mov eax, dword [sym.imp.advapi32.dll_RegOpenKeyW]
lea esi, [ebp - 0x28]
mov dword [esp + 4], str.SoftwareMicrosoftWindows_NTCurrentVersionPorts
mov dword [esp + 8], esi
mov dword [esp], 0x80000002
mov dword [ebp - 0x2c], eax
call eax
sub esp, 0xc
test eax, eax
jne 0x651489d1
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
je 0x65148c59
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
mov eax, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [esp], str.Ports_
mov dword [ebp - 0x30], eax
call eax
mov dword [esp], ebx
mov edi, eax
mov eax, dword [ebp - 0x30]
call eax
lea eax, [edi + eax + 0x105]
mov dword [ebp - 0x1c], eax
add eax, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
test eax, eax
je 0x65148c6b
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], str.SystemCurrentControlSetControlPrintMonitors_
mov dword [esp], 0x80000002
call eax
xor edx, edx
sub esp, 0xc
test eax, eax
je 0x65148a80
mov dword [ebp - 0x2c], edx
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
mov edx, dword [ebp - 0x2c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
mov eax, edx
pop edi
pop ebp
ret
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.__s__n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.monitor_load_by_port
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x651488ff
mov dword [esp], 0x651531c0
xor esi, esi
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
lea eax, [ebp - 0x20]
sub esp, 4
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
sub esp, 0x30
nop
lea esi, [esi]
cmp dword [ebp - 0x20], esi
jbe 0x65148c67
mov eax, dword [ebp - 0x28]
xor ecx, ecx
mov word [edi], cx
mov dword [esp + 0xc], 0x104
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyW]
sub esp, 0x10
test byte [0x651531d8], 8
jne 0x65148c20
mov dword [esp], edi
mov eax, dword [ebp - 0x30]
call eax
cmp word [edi], 0
mov edx, edi
mov dword [ebp - 0x1c], eax
je 0x65148b59
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x65148b50
xor eax, eax
nop
lea esi, [esi]
movzx ecx, word [eax + str.Ports_]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x65148b60
cmp word [edi], 0
mov edx, edi
je 0x65148b89
nop
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x65148b80
xor eax, eax
nop
lea esi, [esi]
movzx ecx, word [ebx + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x65148b90
lea eax, [ebp - 0x24]
mov dword [esp + 4], edi
add esi, 1
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov eax, dword [ebp - 0x2c]
call eax
sub esp, 0xc
test eax, eax
jne 0x65148b00
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, dword [ebp - 0x1c]
xor edx, edx
sub esp, 4
mov word [edi + eax*2], dx
xor edx, edx
mov eax, edi
call sym._monitor_load
mov edx, eax
test eax, eax
je 0x65148b00
mov dword [ebp - 0x2c], edx
mov dword [esp], 0x651531c0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x28]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov edx, dword [ebp - 0x2c]
sub esp, 4
jmp 0x65148a2c
mov edx, 0xffffffff
mov eax, edi
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.testing__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.monitor_load_by_port
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x65148b3a
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x6514892d
xor edx, edx
jmp 0x65148bef
xor edx, edx
jmp 0x6514893b