Function at 0x407677
Capabilities:
Enumerate gui resources
Enumerate processes
Enumerate processes on remote desktop session host

Disassembly:
push ebp
sub esp, 0x160
lea ebp, [esp - 4]
mov eax, dword [0x4541c0]
xor eax, ebp
mov dword [ebp + 0x160], eax
push 0xe4
mov eax, 0x441319
call fcn.0042baa9
mov ebx, ecx
call fcn.0042c6c8
mov dword [ebx], eax
lea eax, [ebx + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea ecx, [ebp - 0x78]
mov dword [ebx + 0x4c], 1
call fcn.00406268
mov eax, dword [ebx + 0x64]
sub eax, dword [ebx + 0x60]
push 0x1c
cdq
pop ecx
idiv ecx
and dword [ebp - 4], 0
mov esi, eax
push esi
mov dword [ebp - 0x2c], esi
call fcn.0041c91c
push esi
mov dword [ebp - 0x28], eax
call fcn.0041c91c
mov edi, eax
push esi
mov dword [ebp - 0x58], edi
call fcn.0041c91c
push esi
mov dword [ebp - 0x24], eax
call fcn.0041c91c
add esp, 0x10
mov dword [ebp - 0x48], eax
test esi, esi
jbe 0x40772c
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
sub edx, edi
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x48]
sub ecx, edi
mov eax, edi
sub edx, edi
mov edi, dword [ebp - 0x1c]
mov byte [ecx + eax], 0
mov byte [eax], 0
mov byte [edi + eax], 0
mov byte [edx + eax], 0
inc eax
dec esi
jne 0x407716
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [ebp - 0xa0]
push ecx
push eax
mov ecx, ebx
call fcn.0040446f
mov ecx, ebx
mov dword [ebp - 0x98], eax
call fcn.004052de
and dword [ebp - 0x30], 0
jmp 0x407ffa
call fcn.004052de
xor edi, edi
inc edi
cmp dword [ebp - 0x30], 3
mov dword [ebp - 0x1c], edi
jle 0x407772
xor esi, esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x1c], esi
jmp 0x407777
inc dword [ebp - 0x30]
xor esi, esi
lea ecx, [ebx + 0x84]
call fcn.0040533a
push esi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ecx, ebx
mov dword [ebp - 0x10], eax
call fcn.004052de
cmp dword [ebp - 0x10], 0xffffffff
je 0x407890
lea eax, [ebp]
push eax
push dword [ebp - 0x10]
mov dword [ebp], 0x128
call sub.KERNEL32.dll_Process32First
cmp eax, edi
jne 0x407885
lea eax, [ebp + 0x24]
push eax
lea ecx, [ebp - 0x44]
call fcn.004020d8
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 1
call fcn.00403451
lea esi, [ebx + 0x54]
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 0x1c
cdq
pop ecx
idiv ecx
xor edi, edi
test eax, eax
jbe 0x407861
push edi
mov ecx, esi
call fcn.00405d8d
cmp dword [eax + 0x18], 0x10
jb 0x4077f9
mov eax, dword [eax + 4]
jmp 0x4077fc
add eax, 4
push eax
lea ecx, [ebp - 0x3c]
call fcn.004020d8
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 2
call fcn.00403451
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x44]
call fcn.00402e19
test eax, eax
jne 0x407841
mov eax, dword [ebp + 8]
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0xac]
push eax
lea ecx, [ebx + 0x84]
mov dword [ebp - 0xa8], edi
call fcn.0040644a
mov ecx, dword [ebp - 0x3c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 1
call fcn.004012b7
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 0x1c
cdq
pop ecx
idiv ecx
inc edi
cmp edi, eax
jb 0x4077e6
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
mov byte [ebp - 4], 0
call fcn.004012b7
lea eax, [ebp]
push eax
push dword [ebp - 0x10]
call sub.KERNEL32.dll_Process32Next
cmp eax, 1
je 0x4077b9
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov ecx, ebx
call fcn.004052de
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x54]
push eax
push 1
push esi
push esi
call sub.WTSAPI32.dll_WTSEnumerateProcessesW
test eax, eax
jne 0x4078af
mov dword [ebp - 0x5c], esi
mov ecx, ebx
call fcn.004052de
mov eax, dword [ebx + 0x94]
sub eax, dword [ebx + 0x90]
mov dword [ebp - 0x10], esi
sar eax, 3
test eax, eax
jbe 0x407962
push dword [ebp - 0x10]
lea ecx, [ebx + 0x84]
call fcn.00405dd3
cmp dword [ebp - 0x98], 0
je 0x40793d
mov esi, dword [ebp - 0x5c]
and dword [ebp - 0x18], 0
test esi, esi
jbe 0x40793d
mov edx, dword [eax]
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x14], esi
mov esi, ecx
lea edi, [ebp - 0xd4]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0xd0], edx
jne 0x407921
mov esi, dword [ebp - 0xd4]
mov dword [ebp - 0xa4], esi
mov dword [ebp - 0x18], 1
add ecx, 0x10
dec dword [ebp - 0x14]
jne 0x4078fa
cmp dword [ebp - 0x18], 0
je 0x40793d
mov ecx, dword [ebp - 0xa4]
cmp ecx, dword [ebp - 0xa0]
jne 0x407947
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x24]
mov byte [ecx + eax], 1
mov eax, dword [ebx + 0x94]
sub eax, dword [ebx + 0x90]
inc dword [ebp - 0x10]
sar eax, 3
cmp dword [ebp - 0x10], eax
jb 0x4078d0
mov ecx, ebx
call fcn.004052de
push dword [ebp - 0x54]
call sub.WTSAPI32.dll_WTSFreeMemory
mov ecx, ebx
call fcn.004052de
lea esi, [ebx + 0x9c]
mov ecx, esi
call fcn.004066ec
push ebx
push 0x406f8d
call dword [sym.imp.USER32.dll_EnumWindows]
mov ecx, ebx
call fcn.004052de
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 0x28
cdq
pop ecx
idiv ecx
xor edi, edi
test eax, eax
jbe 0x4079cd
push edi
mov ecx, esi
call fcn.00405e12
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x28]
mov byte [ecx + eax], 1
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 0x28
cdq
pop ecx
idiv ecx
inc edi
cmp edi, eax
jb 0x4079aa
mov ecx, ebx
call fcn.004052de
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 0x28
cdq
pop ecx
idiv ecx
and dword [ebp - 0x10], 0
test eax, eax
jbe 0x407ba2
push dword [ebp - 0x10]
mov ecx, esi
call fcn.00405e12
mov edi, eax
cmp dword [edi + 8], 5
je 0x407b16
mov ecx, ebx
call fcn.004052de
push 0
lea ecx, [ebp + 0x144]
mov dword [ebp + 0x15c], 0xf
call fcn.00401748
and dword [ebp - 0x38], 0
lea eax, [ebp - 0x38]
push eax
push 0x449f8c
push 0xfffffffffffffffc
push dword [edi + 4]
mov byte [ebp - 4], 4
call sub.OLEACC.dll_AccessibleObjectFromWindow
mov ecx, ebx
call fcn.004052de
push dword [edi + 8]
lea eax, [ebp + 0x144]
push eax
push ecx
mov dword [ebp - 0x18], esp
mov ecx, esp
push dword [ebp - 0x38]
call fcn.004045cc
mov ecx, ebx
call fcn.00405906
mov ecx, ebx
mov dword [ebp - 0x14], eax
call fcn.004052de
cmp dword [ebp - 0x14], 1
je 0x407ada
mov ecx, ebx
call fcn.004052de
and dword [ebp - 0x34], 0
lea eax, [ebp - 0x34]
push eax
push 0x449f8c
push 0
push dword [edi + 4]
mov byte [ebp - 4], 5
call sub.OLEACC.dll_AccessibleObjectFromWindow
mov ecx, ebx
call fcn.004052de
push dword [edi + 8]
lea eax, [ebp + 0x144]
push eax
push ecx
mov dword [ebp - 0x18], esp
mov ecx, esp
push dword [ebp - 0x34]
call fcn.004045cc
mov ecx, ebx
call fcn.00405906
mov ecx, ebx
mov dword [ebp - 0x14], eax
call fcn.004052de
mov eax, dword [ebp - 0x34]
mov byte [ebp - 4], 4
test eax, eax
je 0x407ad4
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp dword [ebp - 0x14], 1
jne 0x407af6
cmp dword [ebp + 0x158], 0
jbe 0x407af6
push 0xffffffffffffffff
push 0
lea eax, [ebp + 0x144]
push eax
lea ecx, [edi + 0xc]
call fcn.00401c2d
mov ecx, ebx
call fcn.004052de
mov eax, dword [ebp - 0x38]
mov byte [ebp - 4], 3
test eax, eax
je 0x407b0e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [ebp + 0x144]
jmp 0x407b7d
cmp dword [ebp - 0x1c], 0
jne 0x407b8a
mov ecx, ebx
call fcn.004052de
push 0
lea ecx, [ebp + 0x128]
mov dword [ebp + 0x140], 0xf
call fcn.00401748
lea eax, [ebp + 0x128]
push eax
push dword [edi + 4]
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.00405615
cmp eax, 1
jne 0x407b70
cmp dword [ebp + 0x13c], 0
jbe 0x407b70
push 0xffffffffffffffff
push 0
lea eax, [ebp + 0x128]
push eax
lea ecx, [edi + 0xc]
call fcn.00401c2d
mov ecx, ebx
call fcn.004052de
lea ecx, [ebp + 0x128]
push 0
push 1
mov byte [ebp - 4], 0
call fcn.004017f7
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 0x28
cdq
pop ecx
idiv ecx
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], eax
jb 0x4079ec
mov ecx, ebx
call fcn.004052de
lea ecx, [ebp - 0x90]
call fcn.00406268
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 0x28
cdq
pop ecx
idiv ecx
and dword [ebp - 0x10], 0
mov byte [ebp - 4], 7
test eax, eax
jbe 0x407ccf
push dword [ebp - 0x10]
mov ecx, esi
call fcn.00405e12
mov esi, eax
cmp dword [esi + 0x20], 0
jbe 0x407cb1
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0x6c]
push 0x28
cdq
pop ecx
idiv ecx
xor edi, edi
test eax, eax
jbe 0x407c1a
push edi
lea ecx, [ebp - 0x78]
call fcn.00405e12
mov ecx, dword [esi + 4]
cmp ecx, dword [eax + 4]
je 0x407c34
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0x6c]
push 0x28
cdq
pop ecx
idiv ecx
inc edi
cmp edi, eax
jb 0x407bf8
push esi
lea ecx, [ebp - 0x78]
call fcn.00406ec9
add esi, 0xc
push esi
lea ecx, [ebp - 0x90]
call fcn.00407149
jmp 0x407cb1
lea edi, [eax + 0xc]
cmp dword [edi + 0x18], 0x10
jb 0x407c42
mov eax, dword [edi + 4]
jmp 0x407c45
lea eax, [edi + 4]
push eax
lea ecx, [ebp - 0x60]
call fcn.004020d8
add esi, 0xc
cmp dword [esi + 0x18], 0x10
mov byte [ebp - 4], 8
jb 0x407c60
mov eax, dword [esi + 4]
jmp 0x407c63
lea eax, [esi + 4]
push eax
lea ecx, [ebp - 0x4c]
call fcn.004020d8
push dword [ebp - 0x4c]
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 9
call fcn.00402e19
test eax, eax
je 0x407c97
push 0xffffffffffffffff
push 0
push esi
mov ecx, edi
call fcn.00401c2d
push esi
lea ecx, [ebp - 0x90]
call fcn.00407149
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.004012b7
mov ecx, dword [ebp - 0x60]
add ecx, 0xfffffff0
mov byte [ebp - 4], 7
call fcn.004012b7
lea esi, [ebx + 0x9c]
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 0x28
cdq
pop ecx
idiv ecx
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], eax
jb 0x407bd0
mov ecx, ebx
call fcn.004052de
mov eax, dword [ebp - 0x80]
sub eax, dword [ebp - 0x84]
push 0x1c
cdq
pop ecx
idiv ecx
test eax, eax
jbe 0x407e69
mov ecx, ebx
call fcn.004052de
lea eax, [ebx + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, ebx
call fcn.004052de
mov eax, dword [ebp - 0x80]
sub eax, dword [ebp - 0x84]
push 0x1c
cdq
pop ecx
idiv ecx
and dword [ebp - 0x10], 0
test eax, eax
jbe 0x407e51
mov edi, 0x800
push dword [ebp - 0x10]
lea ecx, [ebp - 0x90]
call fcn.00405d8d
cmp dword [eax + 0x18], 0x10
jb 0x407d3e
mov eax, dword [eax + 4]
jmp 0x407d41
add eax, 4
push eax
lea ecx, [ebp - 0x40]
call fcn.004020d8
lea eax, [ebp - 0x94]
push 0x444c74
push eax
mov byte [ebp - 4], 0xa
call fcn.00408331
mov eax, dword [eax]
pop ecx
pop ecx
push 0
push eax
lea ecx, [ebp - 0x40]
call fcn.0040301b
mov ecx, dword [ebp - 0x94]
test eax, eax
setge byte [ebp - 0x1d]
add ecx, 0xfffffff0
call fcn.004012b7
cmp byte [ebp - 0x1d], 0
jne 0x407e27
push edi
call fcn.0041c91c
push edi
push 0
push eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x9c], edi
call fcn.0042bc20
add esp, 0x10
push dword [ebp - 0x10]
lea ecx, [ebp - 0x90]
call fcn.00405d8d
cmp dword [eax + 0x18], 0x10
jb 0x407dc0
mov eax, dword [eax + 4]
jmp 0x407dc3
add eax, 4
push 0x2000
lea ecx, [ebp - 0x9c]
push ecx
push dword [ebp - 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_UrlEscapeA]
lea esi, [ebx + 0x30]
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 0x1c
cdq
pop ecx
idiv ecx
cmp eax, 0x190
jae 0x407e1e
push dword [ebp - 0x14]
lea ecx, [ebp - 0xf0]
call fcn.00401f30
lea eax, [ebp - 0xf0]
push eax
mov ecx, esi
mov byte [ebp - 4], 0xb
call fcn.00407149
push 0
push 1
lea ecx, [ebp - 0xf0]
call fcn.004017f7
push dword [ebp - 0x14]
call fcn.0041c911
pop ecx
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
mov byte [ebp - 4], 7
call fcn.004012b7
mov eax, dword [ebp - 0x80]
sub eax, dword [ebp - 0x84]
push 0x1c
cdq
pop ecx
idiv ecx
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], eax
jb 0x407d25
mov ecx, ebx
call fcn.004052de
lea eax, [ebx + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, ebx
call fcn.004052de
mov ecx, ebx
call fcn.004052de
lea ecx, [ebp - 0xc4]
call fcn.00406268
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0x6c]
push 0x28
cdq
pop ecx
idiv ecx
xor esi, esi
mov byte [ebp - 4], 0xc
test eax, eax
jbe 0x407ec6
push esi
lea ecx, [ebp - 0x78]
call fcn.00405e12
mov edi, eax
push dword [edi + 4]
call dword [0x45556c]
test eax, eax
je 0x407eb5
push edi
lea ecx, [ebp - 0xc4]
call fcn.00406ec9
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0x6c]
push 0x28
cdq
pop ecx
idiv ecx
inc esi
cmp esi, eax
jb 0x407e91
lea ecx, [ebp - 0x78]
call fcn.004066ec
mov eax, dword [ebp - 0xb4]
sub eax, dword [ebp - 0xb8]
push 0x28
cdq
pop ecx
idiv ecx
xor esi, esi
test eax, eax
jbe 0x407f12
push esi
lea ecx, [ebp - 0xc4]
call fcn.00405e12
push eax
lea ecx, [ebp - 0x78]
call fcn.00406ec9
mov eax, dword [ebp - 0xb4]
sub eax, dword [ebp - 0xb8]
push 0x28
cdq
pop ecx
idiv ecx
inc esi
cmp esi, eax
jb 0x407ee6
mov ecx, ebx
call fcn.004052de
mov ecx, ebx
call fcn.004052de
xor esi, esi
cmp dword [ebp - 0x2c], esi
jbe 0x407f67
call fcn.0041cc47
push eax
lea ecx, [ebp - 0x50]
call fcn.00401633
movsx eax, byte [esi + str.cfiose]
push eax
lea eax, [ebp - 0x50]
push 0x444c68
push eax
mov byte [ebp - 4], 0xd
call fcn.004034f6
mov ecx, dword [ebp - 0x50]
add esp, 0xc
add ecx, 0xfffffff0
mov byte [ebp - 4], 0xc
call fcn.004012b7
inc esi
cmp esi, dword [ebp - 0x2c]
jb 0x407f27
mov ecx, ebx
call fcn.004052de
cmp dword [ebp - 0x2c], 0
jbe 0x407faf
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x58]
mov edx, dword [ebp - 0x24]
sub edi, ecx
sub ecx, eax
sub edx, eax
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], edx
mov dl, byte [eax]
lea esi, [ecx + eax]
mov byte [esi + edi], dl
mov edx, dword [ebp - 0x1c]
mov dl, byte [edx + eax]
mov byte [esi], dl
mov edx, dword [ebp - 0x1c]
mov byte [eax], 0
mov byte [edx + eax], 0
inc eax
dec dword [ebp - 0x18]
jne 0x407f8f
mov ecx, ebx
call fcn.004052de
mov ecx, ebx
call fcn.004052de
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0xc4]
call fcn.0040657c
push dword [ebp - 0xc4]
call fcn.0041c911
pop ecx
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 0
call fcn.004062ac
push dword [ebp - 0x90]
call fcn.0041c911
pop ecx
cmp dword [ebx + 0x50], 0
mov ecx, ebx
jne 0x407757
call fcn.004052de
push dword [ebp - 0x28]
call fcn.0041c911
push dword [ebp - 0x58]
call fcn.0041c911
push dword [ebp - 0x24]
call fcn.0041c911
push dword [ebp - 0x48]
call fcn.0041c911
and dword [ebx + 0x4c], 0
add esp, 0x10
mov ecx, ebx
call fcn.004052de
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, ebx
call fcn.004052de
lea eax, [ebx + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, ebx
call fcn.004052de
lea ecx, [ebp - 0x78]
call fcn.0040657c
push dword [ebp - 0x78]
call fcn.0041c911
pop ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x160]
xor ecx, ebp
call fcn.0042ba9a
add ebp, 0x164
leave
ret