Function at 0x522a00
Capabilities:
Migrate process to active window station

Disassembly:
push ebp
lea ebp, [esp - 0x230]
sub esp, 0x230
push 0xffffffffffffffff
push 0x5c6e9f
mov eax, dword fs:[0]
push eax
sub esp, 0x164
mov eax, dword [0x61f138]
xor eax, ebp
mov dword [ebp + 0x22c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 0x2000000
push 0
push str.WinSta0
call dword [sym.imp.USER32.dll_OpenWindowStationW]
mov esi, eax
test esi, esi
je 0x522a69
push esi
call dword [sym.imp.USER32.dll_SetProcessWindowStation]
push esi
call dword [sym.imp.USER32.dll_CloseWindowStation]
jmp 0x522b0d
sub esp, 8
lea ecx, [ebp - 0xc0]
call fcn.00443510
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.OpenWindowStation_error_
lea ecx, [ebp - 0xb0]
call fcn.00449a40
mov ecx, eax
call fcn.00456240
lea eax, [ebp]
push eax
lea ecx, [ebp - 0xc0]
call fcn.004433d0
push 0x96
mov edx, str.capturebuffer.cpp
mov byte [ebp - 4], 1
mov ecx, eax
call fcn.004c2da0
mov byte [ebp - 4], 0
add esp, 4
mov edx, dword [ebp + 0x14]
cmp edx, 0x10
jb 0x522afb
mov ecx, dword [ebp]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x522af1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x522f1c
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.0043aef0
push 0x212
lea eax, [ebp + 0x18]
xor bl, bl
push 0
push eax
call fcn.00586880
add esp, 0xc
push 0x2000000
push 0
push 0
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov esi, eax
test esi, esi
je 0x522c9f
push 0
push 0x212
lea eax, [ebp + 0x18]
push eax
push 2
push esi
call dword [sym.imp.USER32.dll_GetUserObjectInformationW]
cmp eax, 1
jne 0x522c93
lea ecx, [ebp + 0x18]
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x522b60
sub ecx, edx
sar ecx, 1
je 0x522c93
lea ecx, [ebp + 0x18]
mov eax, edi
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x522ba6
test dx, dx
je 0x522ba2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x522ba6
add eax, 4
add ecx, 4
test dx, dx
jne 0x522b80
xor eax, eax
jmp 0x522bab
sbb eax, eax
or eax, 1
test eax, eax
je 0x522c93
push esi
call dword [sym.imp.USER32.dll_SetThreadDesktop]
cmp eax, 1
jne 0x522bee
lea ecx, [ebp + 0x18]
mov edx, edi
mov eax, ecx
sub edx, eax
jmp 0x522bd0
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x522bd0
push esi
mov bl, 1
call dword [sym.imp.USER32.dll_CloseDesktop]
jmp 0x522d44
sub esp, 8
lea ecx, [ebp - 0xc0]
call fcn.00443510
mov dword [ebp - 4], 2
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
mov edx, str.SetThreadDesktop_error_
lea ecx, [ebp - 0xb0]
call fcn.00449a40
mov ecx, eax
call fcn.00456240
lea eax, [ebp]
push eax
lea ecx, [ebp - 0xc0]
call fcn.004433d0
push 0xa5
mov edx, str.capturebuffer.cpp
mov byte [ebp - 4], 3
mov ecx, eax
call fcn.004c2da0
mov byte [ebp - 4], 2
add esp, 4
mov edx, dword [ebp + 0x14]
cmp edx, 0x10
jb 0x522c81
mov ecx, dword [ebp]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x522c77
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x522f21
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.0043aef0
push esi
call dword [sym.imp.USER32.dll_CloseDesktop]
jmp 0x522d44
sub esp, 8
lea ecx, [ebp - 0xc0]
call fcn.00443510
mov dword [ebp - 4], 4
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
mov edx, str.OpenInputDesktop_error_
lea ecx, [ebp - 0xb0]
call fcn.00449a40
mov ecx, eax
call fcn.00456240
lea eax, [ebp]
push eax
lea ecx, [ebp - 0xc0]
call fcn.004433d0
push 0xab
mov edx, str.capturebuffer.cpp
mov byte [ebp - 4], 5
mov ecx, eax
call fcn.004c2da0
mov byte [ebp - 4], 4
add esp, 4
mov edx, dword [ebp + 0x14]
cmp edx, 0x10
jb 0x522d32
mov ecx, dword [ebp]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x522d28
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x522f26
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.0043aef0
lea ecx, [ebp + 0x18]
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x522d50
sub ecx, edx
sar ecx, 1
jne 0x522ef7
push 0x2000000
push 0
push 0
push str.Default
call dword [sym.imp.USER32.dll_OpenDesktopW]
mov esi, eax
test esi, esi
je 0x522e62
push esi
call dword [sym.imp.USER32.dll_SetThreadDesktop]
cmp eax, 1
jne 0x522dbd
mov ecx, dword [str.Default]
mov bl, 1
mov dword [edi], ecx
mov eax, dword [0x5f72f8]
mov dword [edi + 4], eax
mov eax, dword [0x5f72fc]
mov dword [edi + 8], eax
mov eax, dword [0x5f7300]
push esi
mov dword [edi + 0xc], eax
call dword [sym.imp.USER32.dll_CloseDesktop]
jmp 0x522ef7
sub esp, 8
lea ecx, [ebp - 0xc0]
call fcn.00443510
mov dword [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.SetThreadDesktop_error_
lea ecx, [ebp - 0xb0]
call fcn.00449a40
mov ecx, eax
call fcn.00456240
lea eax, [ebp]
push eax
lea ecx, [ebp - 0xc0]
call fcn.004433d0
push 0xb8
mov edx, str.capturebuffer.cpp
mov byte [ebp - 4], 7
mov ecx, eax
call fcn.004c2da0
mov edx, dword [ebp + 0x14]
add esp, 4
cmp edx, 0x10
jb 0x522e4b
mov ecx, dword [ebp]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x522e41
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x522f2b
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea ecx, [ebp - 0xc0]
call fcn.0043aef0
push esi
call dword [sym.imp.USER32.dll_CloseDesktop]
jmp 0x522ef7
sub esp, 8
lea ecx, [ebp - 0x170]
call fcn.00443510
mov dword [ebp - 4], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.OpenDesktop_error_
lea ecx, [ebp - 0x160]
call fcn.00449a40
mov ecx, eax
call fcn.00456240
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x170]
call fcn.004433d0
push 0xbc
mov edx, str.capturebuffer.cpp
mov byte [ebp - 4], 9
mov ecx, eax
call fcn.004c2da0
mov edx, dword [ebp + 0x14]
add esp, 4
cmp edx, 0x10
jb 0x522eec
mov ecx, dword [ebp]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x522ee2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x522f30
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea ecx, [ebp - 0x170]
call fcn.0043aef0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x22c]
xor ecx, ebp
call fcn.0056eeb4
lea esp, [ebp + 0x230]
pop ebp
ret
call fcn.00591dc6
call fcn.00591dc6
call fcn.00591dc6
call fcn.00591dc6
call fcn.00591dc6
int3