Function at 0x10046330
Capabilities:
Enumerate process modules
Enumerate processes
Get process image filename

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10147528
mov eax, dword fs:[0]
push eax
sub esp, 0x95c
mov eax, dword [0x1018d0d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x8b0], ecx
mov eax, dword [ebp + 8]
xor ebx, ebx
mov esi, dword [ebp + 0xc]
push 0x228
mov dword [ebp - 0x8b4], eax
lea eax, [ebp - 0x888]
push ebx
mov dword [ebp - 0x89c], ebx
push eax
mov dword [ebp - 0x894], esi
mov dword [ebp - 0x88c], ebx
call fcn.1011a400
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x630], ax
lea eax, [ebp - 0x62e]
push eax
call fcn.1011a400
add esp, 0x18
lea eax, [ebp - 0x630]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
mov dword [ebp - 0x8a4], edi
cmp edi, 0xffffffff
je 0x100463fe
lea eax, [ebp - 0x88c]
mov dword [ebp - 0x88c], 0x22c
push eax
push edi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x10046405
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x10046869
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10046410
mov eax, dword [ebp - 0x884]
test eax, eax
je 0x10046848
cmp eax, 4
je 0x10046848
cmp eax, 8
je 0x10046848
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [ebp - 0x884]
cmp eax, ecx
je 0x10046848
push ecx
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov dword [ebp - 0x898], esi
test esi, esi
je 0x10046842
xor eax, eax
mov dword [ebp - 0x890], 0
push 0x208
push eax
mov word [ebp - 0x428], ax
lea eax, [ebp - 0x426]
push eax
call fcn.1011a400
add esp, 0xc
lea eax, [ebp - 0x428]
push 0x104
push eax
push esi
call sub.PSAPI.DLL_GetProcessImageFileNameW
xor eax, eax
cmp ax, word [ebp - 0x428]
je 0x10046817
mov dword [ebp - 0x634], 7
mov dword [ebp - 0x638], eax
mov word [ebp - 0x648], ax
mov ecx, dword [ebp - 0x8b0]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x648]
push eax
lea eax, [ebp - 0x428]
push eax
call fcn.10045c40
cmp dword [ebp - 0x638], 0
jne 0x1004650e
cmp dword [ebp - 0x634], 8
mov dword [ebp - 4], 0xffffffff
jb 0x10046817
push dword [ebp - 0x648]
call fcn.1011a1ea
add esp, 4
jmp 0x10046817
mov ecx, dword [ebp - 0x8b4]
test ecx, ecx
je 0x100465dd
cmp dword [ebp - 0x634], 8
lea eax, [ebp - 0x648]
push ecx
cmovae eax, dword [ebp - 0x648]
push eax
call fcn.1011a277
add esp, 8
test eax, eax
je 0x100465dd
cmp dword [ebp - 0x634], 8
lea ecx, [ebp - 0x630]
lea eax, [ebp - 0x648]
cmovae eax, dword [ebp - 0x648]
push ecx
push eax
call fcn.1011a277
add esp, 8
test eax, eax
je 0x100465dd
mov esi, dword [ebp - 0x634]
lea ecx, [ebp - 0x648]
mov edx, dword [ebp - 0x648]
lea edi, [ebp - 0x648]
mov eax, dword [ebp - 0x638]
cmp esi, 8
cmovae ecx, edx
cmovae edi, edx
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x648]
cmovae ecx, edx
cmp ecx, eax
je 0x100465ba
push fcn.1011c6e6
push edi
push eax
push ecx
lea eax, [ebp - 0x8ac]
push eax
call fcn.100422f0
add esp, 0x14
jmp 0x100465c0
mov dword [ebp - 0x8ac], edi
mov ecx, dword [ebp - 0x894]
lea eax, [ebp - 0x648]
push eax
call fcn.10044680
mov dword [eax], 0
jmp 0x100467ed
lea eax, [ebp - 0x890]
push eax
push 0
push 0
push esi
call sub.PSAPI.DLL_EnumProcessModules
mov eax, dword [ebp - 0x890]
test eax, eax
je 0x100467f3
xor ecx, ecx
shr eax, 2
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.101160b2
add esp, 4
mov dword [ebp - 0x8a8], eax
lea ecx, [ebp - 0x890]
push ecx
push dword [ebp - 0x890]
push eax
push esi
call sub.PSAPI.DLL_EnumProcessModules
xor edi, edi
test dword [ebp - 0x890], 0xfffffffc
jbe 0x100467df
xor eax, eax
push 0x208
push eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push eax
call fcn.1011a400
xor eax, eax
mov dword [ebp - 0x64c], 7
add esp, 0xc
mov dword [ebp - 0x650], 0
mov word [ebp - 0x660], ax
push 0x104
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 1
push eax
mov eax, dword [ebp - 0x8a8]
push dword [eax + edi*4]
push esi
call sub.PSAPI.DLL_GetModuleFileNameExW
cmp word [ebp - 0x21c], 0
je 0x1004674b
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x660]
call fcn.1000bb20
mov esi, dword [ebp - 0x64c]
lea eax, [ebp - 0x660]
mov edx, dword [ebp - 0x660]
lea ecx, [ebp - 0x660]
cmp esi, 8
cmovae eax, edx
cmovae ecx, edx
mov dword [ebp - 0x8a0], eax
mov eax, dword [ebp - 0x650]
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x660]
cmovae ecx, edx
mov dword [ebp - 0x89c], ecx
cmp ecx, eax
mov ecx, dword [ebp - 0x8a0]
je 0x10046725
push fcn.1011c6e6
push ecx
push eax
push dword [ebp - 0x89c]
lea eax, [ebp - 0x8b8]
push eax
call fcn.100422f0
add esp, 0x14
jmp 0x1004672b
mov dword [ebp - 0x8b8], ecx
mov ecx, dword [ebp - 0x894]
lea eax, [ebp - 0x660]
push eax
call fcn.10044680
mov esi, dword [ebp - 0x898]
mov dword [eax], 1
jmp 0x100467b2
call fcn.1000af50
cmp eax, 2
jg 0x10046798
push 2
push 0x4ab
push str.srcksafe_host.cpp
lea ecx, [ebp - 0x968]
call fcn.1000afc0
push str.CSafeHost::EnumMoudle
add eax, 8
mov byte [ebp - 4], 2
push str.SAFE_
or ebx, 1
push eax
mov dword [ebp - 0x89c], ebx
call fcn.100025d0
add esp, 8
push eax
call fcn.100025d0
add esp, 8
mov dword [ebp - 4], 1
test bl, 1
je 0x100467b2
lea ecx, [ebp - 0x968]
and ebx, 0xfffffffe
call fcn.1000b010
cmp dword [ebp - 0x64c], 8
mov byte [ebp - 4], 0
jb 0x100467cd
push dword [ebp - 0x660]
call fcn.1011a1ea
add esp, 4
mov eax, dword [ebp - 0x890]
inc edi
shr eax, 2
cmp edi, eax
jb 0x10046644
push dword [ebp - 0x8a8]
call fcn.1011bfcc
add esp, 4
mov edi, dword [ebp - 0x8a4]
cmp dword [ebp - 0x634], 8
mov dword [ebp - 4], 0xffffffff
jb 0x10046811
push dword [ebp - 0x648]
call fcn.1011a1ea
add esp, 4
mov esi, dword [ebp - 0x898]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push 0x22c
lea eax, [ebp - 0x88c]
push 0
push eax
call fcn.1011a400
add esp, 0xc
mov dword [ebp - 0x88c], 0x22c
jmp 0x10046848
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x88c]
push eax
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x10046410
push edi
call esi
mov eax, dword [ebp - 0x894]
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1011a3e5
mov esp, ebp
pop ebp
ret 8