Function at 0x651525d0
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 [0x65157028], 8
jne 0x65152738
movzx eax, word [ebx]
cmp ax, 0x7c
je 0x6515261d
cmp ax, 0x2f
je 0x6515261d
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 0x65152638
xor edx, edx
mov eax, str.Local_Port
call sym._monitor_load
mov esi, eax
lea esp, [ebp - 0xc]
mov eax, esi
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 0x6515261d
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 0x651526c1
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 0x651529d5
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 0x651529ea
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x2c]
xor esi, esi
mov dword [esp + 4], str.SystemCurrentControlSetControlPrintMonitors_
mov dword [esp], 0x80000002
call eax
sub esp, 0xc
test eax, eax
je 0x651527c0
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
test eax, eax
je 0x651527b8
shr eax, 0x10
je 0x651527a0
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x6515276c
mov edx, 0xffffffff
mov eax, ebx
call sym._wine_dbgstr_wn.part.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s__n
mov dword [esp + 8], str.monitor_load_by_port
mov dword [esp + 4], 0x65157028
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x651525ef
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x6515276c
mov eax, str._null_
jmp 0x6515276c
mov dword [esp], 0x6515712c
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]
mov eax, edi
shr eax, 0x10
sub esp, 0x30
mov dword [ebp - 0x34], eax
nop
cmp dword [ebp - 0x20], esi
jbe 0x651529e3
xor eax, eax
mov word [edi], ax
mov eax, dword [ebp - 0x28]
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 [0x65157028], 8
jne 0x65152960
mov dword [esp], edi
mov eax, dword [ebp - 0x30]
call eax
cmp word [edi], 0
mov edx, edi
mov dword [ebp - 0x1c], eax
je 0x65152899
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x65152890
xor eax, eax
mov ecx, 0x5c
jmp 0x651528af
movzx ecx, word [eax + str.Ports_]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x651528a8
cmp word [edi], 0
mov edx, edi
je 0x651528d1
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x651528c8
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [ebx + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x651528d8
lea eax, [ebp - 0x24]
mov dword [esp + 4], edi
inc esi
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 0x65152840
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
test eax, eax
je 0x65152840
mov esi, eax
mov dword [esp], 0x6515712c
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]
sub esp, 4
jmp 0x65152720
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x651529c0
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x65152992
mov edx, 0xffffffff
mov eax, edi
call sym._wine_dbgstr_wn.part.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.testing__s_n
mov dword [esp + 8], str.monitor_load_by_port
mov dword [esp + 4], 0x65157028
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x6515287a
movzx eax, di
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x65152992
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x6515261d
xor esi, esi
jmp 0x65152935
xor esi, esi
jmp 0x6515262b