Function at 0x65147240
Capabilities:
Link many functions at runtime
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x6c
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x38], 0
test byte [0x651531d8], 8
jne 0x651475e0
mov dword [esp], 0x651531c0
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
sub esp, 4
test esi, esi
je 0x651472b5
mov ebx, dword [0x65153154]
cmp ebx, 0x65153154
je 0x651472b5
mov edi, dword [sym.imp.kernel32.dll_lstrcmpW]
lea esi, [esi]
mov eax, dword [ebx + 8]
test eax, eax
je 0x651472ab
mov dword [esp + 4], eax
mov dword [esp], esi
call edi
sub esp, 8
test eax, eax
je 0x65147358
mov ebx, dword [ebx]
cmp ebx, 0x65153154
jne 0x65147290
mov dword [esp + 4], 0x7c
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_calloc]
mov ebx, eax
test eax, eax
je 0x65147305
mov dword [eax], 0x65153154
mov eax, dword [0x65153158]
mov dword [ebx + 4], eax
mov dword [eax], ebx
mov eax, dword [ebx + 8]
add dword [ebx + 0x78], 1
mov dword [0x65153158], ebx
test eax, eax
je 0x651476d0
mov eax, dword [0x6515b004]
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x65147668
mov dword [esp], 0x651531c0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [ebp - 0x3c], 0
sub esp, 4
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x65147335
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call esi
test byte [0x651531d8], 8
jne 0x65147630
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebx + 8]
add dword [ebx + 0x78], 1
test ecx, ecx
jne 0x651472f5
mov edx, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [esp], str.SystemCurrentControlSetControlPrintMonitors_
mov dword [ebp - 0x3c], edx
call edx
mov edx, dword [ebp - 0x3c]
mov dword [esp], esi
mov edi, eax
call edx
lea eax, [edi + eax + 2]
add eax, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x3c], eax
mov ecx, eax
test eax, eax
je 0x65147b23
xor eax, eax
lea esi, [esi]
movzx edx, word [eax + str.SystemCurrentControlSetControlPrintMonitors_]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x651473a0
mov edx, dword [ebp - 0x3c]
cmp word [edx], 0
je 0x65147c40
add edx, 2
cmp word [edx], 0
jne 0x651473c0
xor eax, eax
nop
lea esi, [esi]
movzx ecx, word [esi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x651473d0
lea eax, [ebp - 0x38]
mov dword [esp], 0x80000002
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyW]
sub esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
jne 0x651479c8
test eax, eax
je 0x65147c48
mov dword [esp], esi
mov esi, dword [sym.imp.ucrtbase.dll__wcsdup]
call esi
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call esi
mov esi, dword [ebx + 8]
mov dword [ebx + 0xc], eax
test esi, esi
je 0x65147b3f
test eax, eax
je 0x65147b3f
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LoadLibraryW]
mov dword [ebx + 0x74], eax
sub esp, 4
test byte [0x651531d8], 8
jne 0x651477ec
test eax, eax
je 0x65147c25
mov esi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [esp + 4], str.InitializePrintMonitor2
mov dword [esp], eax
call esi
sub esp, 8
mov dword [ebp - 0x48], eax
mov dword [esp + 4], str.InitializePrintMonitorUI
mov eax, dword [ebx + 0x74]
mov dword [esp], eax
call esi
sub esp, 8
mov edi, eax
mov dword [esp + 4], str.InitializePrintMonitor
mov eax, dword [ebx + 0x74]
mov dword [esp], eax
call esi
sub esp, 8
mov dword [ebp - 0x4c], eax
mov dword [esp + 4], str.InitializeMonitorEx
mov eax, dword [ebx + 0x74]
mov dword [esp], eax
call esi
sub esp, 8
mov dword [ebp - 0x50], eax
mov dword [esp + 4], str.InitializeMonitor
mov eax, dword [ebx + 0x74]
mov dword [esp], eax
call esi
mov dword [ebp - 0x54], eax
sub esp, 8
test byte [0x651531d8], 8
jne 0x65147868
test edi, edi
je 0x651474fa
call edi
mov dword [ebx + 0x10], eax
test byte [0x651531d8], 8
jne 0x65147a15
mov edi, dword [ebp - 0x48]
test edi, edi
je 0x65147708
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x65147708
mov dword [ebp - 0x28], eax
lea edx, [ebp - 0x30]
lea eax, [ebp - 0x34]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x30], 0x18
mov dword [ebp - 0x24], 0x65153120
mov dword [ebp - 0x20], 1
mov dword [esp + 4], eax
mov dword [esp], edx
call edi
sub esp, 8
mov esi, eax
test byte [0x651531d8], 8
jne 0x65147b5a
test esi, esi
je 0x65147589
cmp dword [esi], 0x58
mov eax, 0x58
lea ecx, [ebx + 0x14]
cmovbe eax, dword [esi]
cmp eax, 4
jae 0x65147bab
test eax, eax
je 0x65147583
movzx edx, byte [esi]
mov byte [ecx], dl
test al, 2
jne 0x65147c78
mov eax, dword [ebp - 0x34]
mov dword [ebx + 0x70], eax
mov edi, dword [ebp - 0x3c]
test edi, edi
setne dl
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x651475af
test dl, dl
jne 0x65147848
test eax, eax
jne 0x651475af
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x65147c5d
mov edx, dword [0x6515b004]
test edx, edx
jne 0x65147697
mov dword [esp + 4], str.Local_Port
mov eax, dword [ebx + 8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpW]
push edx
push edx
test eax, eax
jne 0x65147697
jmp 0x6514768d
mov eax, dword [ebp - 0x40]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov edx, 0xffffffff
mov ebx, eax
mov eax, esi
call sym._wine_dbgstr_wn
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s___s__n
mov dword [esp + 8], str.monitor_load
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x65147262
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0x65155b84
mov dword [esp + 8], str.monitor_load
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], str.Local_Port
mov eax, dword [ebx + 8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
jne 0x65147c87
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
add dword [ebx + 0x78], 1
mov dword [0x6515b004], ebx
mov dword [esp], 0x651531c0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x44]
sub esp, 4
cmp dword [ebp - 0x40], ecx
je 0x6514731c
mov eax, dword [ebp - 0x44]
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call esi
jmp 0x65147322
test esi, esi
jne 0x65147363
mov esi, dword [sym.imp.ucrtbase.dll__wcsdup]
mov dword [esp], 0
call esi
mov edi, dword [ebp - 0x40]
mov dword [ebx + 8], eax
mov dword [esp], edi
call esi
mov dword [ebp - 0x3c], 0
mov dword [ebx + 0xc], eax
mov dword [ebp - 0x44], edi
jmp 0x65147438
mov ecx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x4c]
test ecx, ecx
setne al
mov edx, eax
test edi, edi
je 0x65147591
test al, al
je 0x65147591
mov dword [esp], ecx
call edi
mov dword [ebx + 0x6c], eax
sub esp, 4
test byte [0x651531d8], 8
jne 0x65147bce
test eax, eax
je 0x6514783d
mov dword [ebx + 0x70], eax
mov dword [ebx + 0x14], 0x58
mov esi, dword [eax + 4]
test esi, esi
je 0x6514775d
mov dword [ebx + 0x18], sym._monitor2_EnumPorts_28
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x6514776b
mov dword [ebx + 0x1c], sym._monitor2_OpenPort_12
mov edx, dword [eax + 0x10]
mov dword [ebx + 0x24], edx
mov edx, dword [eax + 0x14]
mov dword [ebx + 0x28], edx
mov edx, dword [eax + 0x18]
mov dword [ebx + 0x2c], edx
mov edx, dword [eax + 0x1c]
mov dword [ebx + 0x30], edx
mov edx, dword [eax + 0x20]
mov dword [ebx + 0x34], edx
mov edx, dword [eax + 0x24]
test edx, edx
je 0x65147797
mov dword [ebx + 0x38], sym._monitor2_AddPort_16
mov edi, dword [eax + 0x28]
test edi, edi
je 0x651477a5
mov dword [ebx + 0x3c], sym._monitor2_AddPortEx_20
mov esi, dword [eax + 0x2c]
test esi, esi
je 0x651477b3
mov dword [ebx + 0x40], sym._monitor2_ConfigurePort_16
mov ecx, dword [eax + 0x30]
test ecx, ecx
je 0x651477c1
mov dword [ebx + 0x44], sym._monitor2_DeletePort_16
mov edx, dword [eax + 0x34]
mov dword [ebx + 0x48], edx
mov edx, dword [eax + 0x38]
mov dword [ebx + 0x4c], edx
mov edx, dword [eax + 0x3c]
test edx, edx
je 0x651477db
mov dword [ebx + 0x50], sym._monitor2_XcvOpenPort_16
mov edx, dword [eax + 0x40]
mov dword [ebx + 0x54], edx
mov eax, dword [eax + 0x44]
mov dword [ebx + 0x58], eax
jmp 0x651475af
mov eax, dword fs:[0x18]
mov esi, dword [eax + 0x34]
mov eax, dword [ebp - 0x44]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x74]
mov dword [esp + 0xc], str._p:_LoadLibrary__s_____ld_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.monitor_load
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
mov eax, dword [ebx + 0x74]
jmp 0x6514745f
mov edi, dword [ebx + 0x14]
test edi, edi
jne 0x651475af
mov edi, dword [ebp - 0x50]
test edi, edi
je 0x65147ad1
test byte [0x651531d8], 1
jne 0x65147a9c
mov eax, dword [ebx + 0x14]
jmp 0x651475a0
mov esi, dword [ebp - 0x44]
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str._p:__s_pInitializePrintMonitor2_n
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], str.monitor_load
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
test byte [0x651531d8], 8
je 0x651474e4
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], str._p:__s_pInitializePrintMonitorUI_n
mov dword [esp + 8], str.monitor_load
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
test byte [0x651531d8], 8
je 0x651474e4
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str._p:__s_pInitializePrintMonitor_n
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 8], str.monitor_load
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
test byte [0x651531d8], 8
je 0x651474e4
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str._p:__s_pInitializeMonitorEx_n
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 8], str.monitor_load
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
test byte [0x651531d8], 8
je 0x651474e4
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str._p:__s_pInitializeMonitor_n
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 8], str.monitor_load
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x651474e4
test byte [0x651531d8], 4
je 0x65147414
mov eax, dword [ebp - 0x3c]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str._s_not_found_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.monitor_load
mov dword [esp + 4], 0x651531d8
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
jmp 0x65147414
mov eax, dword [ebp - 0x44]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x10]
mov dword [esp + 0xc], str._p:_MONITORUI_from__s_InitializePrintMonitorUI___n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.monitor_load
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x651474fa
test byte [0x651531d8], 8
je 0x651474fa
mov eax, dword [eax]
mov dword [esp + 0xc], str.0x_08lx:_dwMonitorSize___ld__n
mov dword [esp + 8], str.monitor_load
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x651474fa
mov eax, dword [ebp - 0x44]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str._s_InitializeMonitorEx_not_implemented_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.monitor_load
mov dword [esp + 4], 0x651531d8
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
mov esi, dword [ebp - 0x54]
test esi, esi
je 0x65147860
test byte [0x651531d8], 1
je 0x65147860
mov eax, dword [ebp - 0x44]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str._s_InitializeMonitor_not_implemented_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.monitor_load
mov dword [esp + 4], 0x651531d8
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
jmp 0x65147860
mov dword [esp], esi
mov esi, dword [sym.imp.ucrtbase.dll__wcsdup]
call esi
mov edi, dword [ebp - 0x40]
mov dword [ebx + 8], eax
mov dword [esp], edi
call esi
mov dword [ebp - 0x44], edi
mov dword [ebx + 0xc], eax
mov eax, ebx
xor ebx, ebx
call sym._monitor_unload
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 8
jmp 0x65147697
mov eax, dword [ebp - 0x3c]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov edx, 0xffffffff
mov edi, eax
mov eax, dword [ebp - 0x44]
call sym._wine_dbgstr_wn
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str._p:_MONITOR2_from__s_InitializePrintMonitor2__s__n
mov dword [esp + 8], str.monitor_load
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x65147557
mov edx, dword [esi]
lea edi, [ebx + 0x18]
and edi, 0xfffffffc
mov dword [ebx + 0x14], edx
mov edx, dword [esi + eax - 4]
mov dword [ecx + eax - 4], edx
sub ecx, edi
sub esi, ecx
add ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x65147583
mov eax, dword [ebp - 0x3c]
mov edx, 0xffffffff
call sym._wine_dbgstr_wn
mov edx, 0xffffffff
mov esi, eax
mov eax, dword [ebp - 0x44]
call sym._wine_dbgstr_wn
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x6c]
mov dword [esp + 0xc], str._p:_LPMONITOREX_from__s_InitializePrintMonitor__s__n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.monitor_load
mov dword [esp + 4], 0x651531d8
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
mov eax, dword [ebx + 0x6c]
jmp 0x6514773d
mov eax, ebx
xor ebx, ebx
call sym._monitor_unload
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x7e
jmp 0x65147697
mov edx, dword [ebp - 0x3c]
jmp 0x651473c9
mov eax, dword [ebp - 0x38]
mov edx, str.Driver
call sym._reg_query_value
mov dword [ebp - 0x44], eax
jmp 0x65147414
mov eax, ebx
xor ebx, ebx
call sym._monitor_unload
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x7f
jmp 0x65147697
movzx edx, word [esi + eax - 2]
mov word [ecx + eax - 2], dx
jmp 0x65147583
mov dword [esp], 0x651531c0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.ucrtbase.dll_free]
push eax
jmp 0x65147322