Function at 0x40d3e0
Capabilities:
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x481bf8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a4720]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
lea eax, [esp + 0x30]
xor ebx, ebx
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
call fcn.0042fdf0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push edx
push 1
push ebx
push ebx
mov dword [esp + 0x64], ebx
call sub.WTSAPI32.dll_WTSEnumerateSessionsW
test eax, eax
jne 0x40d472
push str.WTSEnumerateSessions_Failed.
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x40d452
push eax
call fcn.00443d41
add esp, 4
mov eax, dword [esp + 0x30]
push eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
call fcn.00443d41
add esp, 4
xor eax, eax
jmp 0x40d612
xor ebp, ebp
cmp dword [esp + 0x18], ebx
jle 0x40d4f0
mov eax, dword [esp + 0x40]
xor edi, edi
mov ecx, dword [esp + 0x1c]
cmp dword [edi + ecx + 8], ebx
jne 0x40d4e6
mov edx, dword [esp + 0x3c]
mov esi, dword [edi + ecx]
mov dword [esp + 0x24], esi
cmp edx, ebx
jne 0x40d49d
xor ecx, ecx
jmp 0x40d4a6
mov ecx, dword [esp + 0x44]
sub ecx, edx
sar ecx, 2
mov ebx, eax
sub ebx, edx
sar ebx, 2
cmp ebx, ecx
jae 0x40d4bc
mov dword [eax], esi
add eax, 4
mov dword [esp + 0x40], eax
jmp 0x40d4e4
mov esi, eax
cmp edx, eax
jbe 0x40d4c7
call fcn.00462656
mov eax, dword [esp + 0x30]
push esi
push eax
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x40]
call fcn.0040dd30
mov eax, dword [esp + 0x40]
xor ebx, ebx
inc ebp
add edi, 0xc
cmp ebp, dword [esp + 0x18]
jl 0x40d480
mov eax, dword [esp + 0x1c]
push eax
call sub.WTSAPI32.dll_WTSFreeMemory
mov eax, dword [esp + 0x40]
sub eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
sar eax, 2
mov dword [esi], ebx
mov dword [ecx], ebx
cmp eax, ebx
je 0x40d5e4
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00443d36
mov dword [esi], eax
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
add esp, 4
cmp esi, eax
jbe 0x40d549
call fcn.00462656
mov eax, dword [esp + 0x40]
mov ebp, dword [esp + 0x30]
lea ecx, [ecx]
mov edi, eax
cmp dword [esp + 0x3c], eax
jbe 0x40d55d
call fcn.00462656
cmp ebp, ebx
je 0x40d567
cmp ebp, dword [esp + 0x30]
je 0x40d56c
call fcn.00462656
cmp esi, edi
je 0x40d5d4
cmp ebp, ebx
jne 0x40d5ca
call fcn.00462656
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x40d585
call fcn.00462656
mov eax, dword [esi]
mov ebx, dword [esp + 0x5c]
mov edi, dword [esp + 0x58]
push eax
call fcn.0040d630
test eax, eax
je 0x40d5aa
mov ecx, dword [esp + 0x64]
mov edi, dword [esp + 0x60]
mov edx, dword [ecx]
mov edi, dword [edi]
mov dword [edi + edx*4], eax
inc dword [ecx]
test ebp, ebp
jne 0x40d5cf
call fcn.00462656
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x40d5bf
call fcn.00462656
mov eax, dword [esp + 0x40]
add esi, 4
xor ebx, ebx
jmp 0x40d550
mov eax, dword [ebp]
jmp 0x40d57b
mov eax, dword [ebp]
jmp 0x40d5b5
mov eax, dword [esp + 0x64]
cmp dword [eax], ebx
jle 0x40d5e4
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x40d5f5
push eax
call fcn.00443d41
add esp, 4
mov ecx, dword [esp + 0x30]
push ecx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
call fcn.00443d41
mov eax, dword [esp + 0x24]
add esp, 4
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 0x10