Function at 0x46efb8
Capabilities:
Enumerate processes

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2a8
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov r12b, dl
mov r13, rcx
xor ebp, ebp
mov qword [rsp + 0x20], rbp
mov dword [rsp + 0x2c], ebp
xor edi, edi
mov dword [rsp + 0x28], edi
xor edx, edx
lea ecx, [rbp + 2]
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov rbx, rax
mov qword [rsp + 0x2f0], rax
cmp rax, 0xffffffffffffffff
jne 0x46f00c
jmp 0x46f0fa
lea rcx, [rsp + 0x38]
call fcn.00402868
nop
mov esi, 0x238
mov r8, rsi
xor edx, edx
lea rcx, [rsp + 0x60]
call sub.msvcrt.dll_memset
mov dword [rsp + 0x60], esi
lea rdx, [rsp + 0x60]
mov rcx, rbx
call sub.KERNEL32.dll_Process32FirstW
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x46f0e6
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x34], eax
lea rdx, [rsp + 0x8c]
lea rcx, [rsp + 0x38]
call fcn.00402a7c
lea rcx, [rsp + 0x20]
call fcn.00431004
mov ecx, 0x18
call fcn.0040377c
mov rsi, rax
mov qword [rsp + 0x300], rax
test rax, rax
je 0x46f0b1
mov ecx, dword [rsp + 0x30]
mov dword [rax], ecx
mov ecx, dword [rsp + 0x34]
mov dword [rax + 4], ecx
lea rcx, [rax + 8]
lea rdx, [rsp + 0x38]
call fcn.004029f4
jmp 0x46f0b3
xor esi, esi
mov edi, dword [rsp + 0x28]
mov rax, rdi
inc edi
mov dword [rsp + 0x28], edi
mov rbp, qword [rsp + 0x20]
mov qword [rbp + rax*8], rsi
lea rdx, [rsp + 0x60]
mov rcx, rbx
call sub.KERNEL32.dll_Process32NextW
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x46f04b
mov rcx, qword [rsp + 0x38]
call sub.msvcrt.dll_free
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [r13 + 0x30]
call fcn.00402e28
lea ecx, [rax + 1]
mov rax, qword [r13 + 0x30]
lea rdx, [rax + rcx*2]
lea rcx, [rsp + 0x48]
call fcn.00402904
nop
mov eax, dword [rsp + 0x50]
neg eax
sbb sil, sil
and sil, r12b
mov byte [rsp + 0x300], sil
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
mov dword [rsp + 0x308], eax
xor al, al
mov byte [rsp + 0x2f0], al
test edi, edi
je 0x46f2b3
mov r14, rbp
mov r15d, edi
mov rbx, qword [r14]
mov r12d, dword [rbx]
cmp r12d, ecx
je 0x46f29e
xor r8d, r8d
mov edx, dword [r13 + 8]
test edx, edx
je 0x46f192
mov r9, qword [r13]
lea ecx, [r8 + rdx]
shr ecx, 1
mov eax, ecx
cmp r12d, dword [r9 + rcx*4]
je 0x46f197
cmp r12d, dword [r9 + rcx*4]
jae 0x46f189
mov edx, ecx
jmp 0x46f18d
lea r8d, [rcx + 1]
cmp r8d, edx
jne 0x46f171
mov ecx, 0xffffffff
test ecx, ecx
jns 0x46f290
test sil, sil
je 0x46f1b6
mov rdx, qword [rbx + 8]
mov rcx, qword [rsp + 0x48]
call fcn.00401b70
test al, al
jne 0x46f1f3
mov r9d, dword [rbx + 4]
xor r8d, r8d
mov edx, dword [r13 + 8]
test edx, edx
je 0x46f1ea
mov r10, qword [r13]
lea ecx, [r8 + rdx]
shr ecx, 1
mov eax, ecx
cmp r9d, dword [r10 + rcx*4]
je 0x46f1ef
cmp r9d, dword [r10 + rcx*4]
jae 0x46f1e1
mov edx, ecx
jmp 0x46f1e5
lea r8d, [rcx + 1]
cmp r8d, edx
jne 0x46f1c9
mov ecx, 0xffffffff
test ecx, ecx
js 0x46f268
mov r8d, r12d
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je 0x46f278
mov edx, r12d
mov rcx, r13
call fcn.0046ee28
lea rcx, [r13 + 0x10]
call fcn.00431004
mov edx, dword [r13 + 0x18]
lea ecx, [rdx + 1]
mov dword [r13 + 0x18], ecx
mov rax, qword [r13 + 0x10]
mov qword [rax + rdx*8], rsi
lea rcx, [r13 + 0x20]
call fcn.004187e4
mov ecx, dword [r13 + 0x28]
lea eax, [rcx + 1]
mov dword [r13 + 0x28], eax
mov rax, qword [r13 + 0x20]
mov byte [rcx + rax], 1
mov al, 1
mov byte [rsp + 0x2f0], al
mov sil, byte [rsp + 0x300]
mov ecx, dword [rsp + 0x308]
jmp 0x46f29e
mov al, byte [rsp + 0x2f0]
mov ecx, dword [rsp + 0x308]
jmp 0x46f29e
mov al, byte [rsp + 0x2f0]
mov sil, byte [rsp + 0x300]
mov ecx, dword [rsp + 0x308]
jmp 0x46f29e
mov al, byte [rsp + 0x2f0]
mov ecx, dword [rsp + 0x308]
add r14, 8
dec r15
jne 0x46f153
test al, al
jne 0x46f13c
mov rcx, qword [rsp + 0x48]
call sub.msvcrt.dll_free
nop
movsxd rax, edi
test edi, edi
je 0x46f2ee
lea rbx, [rbp + rax*8]
add edi, 0xffffffff
sub rbx, 8
mov rsi, qword [rbx]
test rsi, rsi
je 0x46f2ea
mov rcx, qword [rsi + 8]
call sub.msvcrt.dll_free
mov rcx, rsi
call sub.msvcrt.dll_free
test edi, edi
jne 0x46f2ca
mov rcx, rbp
call sub.msvcrt.dll_free
add rsp, 0x2a8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret