Function at 0x471580
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x473378
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov ecx, esp
push str.start
call fcn.00408900
mov ecx, ebx
call fcn.00492190
push 0
mov ecx, ebx
call fcn.00493010
lea edi, [ebx + 0x20]
xor esi, esi
mov dword [ebp - 0x4c], edi
mov ecx, edi
call fcn.004720a0
test al, al
jne 0x4715e1
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0xa
jl 0x4715c5
lea eax, [ebp - 0xf]
mov ecx, edi
push eax
call fcn.004963f0
xor ecx, ecx
mov byte [ebp - 0xe], al
xorps xmm0, xmm0
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], ecx
movsd qword [ebp - 0x54], xmm0
mov dword [ebp - 0x24], ecx
call fcn.00408ce0
mov ecx, eax
test ecx, ecx
jne 0x471617
push 0x80004005
call fcn.00408b40
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x5c]
mov dword [ebp - 4], 0
call fcn.00471cf0
or esi, 0xffffffff
mov byte [ebp - 4], 1
cmp byte [ebx + 0x18], 0
jne 0x471b3b
mov ecx, dword [ebp - 0x28]
mov eax, ecx
inc ecx
mov dword [ebp - 0x28], ecx
cmp eax, 0xc
jle 0x471692
mov cl, byte [edi + 8]
mov eax, dword [edi + 0xc]
mov al, byte [edi + 0x10]
mov byte [ebp - 0x11], al
mov al, byte [edi + 0x11]
mov al, byte [edi + 0x12]
mov al, byte [edi + 0x14]
test cl, cl
je 0x471679
mov ecx, edi
call fcn.004720a0
test al, al
sete al
test al, al
jne 0x47168d
cmp byte [ebp - 0x11], 0
je 0x47168d
lea eax, [ebp - 0xf]
mov ecx, edi
push eax
call fcn.004963f0
mov byte [ebp - 0xe], al
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov ecx, edi
call fcn.00497030
inc dword [ebp - 0x24]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [ebp - 0x54]
movsd qword [ebp - 0x54], xmm0
call fcn.00408ce0
test eax, eax
je 0x47160d
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
cmp dword [ebx + 0x1c], 0xffffffff
mov byte [ebp - 4], 2
je 0x4717d5
cmp byte [ebx + 0x38], 0
je 0x4717d5
mov eax, dword [ebx + 0x1c]
mov ecx, edi
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00496010
mov edx, dword [eax]
mov edi, dword [ebp - 0x18]
add edi, 0xfffffff0
mov byte [ebp - 4], 3
mov dword [ebp - 0x3c], edx
lea esi, [edx - 0x10]
cmp esi, edi
je 0x47178d
cmp dword [edi + 0xc], 0
jl 0x471781
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x471781
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x47172e
cmp ecx, dword [esi]
jne 0x47172e
lock inc dword [eax]
jmp 0x471762
mov eax, dword [ecx]
lea edx, [esi + 4]
push 1
push dword [edx]
mov dword [ebp - 0x38], edx
call dword [eax]
mov esi, eax
test esi, esi
je 0x471b33
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax]
mov dword [esi + 4], ecx
mov ecx, dword [eax]
lea eax, [esi + 0x10]
inc ecx
push ecx
push dword [ebp - 0x3c]
push ecx
push eax
call fcn.00409af0
add esp, 0x10
or eax, 0xffffffff
lea ecx, [edi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x471779
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esi + 0x10]
mov dword [ebp - 0x18], eax
jmp 0x47178d
push dword [edx - 0xc]
lea ecx, [ebp - 0x18]
push edx
call fcn.00408ff0
mov edx, dword [ebp - 0x44]
or esi, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4717ae
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x47160d
push eax
push dword [ebp - 0x1c]
call fcn.0045702a
add esp, 8
lea edi, [ebx + 0x20]
test eax, eax
setne al
test al, al
je 0x4717d5
mov byte [ebx + 0x39], 1
mov ecx, dword [ebp - 0x2c]
mov eax, ecx
inc ecx
mov dword [ebp - 0x2c], ecx
cmp eax, 0xc
jle 0x471afc
xor ecx, ecx
cmp dword [ebx + 0x1c], 0xffffffff
mov dword [ebp - 0x2c], ecx
mov byte [ebp - 0xd], cl
mov byte [ebp - 0x10], cl
je 0x471967
cmp byte [ebx + 0x38], cl
jne 0x4718d1
mov eax, dword [ebx + 0x1c]
mov ecx, edi
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00496010
mov edx, dword [eax]
mov edi, dword [ebp - 0x18]
add edi, 0xfffffff0
mov byte [ebp - 4], 4
mov dword [ebp - 0x38], edx
lea esi, [edx - 0x10]
cmp esi, edi
je 0x4718b2
cmp dword [edi + 0xc], 0
jl 0x4718a6
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x4718a6
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x471853
cmp ecx, dword [esi]
jne 0x471853
lock inc dword [eax]
jmp 0x471887
mov eax, dword [ecx]
lea edx, [esi + 4]
push 1
push dword [edx]
mov dword [ebp - 0x3c], edx
call dword [eax]
mov esi, eax
test esi, esi
je 0x471b33
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax]
mov dword [esi + 4], ecx
mov ecx, dword [eax]
lea eax, [esi + 0x10]
inc ecx
push ecx
push dword [ebp - 0x38]
push ecx
push eax
call fcn.00409af0
add esp, 0x10
or eax, 0xffffffff
lea ecx, [edi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x47189e
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esi + 0x10]
mov dword [ebp - 0x18], eax
jmp 0x4718b2
push dword [edx - 0xc]
lea ecx, [ebp - 0x18]
push edx
call fcn.00408ff0
mov edx, dword [ebp - 0x48]
or eax, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4718d1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xe], 0
je 0x471952
mov al, byte [ebp - 0xf]
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x11], al
mov eax, dword [ebx + 0x1c]
push ecx
push 0x19
push eax
push 0
mov byte [ebp - 0x20], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
call sub.WTSAPI32.dll_WTSQuerySessionInformationA
test eax, eax
je 0x471952
cmp dword [ebp - 0x34], 0
mov ecx, dword [ebp - 0x30]
jbe 0x47193b
cmp dword [ecx], 1
jne 0x47193b
cmp byte [ebp - 0x11], 0
mov edx, dword [ecx + 0x10]
je 0x471928
cmp edx, 1
sete byte [ebp - 0x20]
jmp 0x47193b
mov eax, dword [ebp - 0x20]
test edx, edx
movzx eax, al
mov edx, 1
cmove eax, edx
mov dword [ebp - 0x20], eax
push ecx
call sub.WTSAPI32.dll_WTSFreeMemory
cmp byte [ebp - 0x20], 0
mov dword [ebp - 0x30], 0
mov byte [ebp - 0xd], 1
jne 0x471956
mov byte [ebp - 0xd], 0
mov eax, dword [ebx + 0x1c]
mov ecx, ebx
push eax
call section..eehzoi
test eax, eax
setne byte [ebp - 0x10]
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x47160d
mov esi, dword [ebp - 0x1c]
push edi
push esi
call fcn.0045702a
add esp, 8
test eax, eax
lea eax, [esi - 0x10]
lea esi, [edi - 0x10]
mov dword [ebp - 0x38], eax
setne byte [ebp - 0x12]
cmp esi, eax
je 0x471a20
cmp dword [eax + 0xc], 0
lea ecx, [eax + 0xc]
mov dword [ebp - 0x3c], ecx
jl 0x471a14
mov ecx, dword [esi]
cmp ecx, dword [eax]
jne 0x471a14
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x4719c3
cmp ecx, dword [esi]
jne 0x4719c3
mov edi, esi
lock inc dword [eax]
jmp 0x4719f2
mov eax, dword [ecx]
push 1
push dword [esi + 4]
call dword [eax]
mov edi, eax
test edi, edi
je 0x471b33
mov ecx, dword [esi + 4]
lea eax, [esi + 0x10]
mov dword [edi + 4], ecx
mov ecx, dword [esi + 4]
inc ecx
push ecx
push eax
push ecx
lea eax, [edi + 0x10]
push eax
call fcn.00409af0
add esp, 0x10
mov ecx, dword [ebp - 0x3c]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x471a0c
mov edx, dword [ebp - 0x38]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [edi + 0x10]
mov dword [ebp - 0x1c], eax
jmp 0x471a20
push dword [edi - 0xc]
lea ecx, [ebp - 0x1c]
push edi
call fcn.00408ff0
mov eax, dword [ebp - 0x24]
xorps xmm2, xmm2
movsd qword [ebp - 0x40], xmm2
test eax, eax
jle 0x471a45
movsd xmm1, qword [ebp - 0x54]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movsd qword [ebp - 0x40], xmm1
lea eax, [ebp - 0x68]
movsd qword [ebp - 0x54], xmm2
push eax
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x11], 0
call dword [sym.imp.KERNEL32.dll_GetSystemPowerStatus]
test eax, eax
je 0x471a6b
cmp byte [ebp - 0x68], 0
sete byte [ebp - 0x11]
cvttsd2si eax, qword [ebp - 0x40]
mov dword [ebx], eax
mov al, byte [ebp - 0x12]
mov byte [ebx + 8], al
cmp dword [ebx + 0x1c], 0xffffffff
setne al
mov byte [ebx + 9], al
mov al, byte [ebp - 0xd]
mov byte [ebx + 0xa], al
mov al, byte [ebp - 0x10]
mov byte [ebx + 0xb], al
mov al, byte [ebp - 0x11]
mov byte [ebx + 0xc], al
mov eax, dword [ebp - 0x60]
mov dword [ebx + 4], eax
mov byte [ebx + 0xd], 1
inc dword [ebx + 0x10]
cmp byte [ebx + 8], 0
sete dl
cmp dword [ebx], 0xa
setl cl
test dl, dl
je 0x471aba
test cl, cl
je 0x471aba
mov al, 1
jmp 0x471abc
xor al, al
cmp byte [ebx + 0xa], 0
jne 0x471ae6
cmp byte [ebx + 0xb], 0
jne 0x471aec
test al, al
je 0x471ad0
push 1
jmp 0x471af2
test cl, cl
je 0x471ad8
push 8
jmp 0x471af2
mov ecx, ebx
test dl, dl
je 0x471ae2
push 9
jmp 0x471af4
push 0
jmp 0x471af4
cmp byte [ebx + 0xb], 0
je 0x471af0
push 2
jmp 0x471af2
push 3
mov ecx, ebx
call fcn.00493010
or esi, 0xffffffff
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x18]
mov eax, esi
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x471b25
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebx + 0x18], 0
jne 0x471b38
lea edi, [ebx + 0x20]
jmp 0x471642
call fcn.0040a390
mov edi, dword [ebp - 0x4c]
mov ecx, edi
call fcn.004037d0
lea ecx, [ebp - 0x5c]
call fcn.00403f90
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x471b69
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret