Function at 0x46f4e8
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 0x46f53c
jmp 0x46f62a
lea rcx, [rsp + 0x38]
call fcn.00402830
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 0x46f616
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.00402a44
lea rcx, [rsp + 0x20]
call fcn.00431370
mov ecx, 0x18
call fcn.00403660
mov rsi, rax
mov qword [rsp + 0x300], rax
test rax, rax
je 0x46f5e1
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.004029bc
jmp 0x46f5e3
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 0x46f57b
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.00402e08
lea ecx, [rax + 1]
mov rax, qword [r13 + 0x30]
lea rdx, [rax + rcx*2]
lea rcx, [rsp + 0x48]
call fcn.004028cc
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 0x46f7e3
mov r14, rbp
mov r15d, edi
mov rbx, qword [r14]
mov r12d, dword [rbx]
cmp r12d, ecx
je 0x46f7ce
xor r8d, r8d
mov edx, dword [r13 + 8]
test edx, edx
je 0x46f6c2
mov r9, qword [r13]
lea ecx, [r8 + rdx]
shr ecx, 1
mov eax, ecx
cmp r12d, dword [r9 + rcx*4]
je 0x46f6c7
cmp r12d, dword [r9 + rcx*4]
jae 0x46f6b9
mov edx, ecx
jmp 0x46f6bd
lea r8d, [rcx + 1]
cmp r8d, edx
jne 0x46f6a1
mov ecx, 0xffffffff
test ecx, ecx
jns 0x46f7c0
test sil, sil
je 0x46f6e6
mov rdx, qword [rbx + 8]
mov rcx, qword [rsp + 0x48]
call fcn.00401b5c
test al, al
jne 0x46f723
mov r9d, dword [rbx + 4]
xor r8d, r8d
mov edx, dword [r13 + 8]
test edx, edx
je 0x46f71a
mov r10, qword [r13]
lea ecx, [r8 + rdx]
shr ecx, 1
mov eax, ecx
cmp r9d, dword [r10 + rcx*4]
je 0x46f71f
cmp r9d, dword [r10 + rcx*4]
jae 0x46f711
mov edx, ecx
jmp 0x46f715
lea r8d, [rcx + 1]
cmp r8d, edx
jne 0x46f6f9
mov ecx, 0xffffffff
test ecx, ecx
js 0x46f798
mov r8d, r12d
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je 0x46f7a8
mov edx, r12d
mov rcx, r13
call fcn.0046f358
lea rcx, [r13 + 0x10]
call fcn.00431370
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.00418894
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 0x46f7ce
mov al, byte [rsp + 0x2f0]
mov ecx, dword [rsp + 0x308]
jmp 0x46f7ce
mov al, byte [rsp + 0x2f0]
mov sil, byte [rsp + 0x300]
mov ecx, dword [rsp + 0x308]
jmp 0x46f7ce
mov al, byte [rsp + 0x2f0]
mov ecx, dword [rsp + 0x308]
add r14, 8
dec r15
jne 0x46f683
test al, al
jne 0x46f66c
mov rcx, qword [rsp + 0x48]
call sub.msvcrt.dll_free
nop
movsxd rax, edi
test edi, edi
je 0x46f81e
lea rbx, [rbp + rax*8]
add edi, 0xffffffff
sub rbx, 8
mov rsi, qword [rbx]
test rsi, rsi
je 0x46f81a
mov rcx, qword [rsi + 8]
call sub.msvcrt.dll_free
mov rcx, rsi
call sub.msvcrt.dll_free
test edi, edi
jne 0x46f7fa
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