Function at 0x5c7aef
Capabilities:
Get session information

Disassembly:
push 0x2fc
mov eax, 0x6dcf20
call fcn.00648b50
mov eax, ecx
mov dword [ebp - 0x20c], eax
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x278]
push str.NewTreeNetwork::FillRemoteDesktop
push eax
call fcn.005a14e8
xor eax, eax
mov dword [ebp - 4], eax
mov bl, al
mov dword [ebp - 0x1ac], eax
mov dword [ebp - 0x1c0], eax
mov dword [ebp - 0x208], eax
mov dword [ebp - 0x204], eax
mov dword [ebp - 0x200], eax
inc eax
mov byte [ebp - 4], al
call fcn.0058e340
neg eax
lea ecx, [ebp - 0x208]
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
push str.SYSTEMCurrentControlSetControlTerminal_Server
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0051e4ac
lea ecx, [ebp - 0x208]
test eax, eax
jne 0x5c83b8
lea eax, [ebp - 0x1b8]
push eax
push str.fDenyTSConnections
call fcn.00534ddd
test eax, eax
jne 0x5c7b9e
cmp dword [ebp - 0x1b8], eax
push 1
movzx ebx, bl
pop eax
cmove ebx, eax
push 0x6bb
lea ecx, [ebp - 0x1fc]
call fcn.006c22f9
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x110]
xor edi, edi
push eax
mov dword [ebp - 0x118], edi
call fcn.0052b35a
mov dword [ebp - 0xe0], edi
mov dword [ebp - 0xc0], edi
mov dword [ebp - 0xbc], edi
lea eax, [ebp - 0x118]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x24c]
mov ecx, esi
push eax
call fcn.005ad1f2
lea ecx, [ebp - 0xe0]
mov byte [ebp - 4], 6
call fcn.0051f634
lea ecx, [ebp - 0x110]
call fcn.006c2344
lea ecx, [ebp - 0x1fc]
mov byte [ebp - 4], 7
call fcn.006c2344
lea eax, [ebp - 0x24c]
push eax
lea ecx, [ebp - 0x2a8]
call fcn.005ad02d
push 0x741504
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 8
call fcn.00515719
mov dword [ebp - 0x234], edi
mov dword [ebp - 0x214], edi
test bl, bl
je 0x5c7c9a
push 0x640
lea ecx, [ebp - 0x1fc]
mov byte [ebp - 4], 9
call fcn.006c22f9
push edi
push edi
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 0xa
push ecx
push eax
lea ecx, [ebp - 0x88]
call fcn.00530696
push eax
lea eax, [ebp - 0x1c8]
mov byte [ebp - 4], 0xb
push eax
lea ecx, [ebp - 0x2a8]
call fcn.005ad24e
mov byte [ebp - 4], 0xc
jmp 0x5c7ce2
push 0x641
lea ecx, [ebp - 0x1fc]
mov byte [ebp - 4], 0xd
call fcn.006c22f9
push edi
push edi
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 0xe
push ecx
push eax
lea ecx, [ebp - 0x88]
call fcn.00530696
push eax
lea eax, [ebp - 0x1c8]
mov byte [ebp - 4], 0xf
push eax
lea ecx, [ebp - 0x2a8]
call fcn.005ad24e
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x1c4]
test ecx, ecx
je 0x5c7cf1
call fcn.0051578b
lea ecx, [ebp - 0x88]
call fcn.00530663
lea ecx, [ebp - 0x1fc]
call fcn.006c2344
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 8
call fcn.006c2344
lea ecx, [ebp - 0x1c8]
call fcn.00592f1a
mov edi, dword [ebp - 0x1c8]
movzx eax, bl
mov dword [edi + 0x74], eax
xor eax, eax
inc eax
mov byte [edi + 0x70], al
mov ebx, dword [edi + 0x7c]
mov esi, dword [edi + 0x78]
jmp 0x5c7d45
mov ecx, esi
call fcn.0059ac25
add esi, 0x64
cmp esi, ebx
jne 0x5c7d3b
mov eax, dword [edi + 0x78]
mov dword [edi + 0x7c], eax
lea eax, [ebp - 0x1c0]
push eax
lea eax, [ebp - 0x1ac]
push eax
xor eax, eax
inc eax
push eax
push 0
push 0
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
je 0x5c836c
xor esi, esi
mov dword [ebp - 0x1b8], esi
cmp dword [ebp - 0x1c0], esi
jbe 0x5c836c
push 7
xor ebx, ebx
pop edi
lea ecx, [ebp - 0x23c]
call fcn.006c21f2
xor ecx, ecx
mov dword [ebp - 0x54], edi
xor eax, eax
mov byte [ebp - 0x74], cl
mov dword [ebp - 0x70], ecx
mov byte [ebp - 0x6c], cl
mov dword [ebp - 0x58], ecx
mov word [ebp - 0x68], ax
mov byte [ebp - 0x50], cl
mov dword [ebp - 0x4c], ecx
mov byte [ebp - 0x48], cl
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], ecx
mov word [ebp - 0x44], ax
mov byte [ebp - 0x2c], cl
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ecx
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 0x13
mov ecx, dword [ebp - 0x1ac]
mov eax, dword [ebx + ecx]
mov dword [ebp - 0x70], eax
xor eax, eax
inc eax
mov byte [ebp - 0x74], al
push dword [ebx + ecx + 4]
lea ecx, [ebp - 0x1cc]
call fcn.00515719
lea edx, [ebp - 0x1cc]
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0xa0]
call fcn.00590d8b
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 0x15
cmp ecx, eax
je 0x5c7e1d
push 0xffffffffffffffff
push 0
push eax
call fcn.0052900d
xor eax, eax
lea ecx, [ebp - 0xa0]
inc eax
push 0
push eax
mov byte [ebp - 0x6c], al
call fcn.00529114
mov byte [ebp - 4], 0x13
mov ecx, dword [ebp - 0x1cc]
lea ecx, [ecx - 0x10]
call fcn.00515ed6
mov ecx, dword [ebp - 0x1ac]
mov eax, dword [ebx + ecx + 8]
mov dword [ebp - 0x4c], eax
xor eax, eax
inc eax
mov byte [ebp - 0x50], al
mov eax, dword [ebx + ecx + 8]
cmp eax, 9
ja case.0x5c7e63.2
jmp dword [eax*4 + 0x5c83d3]
push 0x6c4
lea ecx, [ebp - 0x1fc]
call fcn.006c22f9
mov byte [ebp - 4], 0x16
jmp 0x5c7f76
push 0x6bc
lea ecx, [ebp - 0x1fc]
call fcn.006c22f9
mov byte [ebp - 4], 0x17
jmp 0x5c7f76
push 0x6bd
lea ecx, [ebp - 0x1fc]
call fcn.006c22f9
mov byte [ebp - 4], 0x18
jmp 0x5c7f76
push 0x6be
lea ecx, [ebp - 0x1fc]
call fcn.006c22f9
mov byte [ebp - 4], 0x19
jmp 0x5c7f76
push 0x6bf
lea ecx, [ebp - 0x1fc]
call fcn.006c22f9
mov byte [ebp - 4], 0x1a
jmp 0x5c7f76
push 0x6c0
lea ecx, [ebp - 0x1fc]
call fcn.006c22f9
push eax
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 0x1b
call fcn.0054622d
lea ecx, [ebp - 0x1fc]
mov byte [ebp - 4], 0x13
call fcn.006c2344
lea ecx, [ebp - 0x74]
call fcn.00592f89
lea ecx, [ebp - 0x74]
call fcn.0059ac25
lea ecx, [ebp - 0x23c]
call fcn.006c2344
jmp 0x5c8356
push 0x6c1
lea ecx, [ebp - 0x1fc]
call fcn.006c22f9
mov byte [ebp - 4], 0x1c
jmp 0x5c7f76
push 0x6c2
lea ecx, [ebp - 0x1fc]
call fcn.006c22f9
mov byte [ebp - 4], 0x1d
jmp 0x5c7f76
push 0x6c3
lea ecx, [ebp - 0x1fc]
call fcn.006c22f9
mov byte [ebp - 4], 0x1e
push eax
lea ecx, [ebp - 0x23c]
call fcn.0054622d
lea ecx, [ebp - 0x1fc]
mov byte [ebp - 4], 0x13
call fcn.006c2344
call fcn.00515e26
push eax
lea ecx, [ebp - 0x1bc]
call fcn.00515c3a
mov byte [ebp - 4], 0x1f
call fcn.00515e26
push eax
lea ecx, [ebp - 0x1b4]
call fcn.00515c3a
mov byte [ebp - 4], 0x20
lea ecx, [ebp - 0x244]
mov eax, dword [ebp - 0x1ac]
push str.NewTreeNetwork::WtsGetInfo
push dword [ebp - 0x20c]
mov esi, dword [ebx + eax]
call fcn.005a14e8
lea eax, [ebp - 0x250]
mov byte [ebp - 4], 0x21
and dword [ebp - 0x1b0], 0
push eax
lea eax, [ebp - 0x1b0]
push eax
push edi
push esi
xor esi, esi
push esi
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x5c802b
mov ecx, dword [ebp - 0x1b0]
call fcn.0051545a
push eax
push dword [ebp - 0x1b0]
lea ecx, [ebp - 0x1b4]
call fcn.00515b15
push dword [ebp - 0x1b0]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
lea ecx, [ebp - 0x244]
mov byte [ebp - 4], 0x20
call fcn.005a1446
mov eax, dword [ebp - 0x1ac]
lea ecx, [ebp - 0x1fc]
push dword [ebx + eax + 4]
call fcn.00515719
mov dword [ebp - 0x1f4], esi
mov dword [ebp - 0x1d4], esi
lea eax, [ebp - 0x1fc]
mov byte [ebp - 4], 0x22
push eax
lea ecx, [ebp - 0x300]
mov dword [ebp - 0x308], esi
call fcn.0052b35a
mov dword [ebp - 0x2d0], esi
mov dword [ebp - 0x2b0], esi
mov dword [ebp - 0x2ac], esi
lea eax, [ebp - 0x308]
mov byte [ebp - 4], 0x23
push eax
lea eax, [ebp - 0x258]
push eax
lea ecx, [ebp - 0x2a8]
call fcn.005ad1f2
push eax
lea ecx, [ebp - 0x290]
mov byte [ebp - 4], 0x24
call fcn.005ad02d
mov byte [ebp - 4], 0x27
mov ecx, dword [ebp - 0x254]
test ecx, ecx
je 0x5c80c9
call fcn.0051578b
lea ecx, [ebp - 0x2d0]
mov byte [ebp - 4], 0x29
call fcn.0051f634
lea ecx, [ebp - 0x300]
call fcn.006c2344
lea ecx, [ebp - 0x1fc]
mov byte [ebp - 4], 0x2a
call fcn.006c2344
push 0x6c7
lea ecx, [ebp - 0xb8]
call fcn.006c22f9
push esi
push esi
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 0x2b
push ecx
push eax
lea ecx, [ebp - 0x130]
call fcn.00530696
push eax
lea eax, [ebp - 0x260]
mov byte [ebp - 4], 0x2c
push eax
lea ecx, [ebp - 0x290]
call fcn.005ad24e
mov byte [ebp - 4], 0x2d
mov ecx, dword [ebp - 0x25c]
test ecx, ecx
je 0x5c8145
call fcn.0051578b
lea ecx, [ebp - 0x130]
call fcn.00530663
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 0x2a
call fcn.006c2344
mov edi, dword [ebp - 0x1bc]
cmp dword [edi - 0xc], 0
je 0x5c8239
lea eax, [ebp - 0x1bc]
push eax
lea ecx, [ebp - 0xb8]
call fcn.006c22ac
push 0x6c5
lea ecx, [ebp - 0xe8]
mov byte [ebp - 4], 0x2e
call fcn.006c22f9
push esi
push esi
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 0x2f
push ecx
push eax
lea ecx, [ebp - 0x1a8]
call fcn.00530696
push eax
lea eax, [ebp - 0x268]
mov byte [ebp - 4], 0x30
push eax
lea ecx, [ebp - 0x290]
call fcn.005ad24e
mov byte [ebp - 4], 0x31
mov ecx, dword [ebp - 0x264]
test ecx, ecx
je 0x5c81d8
call fcn.0051578b
lea ecx, [ebp - 0x1a8]
call fcn.00530663
lea ecx, [ebp - 0xe8]
call fcn.006c2344
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 0x2a
call fcn.006c2344
lea edx, [ebp - 0x1bc]
lea ecx, [ebp - 0xa0]
call fcn.00590d8b
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0x32
cmp ecx, eax
je 0x5c8222
push 0xffffffffffffffff
push esi
push eax
call fcn.0052900d
xor eax, eax
mov byte [ebp - 4], 0x2a
inc eax
lea ecx, [ebp - 0xa0]
push esi
push eax
mov byte [ebp - 0x48], al
call fcn.00529114
mov esi, dword [ebp - 0x1b4]
cmp dword [esi - 0xc], 0
je 0x5c8317
lea eax, [ebp - 0x1b4]
push eax
lea ecx, [ebp - 0xb8]
call fcn.006c22ac
push 0x6c6
lea ecx, [ebp - 0xe8]
mov byte [ebp - 4], 0x33
call fcn.006c22f9
push 0
push 0
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 0x34
push ecx
push eax
lea ecx, [ebp - 0x1a8]
call fcn.00530696
push eax
lea eax, [ebp - 0x270]
mov byte [ebp - 4], 0x35
push eax
lea ecx, [ebp - 0x290]
call fcn.005ad24e
mov byte [ebp - 4], 0x36
mov ecx, dword [ebp - 0x26c]
test ecx, ecx
je 0x5c82b4
call fcn.0051578b
lea ecx, [ebp - 0x1a8]
call fcn.00530663
lea ecx, [ebp - 0xe8]
call fcn.006c2344
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 0x2a
call fcn.006c2344
lea edx, [ebp - 0x1b4]
lea ecx, [ebp - 0xa0]
call fcn.00590d8b
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0x37
cmp ecx, eax
je 0x5c82ff
push 0xffffffffffffffff
push 0
push eax
call fcn.0052900d
xor eax, eax
mov byte [ebp - 4], 0x2a
inc eax
lea ecx, [ebp - 0xa0]
push 0
push eax
mov byte [ebp - 0x2c], al
call fcn.00529114
lea ecx, [ebp - 0x74]
call fcn.00592f89
lea ecx, [ebp - 0x290]
call fcn.005ad08b
lea ecx, [esi - 0x10]
call fcn.00515ed6
lea ecx, [edi - 0x10]
call fcn.00515ed6
lea ecx, [ebp - 0x74]
call fcn.0059ac25
lea ecx, [ebp - 0x23c]
call fcn.006c2344
mov esi, dword [ebp - 0x1b8]
push 7
pop edi
inc esi
add ebx, 0xc
mov dword [ebp - 0x1b8], esi
cmp esi, dword [ebp - 0x1c0]
jb 0x5c7d8c
cmp dword [ebp - 0x1ac], 0
je 0x5c8381
push dword [ebp - 0x1ac]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov byte [ebp - 4], 0x38
mov ecx, dword [ebp - 0x1c4]
test ecx, ecx
je 0x5c8394
call fcn.0051578b
lea ecx, [ebp - 0x2a8]
call fcn.005ad08b
mov byte [ebp - 4], 0x39
mov ecx, dword [ebp - 0x248]
test ecx, ecx
je 0x5c83b2
call fcn.0051578b
lea ecx, [ebp - 0x208]
call fcn.0051e50a
lea ecx, [ebp - 0x278]
call fcn.005a1446
call fcn.00648afa
ret 4