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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3bc
mov eax, dword [0x5b0008]
xor eax, esp
mov dword [esp + 0x3b8], eax
push ebx
push esi
push edi
push str.vncDesktop::InitWindow_:_InitWindow_called_n
push 0
push 0x5b0d48
mov esi, ecx
call fcn.0041cc90
add esp, 0xc
push 0x400001cf
push 0
push 0
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov ebx, eax
mov ecx, str.vncDesktop::InitWindow_:_InitWindow:OpenInputdesktop_Error__n
mov eax, str.vncDesktop::InitWindow_:_InitWindow:OpenInputdesktop_OK_n
mov dword [esp + 0x5c], ebx
test ebx, ebx
cmovne ecx, eax
push ecx
push 0
push 0x5b0d48
call fcn.0041cc90
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetThreadDesktop]
mov edi, eax
lea eax, [esp + 0x90]
push eax
push 0x100
lea eax, [esp + 0x2c8]
mov dword [esp + 0x5c], edi
push eax
push 2
push ebx
call dword [sym.imp.USER32.dll_GetUserObjectInformationA]
test eax, eax
jne 0x451ecf
push str.vncDesktop::InitWindow_:_InitWindow:_GetUserObjectInformation__n
push eax
push 0x5b0d48
call fcn.0041cc90
add esp, 0xc
push edi
push ebx
lea eax, [esp + 0x2c8]
push eax
push str.vncDesktop::InitWindow_:_InitWindow:SelectHDESK_to__s___x__from__x_n
push 0
push 0x5b0d48
call fcn.0041cc90
mov eax, dword [sym.imp.USER32.dll_SetThreadDesktop]
add esp, 0x18
mov dword [esp + 0x58], eax
push ebx
call eax
test eax, eax
jne 0x451f10
push str.vncDesktop::InitWindow_:_InitWindow:SelectHDESK:_SetThreadDesktop__n
push eax
push 0x5b0d48
call fcn.0041cc90
add esp, 0xc
mov edi, dword [sym.imp.USER32.dll_ChangeWindowMessageFilter]
push 1
push dword [0x5be0a0]
call edi
push 1
push dword [0x5be094]
call edi
push 1
push dword [0x5be09c]
call edi
push 1
push 0x12
call edi
push 1
push 0x8008
call edi
cmp word [0x5b31ac], 0
jne 0x452012
mov eax, dword [0x5bbad0]
push 0
mov dword [esp + 0x64], 0x30
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0x4512e0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0x80], eax
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], str.WinVNC_desktop_sink
mov dword [esp + 0x90], 0
call dword [sym.imp.USER32.dll_RegisterClassExA]
mov word [0x5b31ac], ax
test ax, ax
jne 0x452012
push str.vncDesktop::InitWindow_:_failed_to_register_window_class_n
push 0
push 0x5b0d48
call fcn.0041cc90
add esp, 0xc
push dword [esi + 0xe398]
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3b8]
xor ecx, esp
call fcn.00519459
mov esp, ebp
pop ebp
ret
push 0
push dword [0x5bbad0]
push 0
push 0
push 0xc8
push 0x190
push accept
push accept
push 0xcf0000
push 0x59d508
push str.WinVNC_desktop_sink
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [esi + 0xe404], eax
test eax, eax
jne 0x45205a
push str.vncDesktop::InitWindow_:_failed_to_create_hook_window_n
jmp 0x451fe0
push 0
push 0x3e8
push 0x3e9
push eax
call dword [sym.imp.USER32.dll_SetTimer]
push esi
push 0xffffffffffffffeb
push dword [esi + 0xe404]
call dword [sym.imp.USER32.dll_SetWindowLongA]
push dword [esi + 0xe404]
mov byte [esi + 0xe40c], 1
call dword [sym.imp.USER32.dll_SetClipboardViewer]
push str.vncDesktop::InitWindow_:_OOOOOOOOOOOO_load_hookdlls_n
push 0
push 0x5b0d48
mov dword [esi + 0xe408], eax
mov byte [esi + 0xe40c], 0
call fcn.0041cc90
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0xbc]
add esp, 0xc
mov dword [esi + 0xe904], 0
push 0x104
push eax
push 0
call edi
test eax, eax
je 0x45210c
lea eax, [esp + 0xb0]
push 0x5c
push eax
call fcn.0051a9e0
add esp, 8
test eax, eax
je 0x451ffb
push str._vnchooks.dll
mov byte [eax], 0
lea eax, [esp + 0xb4]
push 0x104
push eax
call fcn.0051f428
add esp, 0xc
push 0x104
lea eax, [esp + 0x1bc]
mov dword [esi + 0xe908], 0
push eax
push 0
call edi
test eax, eax
je 0x452162
lea eax, [esp + 0x1b8]
push 0x5c
push eax
call fcn.0051a9e0
add esp, 8
test eax, eax
je 0x451ffb
push str._schook_legacy.dll
mov byte [eax], 0
lea eax, [esp + 0x1bc]
push 0x104
push eax
call fcn.0051f428
add esp, 0xc
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea eax, [esp + 0xb0]
push eax
mov dword [esi + 0xe910], 0
mov dword [esi + 0xe920], 0
mov dword [esi + 0xe91c], 0
mov dword [esi + 0xe928], 0
mov dword [esi + 0xe924], 0
mov dword [esi + 0xe90c], 0
mov dword [esi + 0xe918], 0
mov dword [esi + 0xe914], 0
call edi
mov dword [esi + 0xe904], eax
lea eax, [esp + 0x1b8]
push eax
call edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0xe908], eax
mov eax, dword [esi + 0xe904]
test eax, eax
je 0x45222f
push str.UnSetHooks
push eax
call edi
push str.SetMouseFilterHook
push dword [esi + 0xe904]
mov dword [esi + 0xe910], eax
call edi
push str.SetKeyboardFilterHook
push dword [esi + 0xe904]
mov dword [esi + 0xe920], eax
call edi
push str.SetHooks
push dword [esi + 0xe904]
mov dword [esi + 0xe91c], eax
call edi
mov dword [esi + 0xe90c], eax
mov eax, dword [esi + 0xe908]
test eax, eax
je 0x452280
push str.UnSetHook
push eax
call edi
push str.SetHook
push dword [esi + 0xe908]
mov dword [esi + 0xe918], eax
call edi
push str.SetMouseFilterHook
push dword [esi + 0xe908]
mov dword [esi + 0xe914], eax
call edi
push str.SetKeyboardFilterHook
push dword [esi + 0xe908]
mov dword [esi + 0xe928], eax
call edi
mov dword [esi + 0xe924], eax
push str.vncDesktop::InitWindow_:_OOOOOOOOOOOO_start_dispatch_n
push 0
push 0x5b0d48
call fcn.0041cc90
mov ebx, dword [sym.imp.KERNEL32.dll_SetEvent]
add esp, 0xc
mov dword [esp + 0x18], ebx
push dword [esi + 0xe398]
call ebx
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [sym.imp.USER32.dll_PeekMessageA]
mov edi, dword [sym.imp.USER32.dll_WaitMessage]
mov dword [esp + 0x24], eax
mov eax, dword [sym.imp.USER32.dll_TranslateMessage]
mov dword [esp + 0x4c], eax
mov eax, dword [sym.imp.USER32.dll_DispatchMessageA]
mov dword [esp + 0x50], eax
mov eax, dword [sym.imp.GDI32.dll_CreateRectRgn]
mov dword [esp + 0x40], eax
mov eax, dword [sym.imp.GDI32.dll_CombineRgn]
mov dword [esp + 0x44], eax
mov eax, dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x48], eax
jmp 0x4522fa
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
push 1
push 0
push 0
push 0
lea eax, [esp + 0xa4]
push eax
call ecx
test eax, eax
je 0x452562
mov eax, dword [esp + 0x98]
cmp eax, 0x12
je 0x45258f
cmp byte [0x5b31af], 0
jne 0x45258f
cmp eax, 0x8008
je 0x45256d
cmp eax, dword [0x5be0a0]
jne 0x4524c3
push str.vnchook
push 0x10
push 0x5b35b0
call fcn.0052d1ae
mov ecx, dword [esp + 0x1c]
add esp, 0xc
cmp byte [esi + 0xe93c], 0
je 0x4522fa
push str.vncDesktop::InitWindow_:_RFB_SCREEN_UPDATE___n
push 0
push 0x5b0d48
call fcn.0041cc90
mov eax, dword [esp + 0xa8]
add esp, 0xc
movsx edi, ax
shr eax, 0x10
movsx ebx, ax
mov eax, dword [esp + 0xa0]
movsx ecx, ax
shr eax, 0x10
movsx edx, ax
mov eax, dword [esi + 0x858]
sub ecx, eax
sub edi, eax
mov dword [esp + 0x14], ecx
mov eax, dword [esi + 0x85c]
sub ebx, eax
sub edx, eax
mov dword [esp + 0x28], edi
push edx
push ebx
push ecx
push edi
push str.vncDesktop::InitWindow_:_REct3__i__i__i__i___n
push 0
push 0x5b0d48
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x54], edx
mov dword [esp + 0x50], edx
call fcn.0041cc90
lea edx, [esi + 0x898]
add esp, 0x1c
cmp edi, dword [edx]
lea eax, [esp + 0x28]
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x2c]
cmovl eax, edx
cmp ebx, dword [edx + 4]
mov eax, dword [eax]
mov dword [esp + 0x20], eax
lea eax, [edx + 4]
cmovl ecx, eax
cmp dword [edx + 8], edi
lea eax, [edx + 8]
mov ebx, dword [ecx]
lea ecx, [esp + 0x30]
cmovl ecx, eax
mov dword [esp + 0x3c], ebx
mov eax, dword [ecx]
lea ecx, [esp + 0x34]
mov dword [esp + 0x14], eax
lea eax, [edx + 0xc]
mov edx, dword [esp + 0x38]
cmp dword [eax], edx
cmovl ecx, eax
mov eax, dword [esp + 0x14]
mov edi, dword [ecx]
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x20], eax
jge 0x4522f2
cmp ebx, edi
mov ebx, dword [esp + 0x18]
jge 0x4522f6
cmp byte [esi + 0xe3a8], 0
je 0x45246f
nop dword [eax]
push 5
call dword [esp + 0x28]
cmp byte [esi + 0xe3a8], 0
jne 0x452460
push 0x569fe8
call fcn.0052cbc2
add esp, 4
mov ebx, eax
push edi
push dword [esp + 0x18]
push dword [esp + 0x44]
push dword [esp + 0x2c]
call dword [esp + 0x50]
mov ecx, dword [esi + 0xe3a0]
mov edi, eax
push 2
push edi
push ecx
push ecx
call dword [esp + 0x54]
push edi
call dword [esp + 0x4c]
push ebx
call fcn.0051d799
mov ebx, dword [esp + 0x1c]
add esp, 4
push dword [esi + 0xe374]
call ebx
mov ecx, dword [esp + 0x10]
jmp 0x4522f6
cmp eax, dword [0x5be09c]
jne 0x452526
cmp byte [esi + 0xe93c], 0
mov ecx, dword [esp + 0x10]
je 0x4522fa
push str.vncDesktop::InitWindow_:_RFB_MOUSE_UPDATE___n
push 0
push 0x5b0d48
call fcn.0041cc90
mov ecx, dword [esp + 0xa8]
add esp, 0xc
test ecx, ecx
jne 0x452503
mov ecx, dword [esi + 0xe890]
jmp 0x45250f
mov eax, dword [esi + 0xe888]
mov dword [esi + 0xe88c], eax
mov dword [esi + 0xe888], ecx
push dword [esi + 0xe378]
call ebx
mov ecx, dword [esp + 0x10]
jmp 0x4522fa
cmp eax, 0x403
jne 0x452541
push str.vncDesktop::InitWindow_:_OOOOOOOOOOOO_called_wm_user3_n
push 0
push 0x5b0d48
call fcn.0041cc90
add esp, 0xc
lea eax, [esp + 0x94]
push eax
call dword [esp + 0x50]
lea eax, [esp + 0x94]
push eax
call dword [esp + 0x54]
mov ecx, dword [esp + 0x10]
jmp 0x4522fa
call edi
mov ecx, dword [esp + 0x10]
jmp 0x4522fa
push str.vncDesktop::InitWindow_:_OOOOOOOOOOOO_called_wm_user4_n
push 0
push 0x5b0d48
call fcn.0041cc90
add esp, 0xc
push dword [esi + 0xe404]
call dword [sym.imp.USER32.dll_DestroyWindow]
jmp 0x4525b7
push str.vncDesktop::InitWindow_:_OOOOOOOOOOOO_called_wm_quit_n
push 0
push 0x5b0d48
call fcn.0041cc90
add esp, 0xc
push dword [esi + 0xe404]
call dword [sym.imp.USER32.dll_DestroyWindow]
push dword [esi + 0xe384]
call ebx
cmp dword [0x5b318c], 0
je 0x4525d1
mov ebx, dword [esp + 0x24]
push 0x64
call ebx
cmp dword [0x5b318c], 0
jne 0x4525c4
push 0x3e9
push dword [esi + 0xe404]
call dword [sym.imp.USER32.dll_KillTimer]
mov eax, dword [esi + 0xe904]
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x4525f5
push eax
call edi
mov eax, dword [esi + 0xe908]
test eax, eax
je 0x452602
push eax
call edi
push dword [esp + 0x54]
call dword [esp + 0x5c]
push dword [esp + 0x5c]
call dword [sym.imp.USER32.dll_CloseDesktop]
push str.vncDesktop::InitWindow_:_OOOOOOOOOOOO_end_dispatch_n
push 0
push 0x5b0d48
call fcn.0041cc90
mov ecx, dword [esp + 0x3d0]
add esp, 0xc
mov dword [esi + 0xe404], 0
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00519459
mov esp, ebp
pop ebp
ret