Function at 0x180013520
Capabilities:
Enumerate process modules

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x68
and dword [rsp + 0x40], 0
xor eax, eax
mov r15, rcx
mov rcx, qword [0x1800339a8]
and dword [rsp + 0x50], eax
mov ebx, 0x1000
lea r12d, [rax + 8]
xor edx, edx
mov r8, rbx
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x4c], eax
mov dword [rsp + 0xc0], r12d
mov dword [rsp + 0x54], eax
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x5c], eax
mov dword [rsp + 0x20], ebx
lea rbp, [rsp + 0x40]
lea rsi, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov r14, rax
je 0x18001383c
lea r8, [rsp + 0xc8]
mov edx, ebx
mov rcx, r14
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
je 0x1800135e4
cmp dword [rsp + 0xc8], ebx
jb 0x1800135e0
mov rcx, qword [0x1800339a8]
add ebx, 0x1000
mov r8, r14
mov r9d, ebx
xor edx, edx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
test rax, rax
je 0x1800135f1
mov r14, rax
jmp 0x180013598
xor eax, eax
jmp 0x1800135ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xc0], eax
mov edi, dword [rsp + 0xc8]
mov rcx, r14
shr edi, 2
lea edx, [rdi - 1]
call fcn.180022c18
mov ecx, dword [rbp + 4]
add edi, 0xfffffffe
lea ebx, [rdi + rcx]
cmp dword [rsi], ebx
jae 0x180013654
mov r8, qword [rsi + 8]
mov rcx, qword [0x1800339a8]
xor edx, edx
test r8, r8
je 0x180013634
mov r9d, ebx
shl r9d, 4
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
jmp 0x180013641
mov r8d, ebx
shl r8d, 4
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x18001364c
mov qword [rsi + 8], rax
mov dword [rsi], ebx
cmp dword [rsi], ebx
jb 0x1800137b5
mov rcx, qword [rsi + 8]
xor eax, eax
xor r12d, r12d
and dword [rsi + 4], eax
xor r13d, r13d
xor edx, edx
mov dword [rsp + 0xb8], r12d
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x38], rdx
cmp r12d, dword [rbp + 4]
jae 0x1800136c9
mov rax, qword [rbp + 8]
add r12d, 1
lea rbx, [rdx + rax]
add rdx, 0x10
mov dword [rsp + 0xb8], r12d
mov rcx, qword [rbx]
mov qword [rsp + 0x38], rdx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1800136cd
mov r8, qword [r15 + 0x10]
mov ecx, dword [rbx + 8]
xor edx, edx
call qword [r15 + 8]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18001378a
xor ebx, ebx
jmp 0x1800136d7
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
cmp r13d, edi
jae 0x18001376c
lea r15, [r14 + rax*4 + 8]
test rbx, rbx
mov r12d, dword [r15]
je 0x1800136f7
cmp r12d, dword [rbx + 8]
jae 0x180013850
mov r8d, r12d
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rcx, qword [rsp + 0x28]
test rax, rax
mov qword [rcx], rax
je 0x180013741
mov rax, qword [rsp + 0xb0]
mov edx, 1
mov ecx, r12d
mov r8, qword [rax + 0x10]
call qword [rax + 8]
mov rcx, qword [rsp + 0x28]
add rcx, 0x10
add dword [rsi + 4], 1
mov dword [rcx - 8], r12d
mov qword [rsp + 0x28], rcx
mov rax, qword [rsp + 0x30]
add r13d, 1
add r15, 4
add rax, 1
cmp r13d, edi
mov qword [rsp + 0x30], rax
jb 0x1800136e5
mov r12d, dword [rsp + 0xb8]
mov r15, qword [rsp + 0xb0]
test rbx, rbx
je 0x18001378a
mov eax, dword [rbx + 8]
mov dword [rcx + 8], eax
mov rax, qword [rbx]
mov qword [rcx], rax
add rcx, 0x10
add dword [rsi + 4], 1
mov qword [rsp + 0x28], rcx
cmp r12d, dword [rbp + 4]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x38]
jb 0x180013682
cmp r13d, edi
jb 0x18001367c
mov rax, rbp
mov rbp, rsi
mov rsi, rax
mov rcx, qword [r15]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [rsp + 0x20]
cmp eax, 0x102
je 0x180013598
mov rbx, qword [rbp + 8]
test rbx, rbx
je 0x180013822
mov edi, dword [rbp + 4]
test edi, edi
je 0x1800137f7
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 0x10
add edi, 0xffffffff
jne 0x1800137e2
mov dword [rbp + 4], edi
mov r8, qword [rbp + 8]
mov rcx, qword [0x1800339a8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rsi + 8]
test r8, r8
je 0x180013822
mov rcx, qword [0x1800339a8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x1800339a8]
mov r8, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r12d, dword [rsp + 0xc0]
mov eax, r12d
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov r12d, dword [rsp + 0xb8]
mov r15, qword [rsp + 0xb0]
jne 0x18001376c
add r13d, 1
add rax, 1
mov qword [rsp + 0x30], rax
jmp 0x18001376c