Function at 0x440640
Capabilities:
Create thread
Link many functions at runtime
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x4d8
mov eax, dword [0x4f5568]
xor eax, esp
mov dword [esp + 0x4d4], eax
push esi
push edi
push str.vncdesktopsink.cpp_:_InitWindow_called_n
mov esi, ecx
push 0
push 0x4f6c50
mov dword [esp + 0x58], esi
call fcn.00414f90
add esp, 0xc
push 0x400001cf
push 0
push 0
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov edi, eax
mov dword [esp + 0x48], edi
test edi, edi
jne 0x440696
push str.vncdesktopsink.cpp_:_InitWindow:OpenInputdesktop_Error__n
jmp 0x44069b
push str.vncdesktopsink.cpp_:_InitWindow:OpenInputdesktop_OK_n
push 0
push 0x4f6c50
call fcn.00414f90
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetThreadDesktop]
mov dword [esp + 0x28], eax
lea eax, [esp + 0xac]
push eax
push 0x100
lea eax, [esp + 0x3e0]
push eax
push 2
push edi
call dword [sym.imp.USER32.dll_GetUserObjectInformationA]
test eax, eax
jne 0x4406f0
push str.vncdesktopsink.cpp_:_InitWindow:_GetUserObjectInformation__n
push eax
push 0x4f6c50
call fcn.00414f90
add esp, 0xc
push dword [esp + 0x28]
lea eax, [esp + 0x3dc]
push edi
push eax
push str.vncdesktopsink.cpp_:_InitWindow:SelectHDESK_to__s___x__from__x_n
push 0
push 0x4f6c50
call fcn.00414f90
add esp, 0x18
push edi
call dword [sym.imp.USER32.dll_SetThreadDesktop]
test eax, eax
jne 0x44072f
push str.vncdesktopsink.cpp_:_InitWindow:SelectHDESK:_SetThreadDesktop__n
push eax
push 0x4f6c50
call fcn.00414f90
add esp, 0xc
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ChangeWindowMessageFilter
push eax
call edi
mov dword [esp + 0x10], eax
test eax, eax
je 0x440785
push 1
push dword [0x503bec]
call eax
push 1
push dword [0x503bf8]
call dword [esp + 0x18]
push 1
push dword [0x503bf0]
call dword [esp + 0x18]
push 1
push 0x12
call dword [esp + 0x18]
push 1
push 0x8008
call dword [esp + 0x18]
cmp word [0x4f9120], 0
jne 0x440868
mov eax, dword [0x502598]
push 0
mov dword [esp + 0x80], 0x30
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0x43fbd0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0x9c], eax
lea eax, [esp + 0x7c]
push eax
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa8], str.WinVNC_desktop_sink
mov dword [esp + 0xac], 0
call dword [sym.imp.USER32.dll_RegisterClassExA]
mov word [0x4f9120], ax
test ax, ax
jne 0x440868
push str.vncdesktopsink.cpp_:_failed_to_register_window_class_n
push 0
push 0x4f6c50
call fcn.00414f90
add esp, 0xc
push dword [esi + 0xdbac]
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x4d4]
xor ecx, esp
call fcn.004aca59
mov esp, ebp
pop ebp
ret
push 0
push dword [0x502598]
push 0
push 0
push 0xc8
push 0x190
push accept
push accept
push 0xcf0000
push 0x4e38ec
push str.WinVNC_desktop_sink
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [esi + 0xdbfc], eax
test eax, eax
jne 0x4408b0
push str.vncdesktopsink.cpp_:_failed_to_create_hook_window_n
jmp 0x440837
push 0
push 0x3e8
push 0x3e9
push eax
call dword [sym.imp.USER32.dll_SetTimer]
push esi
push 0xffffffffffffffeb
push dword [esi + 0xdbfc]
call dword [sym.imp.USER32.dll_SetWindowLongA]
push dword [esi + 0xdbfc]
mov byte [esi + 0xdc04], 1
call dword [sym.imp.USER32.dll_SetClipboardViewer]
mov dword [esi + 0xdc00], eax
mov eax, dword [esi + 0xe0e8]
mov byte [esi + 0xdc04], 0
mov byte [esi + 0xc8], 0
test eax, eax
je 0x440946
cmp dword [eax + 8], 0
jne 0x44091f
mov dword [esi + 0xe118], 1
mov dword [esi + 0xe11c], 1
jmp 0x440946
lea eax, [esp + 0x2c]
push eax
push 0
push dword [esi + 0xdbfc]
push 0x43d680
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x440946
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.vncdesktopsink.cpp_:_OOOOOOOOOOOO_load_hookdlls_n
push 0
push 0x4f6c50
call fcn.00414f90
add esp, 0xc
mov dword [esi + 0xe12c], 0
lea eax, [esp + 0xc0]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4409cd
lea eax, [esp + 0xc0]
push 0x5c
push eax
call fcn.004ad400
add esp, 8
test eax, eax
je 0x440852
lea ecx, [esp + 0xc0]
mov byte [eax], 0
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4409a2
mov eax, dword [str._vnchooks.dll]
mov dword [ecx], eax
mov eax, dword [0x4e5cbc]
mov dword [ecx + 4], eax
mov eax, dword [0x4e5cc0]
mov dword [ecx + 8], eax
mov ax, word [0x4e5cc4]
mov word [ecx + 0xc], ax
push 0x104
lea eax, [esp + 0x2d4]
mov dword [esi + 0xe130], 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x440a36
lea eax, [esp + 0x2d0]
push 0x5c
push eax
call fcn.004ad400
add esp, 8
test eax, eax
je 0x440852
lea ecx, [esp + 0x2d0]
mov byte [eax], 0
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x440a15
mov eax, dword [str._schook.dll]
mov dword [ecx], eax
mov eax, dword [0x4e5ccc]
mov dword [ecx + 4], eax
mov eax, dword [0x4e5cd0]
mov dword [ecx + 8], eax
mov dword [esi + 0xe134], 0
cmp byte [0x503c94], 0
je 0x440aa8
push 0x104
lea eax, [esp + 0x1cc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x440aa8
lea eax, [esp + 0x1c8]
push 0x5c
push eax
call fcn.004ad400
add esp, 8
test eax, eax
je 0x440852
lea ecx, [esp + 0x1c8]
mov byte [eax], 0
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x440a87
mov eax, dword [str.w8hook.dll]
mov dword [ecx], eax
mov eax, dword [0x4e5cd8]
mov dword [ecx + 4], eax
mov eax, dword [0x4e5cdc]
mov dword [ecx + 8], eax
lea eax, [esp + 0xc0]
mov dword [esi + 0xe13c], 0
push eax
mov dword [esi + 0xe14c], 0
mov dword [esi + 0xe148], 0
mov dword [esi + 0xe154], 0
mov dword [esi + 0xe150], 0
mov dword [esi + 0xe138], 0
mov dword [esi + 0xe144], 0
mov dword [esi + 0xe140], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 0xe12c], eax
lea eax, [esp + 0x2d0]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 0xe130], eax
cmp byte [0x503c94], 0
je 0x440b3d
lea eax, [esp + 0x1c8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 0xe134], eax
cmp dword [esi + 0xe12c], 0
je 0x440ba6
push str.vnchook
push 0x10
push 0x4f9124
call fcn.004ad6d8
add esp, 0xc
push str.UnSetHooks
push dword [esi + 0xe12c]
call edi
push str.SetMouseFilterHook
push dword [esi + 0xe12c]
mov dword [esi + 0xe13c], eax
call edi
push str.SetKeyboardFilterHook
push dword [esi + 0xe12c]
mov dword [esi + 0xe14c], eax
call edi
push str.SetHooks
push dword [esi + 0xe12c]
mov dword [esi + 0xe148], eax
call edi
mov dword [esi + 0xe138], eax
mov eax, dword [esi + 0xe130]
test eax, eax
je 0x440bf7
push str.UnSetHook
push eax
call edi
push str.SetHook
push dword [esi + 0xe130]
mov dword [esi + 0xe144], eax
call edi
push str.SetMouseFilterHook
push dword [esi + 0xe130]
mov dword [esi + 0xe140], eax
call edi
push str.SetKeyboardFilterHook
push dword [esi + 0xe130]
mov dword [esi + 0xe154], eax
call edi
mov dword [esi + 0xe150], eax
mov eax, dword [esi + 0xe134]
mov dword [esi + 0xe158], 0
mov dword [esi + 0xe15c], 0
mov dword [esi + 0xe160], 0
test eax, eax
je 0x440c53
push str.StartW8
push eax
call edi
push str.StopW8
push dword [esi + 0xe134]
mov dword [esi + 0xe158], eax
call edi
push str.CaptureW8
push dword [esi + 0xe134]
mov dword [esi + 0xe15c], eax
call edi
mov dword [esi + 0xe160], eax
push str.vncdesktopsink.cpp_:_OOOOOOOOOOOO_start_dispatch_n
push 0
push 0x4f6c50
call fcn.00414f90
mov edi, dword [sym.imp.KERNEL32.dll_SetEvent]
add esp, 0xc
push dword [esi + 0xdbac]
call edi
jmp 0x440c86
mov edi, dword [sym.imp.KERNEL32.dll_SetEvent]
push 1
push 0
push 0
push 0
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x440ed5
push dword [esp + 0x60]
push dword [esp + 0x68]
push str.vncdesktopsink.cpp_:_OOOOOOOOOOOO__i__i_n
push 0
push 0x4f6c50
call fcn.00414f90
mov eax, dword [esp + 0x78]
add esp, 0x14
cmp eax, 0x113
jne 0x440cdb
cmp dword [esp + 0x68], 0x3e9
jne 0x440ce4
call fcn.00427290
mov eax, dword [esp + 0x64]
cmp eax, 0x12
je 0x440f02
cmp byte [0x501a96], 0
jne 0x440f02
cmp eax, 0x8008
je 0x440ee0
cmp eax, dword [0x503bec]
jne 0x440e5e
cmp byte [esi + 0xe174], 0
je 0x440c86
push str.vncdesktopsink.cpp_:_RFB_SCREEN_UPDATE___n
push 0
push 0x4f6c50
call fcn.00414f90
mov eax, dword [esp + 0x74]
add esp, 0xc
movsx ecx, ax
shr eax, 0x10
movsx edi, ax
mov eax, dword [esp + 0x6c]
movsx edx, ax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x30], ecx
shr eax, 0x10
movsx ecx, ax
mov eax, dword [esi + 0x74]
mov esi, dword [esp + 0x10]
sub esi, eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x10], esi
sub edx, eax
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x38], edx
sub ecx, dword [esi + 0x78]
sub edi, dword [esi + 0x78]
push ecx
push edi
push edx
push dword [esp + 0x1c]
mov dword [esp + 0x44], edi
push str.vncdesktopsink.cpp_:_REct3__i__i__i__i___n
push 0
push 0x4f6c50
mov dword [esp + 0x58], ecx
call fcn.00414f90
add esp, 0x1c
lea eax, [esi + 0xb8]
lea ecx, [esp + 0x30]
push eax
lea eax, [esp + 0xb4]
push eax
call fcn.00429460
mov edi, dword [sym.imp.KERNEL32.dll_SetEvent]
movdqu xmm0, xmmword [eax]
movd eax, xmm0
movdqa xmmword [esp + 0x30], xmm0
psrldq xmm0, 8
movd ecx, xmm0
mov dword [esp + 0x50], eax
mov dword [esp + 0x10], ecx
cmp eax, ecx
jge 0x440c86
mov edi, dword [esp + 0x34]
cmp edi, dword [esp + 0x3c]
jge 0x440c80
cmp byte [esi + 0xdbbc], 0
je 0x440e01
nop
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [esi + 0xdbbc], 0
jne 0x440df0
push 0x4d9f42
call fcn.004aec27
add esp, 4
mov dword [esp + 0x2c], eax
push dword [esp + 0x3c]
push dword [esp + 0x14]
push edi
push dword [esp + 0x5c]
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov ecx, dword [esi + 0xdbb4]
mov edi, eax
push 2
push edi
push ecx
push ecx
call dword [sym.imp.GDI32.dll_CombineRgn]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [esp + 0x2c]
call fcn.004ae337
mov edi, dword [sym.imp.KERNEL32.dll_SetEvent]
add esp, 4
push dword [esi + 0xdb98]
call edi
jmp 0x440c86
cmp eax, dword [0x503bf0]
jne 0x440e9f
cmp byte [esi + 0xe174], 0
je 0x440c86
push str.vncdesktopsink.cpp_:_RFB_MOUSE_UPDATE___n
push 0
push 0x4f6c50
call fcn.00414f90
add esp, 0xc
mov ecx, esi
push dword [esp + 0x68]
call fcn.0043e050
push dword [esi + 0xdb9c]
call edi
jmp 0x440c86
cmp eax, 0x403
jne 0x440eba
push str.vncdesktopsink.cpp_:_OOOOOOOOOOOO_called_wm_user3_n
push 0
push 0x4f6c50
call fcn.00414f90
add esp, 0xc
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x440c86
call dword [sym.imp.USER32.dll_WaitMessage]
jmp 0x440c86
push str.vncdesktopsink.cpp_:_OOOOOOOOOOOO_called_wm_user4_n
push 0
push 0x4f6c50
call fcn.00414f90
add esp, 0xc
push dword [esi + 0xdbfc]
call dword [sym.imp.USER32.dll_DestroyWindow]
jmp 0x440f2a
push str.vncdesktopsink.cpp_:_OOOOOOOOOOOO_called_wm_quit_n
push 0
push 0x4f6c50
call fcn.00414f90
add esp, 0xc
push dword [esi + 0xdbfc]
call dword [sym.imp.USER32.dll_DestroyWindow]
push dword [esi + 0xdba8]
call edi
push 0x3e9
push dword [esi + 0xdbfc]
call dword [sym.imp.USER32.dll_KillTimer]
mov eax, dword [esi + 0xe12c]
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x440f4e
push eax
call edi
mov eax, dword [esi + 0xe130]
test eax, eax
je 0x440f5b
push eax
call edi
mov eax, dword [esi + 0xe134]
test eax, eax
je 0x440f68
push eax
call edi
push dword [esp + 0x28]
call dword [sym.imp.USER32.dll_SetThreadDesktop]
push dword [esp + 0x48]
call dword [sym.imp.USER32.dll_CloseDesktop]
push str.vncdesktopsink.cpp_:_OOOOOOOOOOOO_end_dispatch_n
push 0
push 0x4f6c50
call fcn.00414f90
mov ecx, dword [esp + 0x4e8]
add esp, 0xc
mov dword [esi + 0xdbfc], 0
mov eax, 1
pop edi
pop esi
xor ecx, esp
call fcn.004aca59
mov esp, ebp
pop ebp
ret