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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x3f8
mov eax, dword [0x5c3040]
xor eax, esp
mov dword [esp + 0x3f4], eax
push esi
push edi
push str.vncDesktop::InitWindow_:_InitWindow_called_n
push 0
push 0x5c3db0
mov esi, ecx
call fcn.0041dde0
add esp, 0xc
push 0x400001cf
push 0
push 0
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov edi, eax
mov ecx, str.vncDesktop::InitWindow_:_InitWindow:OpenInputdesktop_OK_n
mov eax, str.vncDesktop::InitWindow_:_InitWindow:OpenInputdesktop_Error__n
mov dword [esp + 0x7c], edi
test edi, edi
cmove ecx, eax
push ecx
push 0
push 0x5c3db0
call fcn.0041dde0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetThreadDesktop]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0xc8]
push eax
push 0x100
lea eax, [esp + 0x300]
push eax
push 2
push edi
call dword [sym.imp.USER32.dll_GetUserObjectInformationA]
test eax, eax
jne 0x458a7c
push str.vncDesktop::InitWindow_:_InitWindow:_GetUserObjectInformation__n
push eax
push 0x5c3db0
call fcn.0041dde0
add esp, 0xc
push dword [esp + 0x3c]
lea eax, [esp + 0x2fc]
push edi
push eax
push str.vncDesktop::InitWindow_:_InitWindow:SelectHDESK_to__s___x__from__x_n
push 0
push 0x5c3db0
call fcn.0041dde0
mov eax, dword [sym.imp.USER32.dll_SetThreadDesktop]
add esp, 0x18
mov dword [esp + 0x78], eax
push edi
call eax
test eax, eax
jne 0x458ac0
push str.vncDesktop::InitWindow_:_InitWindow:SelectHDESK:_SetThreadDesktop__n
push eax
push 0x5c3db0
call fcn.0041dde0
add esp, 0xc
mov edi, dword [sym.imp.USER32.dll_ChangeWindowMessageFilter]
push 1
push dword [0x5d19ec]
call edi
push 1
push dword [0x5d19e0]
call edi
push 1
push dword [0x5d19e8]
call edi
push 1
push 0x12
call edi
push 1
push 0x8008
call edi
cmp word [0x5c6e38], 0
jne 0x458bd9
mov eax, dword [0x5d07c8]
push 0
mov dword [esp + 0x9c], 0x30
mov dword [esp + 0xa0], 0
mov dword [esp + 0xa4], 0x457e90
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], 0
mov dword [esp + 0xb8], 0
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0xb8], eax
lea eax, [esp + 0x98]
push eax
mov dword [esp + 0xc0], 0
mov dword [esp + 0xc4], 0x57a744
mov dword [esp + 0xc8], 0
call dword [sym.imp.USER32.dll_RegisterClassExA]
mov word [0x5c6e38], ax
test ax, ax
jne 0x458bd9
push str.vncDesktop::InitWindow_:_failed_to_register_window_class_n
push 0
push 0x5c3db0
call fcn.0041dde0
add esp, 0xc
push dword [esi + 0xe398]
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x3f4]
xor ecx, esp
call fcn.00524763
mov esp, ebp
pop ebp
ret
push 0
push dword [0x5d07c8]
push 0
push 0
push 0xc8
push 0x190
push connect
push connect
push 0xcf0000
push 0x5adfa8
push 0x57a744
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [esi + 0xe404], eax
test eax, eax
jne 0x458c21
push str.vncDesktop::InitWindow_:_failed_to_create_hook_window_n
jmp 0x458ba8
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 0x5c3db0
mov dword [esi + 0xe408], eax
mov byte [esi + 0xe40c], 0
call fcn.0041dde0
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0xf4]
add esp, 0xc
mov dword [esi + 0xe904], 0
push 0x104
push eax
push 0
call edi
test eax, eax
je 0x458cd3
lea eax, [esp + 0xe8]
push 0x5c
push eax
call fcn.00525fd0
add esp, 8
test eax, eax
je 0x458bc3
push str._vnchooks.dll
mov byte [eax], 0
lea eax, [esp + 0xec]
push 0x104
push eax
call fcn.0052c1fd
add esp, 0xc
push 0x104
lea eax, [esp + 0x1f4]
mov dword [esi + 0xe908], 0
push eax
push 0
call edi
test eax, eax
je 0x458d29
lea eax, [esp + 0x1f0]
push 0x5c
push eax
call fcn.00525fd0
add esp, 8
test eax, eax
je 0x458bc3
push str._schook_legacy.dll
mov byte [eax], 0
lea eax, [esp + 0x1f4]
push 0x104
push eax
call fcn.0052c1fd
add esp, 0xc
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea eax, [esp + 0xe8]
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 + 0x1f0]
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 0x458df6
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 0x458e47
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 0x5c3db0
call fcn.0041dde0
mov edi, dword [sym.imp.KERNEL32.dll_SetEvent]
add esp, 0xc
mov dword [esp + 0x14], edi
push dword [esi + 0xe398]
call edi
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [sym.imp.USER32.dll_PeekMessageA]
mov dword [esp + 0x38], eax
mov eax, dword [sym.imp.USER32.dll_TranslateMessage]
mov dword [esp + 0x6c], eax
mov eax, dword [sym.imp.USER32.dll_DispatchMessageA]
mov dword [esp + 0x70], eax
mov eax, dword [sym.imp.USER32.dll_WaitMessage]
mov dword [esp + 0x74], eax
mov eax, dword [sym.imp.GDI32.dll_CombineRgn]
mov dword [esp + 0x64], eax
mov eax, dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [esp + 0x68], eax
mov eax, dword [sym.imp.GDI32.dll_CreateRectRgn]
mov dword [esp + 8], ecx
mov dword [esp + 0x60], eax
jmp 0x458ebc
mov edi, dword [esp + 0x14]
push 1
push 0
push 0
push 0
lea eax, [esp + 0xdc]
push eax
call ecx
test eax, eax
je 0x45915b
mov eax, dword [esp + 0xd0]
cmp eax, 0x12
je 0x45918a
cmp byte [0x5c64d5], 0
jne 0x45918a
cmp eax, 0x8008
je 0x459168
cmp eax, dword [0x5d19ec]
jne 0x4590bc
push str.vnchook
push 0x10
push 0x5c6e3c
call fcn.00535a54
mov ecx, dword [esp + 0x14]
add esp, 0xc
cmp byte [esi + 0xe93c], 0
je 0x458ebc
push str.vncDesktop::InitWindow_:_RFB_SCREEN_UPDATE___n
push 0
push 0x5c3db0
call fcn.0041dde0
mov eax, dword [esp + 0xe0]
add esp, 0xc
movsx edi, ax
shr eax, 0x10
movsx ecx, ax
mov eax, dword [esp + 0xd8]
movsx edx, ax
shr eax, 0x10
cwde
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x858]
sub edx, eax
sub edi, eax
mov dword [esp + 0x18], edx
mov eax, dword [esi + 0x85c]
sub ecx, eax
sub dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
push eax
push ecx
push edx
push edi
push str.vncDesktop::InitWindow_:_REct3__i__i__i__i___n
push 0
push 0x5c3db0
mov dword [esp + 0x5c], edi
mov dword [esp + 0x64], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x68], eax
call fcn.0041dde0
lea edx, [esi + 0x898]
add esp, 0x1c
cmp edi, dword [edx]
lea eax, [esp + 0x40]
mov edi, dword [esp + 0xc]
lea ecx, [esp + 0x44]
cmovl eax, edx
cmp edi, dword [edx + 4]
mov edi, dword [esp + 0x18]
mov eax, dword [eax]
mov dword [esp + 0x20], eax
mov dword [esp + 0x80], eax
lea eax, [edx + 4]
cmovl ecx, eax
cmp dword [edx + 8], edi
mov eax, dword [ecx]
lea ecx, [esp + 0x48]
mov dword [esp + 0x84], eax
mov dword [esp + 0xc], eax
lea eax, [edx + 8]
cmovl ecx, eax
lea eax, [edx + 0xc]
mov edx, dword [esp + 0x10]
cmp dword [eax], edx
mov edi, dword [ecx]
lea ecx, [esp + 0x4c]
cmovl ecx, eax
mov dword [esp + 0x88], edi
cmp dword [esp + 0x20], edi
mov dword [esp + 0x58], edi
mov edi, dword [esp + 0x14]
mov eax, dword [ecx]
mov ecx, dword [esp + 8]
mov dword [esp + 0x8c], eax
movaps xmm0, xmmword [esp + 0x80]
mov dword [esp + 0x18], eax
movaps xmmword [esp + 0x40], xmm0
jge 0x458ebc
mov edi, dword [esp + 0xc]
cmp edi, eax
jge 0x458eb8
cmp byte [esi + 0xe3a8], 0
je 0x459063
push 5
call dword [esp + 0x3c]
cmp byte [esi + 0xe3a8], 0
jne 0x459054
push 0x579be0
call fcn.00535058
add esp, 4
mov dword [esp + 0xc], eax
push dword [esp + 0x18]
push dword [esp + 0x5c]
push edi
push dword [esp + 0x2c]
call dword [esp + 0x70]
mov ecx, dword [esi + 0xe3a0]
mov edi, eax
push 2
push edi
push ecx
push ecx
call dword [esp + 0x74]
push edi
call dword [esp + 0x6c]
push dword [esp + 0xc]
call fcn.0052a52b
mov edi, dword [esp + 0x18]
add esp, 4
push dword [esi + 0xe374]
call edi
mov ecx, dword [esp + 8]
jmp 0x458ebc
cmp eax, dword [0x5d19e8]
jne 0x45911f
cmp byte [esi + 0xe93c], 0
mov ecx, dword [esp + 8]
je 0x458ebc
push str.vncDesktop::InitWindow_:_RFB_MOUSE_UPDATE___n
push 0
push 0x5c3db0
call fcn.0041dde0
mov ecx, dword [esp + 0xe0]
add esp, 0xc
test ecx, ecx
jne 0x4590fc
mov ecx, dword [esi + 0xe890]
jmp 0x459108
mov eax, dword [esi + 0xe888]
mov dword [esi + 0xe88c], eax
mov dword [esi + 0xe888], ecx
push dword [esi + 0xe378]
call edi
mov ecx, dword [esp + 8]
jmp 0x458ebc
cmp eax, 0x403
jne 0x45913a
push str.vncDesktop::InitWindow_:_OOOOOOOOOOOO_called_wm_user3_n
push 0
push 0x5c3db0
call fcn.0041dde0
add esp, 0xc
lea eax, [esp + 0xcc]
push eax
call dword [esp + 0x70]
lea eax, [esp + 0xcc]
push eax
call dword [esp + 0x74]
mov ecx, dword [esp + 8]
jmp 0x458ebc
call dword [esp + 0x74]
mov ecx, dword [esp + 8]
jmp 0x458ebc
push str.vncDesktop::InitWindow_:_OOOOOOOOOOOO_called_wm_user4_n
push 0
push 0x5c3db0
call fcn.0041dde0
add esp, 0xc
push dword [esi + 0xe404]
call dword [sym.imp.USER32.dll_DestroyWindow]
jmp 0x4591b2
push str.vncDesktop::InitWindow_:_OOOOOOOOOOOO_called_wm_quit_n
push 0
push 0x5c3db0
call fcn.0041dde0
add esp, 0xc
push dword [esi + 0xe404]
call dword [sym.imp.USER32.dll_DestroyWindow]
push dword [esi + 0xe384]
call edi
cmp dword [0x5c6a1c], 0
je 0x4591cd
mov edi, dword [esp + 0x38]
nop
push 0x64
call edi
cmp dword [0x5c6a1c], 0
jne 0x4591c0
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 0x4591f1
push eax
call edi
mov eax, dword [esi + 0xe908]
test eax, eax
je 0x4591fe
push eax
call edi
push dword [esp + 0x3c]
call dword [esp + 0x7c]
push dword [esp + 0x7c]
call dword [sym.imp.USER32.dll_CloseDesktop]
push str.vncDesktop::InitWindow_:_OOOOOOOOOOOO_end_dispatch_n
push 0
push 0x5c3db0
call fcn.0041dde0
mov ecx, dword [esp + 0x408]
add esp, 0xc
mov dword [esi + 0xe404], 0
mov eax, 1
pop edi
pop esi
xor ecx, esp
call fcn.00524763
mov esp, ebp
pop ebp
ret