Function at 0x10006590
Capabilities:
Allocate or change rwx memory
Enumerate threads
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10013ecd
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x1001c440]
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 ebx, ecx
mov dword [ebp - 0x3c], ebx
cmp byte [ebp + 8], 0
mov ecx, dword [ebx + 0x70]
je 0x100068ed
test ecx, ecx
jne 0x1000689f
mov edi, dword [ebx]
xor esi, esi
nop dword [eax]
lea eax, [ebp - 0x2c]
push eax
push edi
call fcn.100072b0
movzx eax, byte [ebp - 0x2c]
add esp, 8
add esi, eax
add edi, eax
cmp esi, 5
jb 0x100065e0
mov ecx, ebx
mov dword [ebx + 0x30], esi
call fcn.10004a50
mov dword [ebx + 0x70], eax
xor esi, esi
xor edi, edi
mov dword [ebp - 0x44], esi
xor ebx, ebx
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x48], ebx
push ebx
push 4
mov dword [ebp - 4], ebx
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x40], eax
cmp eax, 0xffffffff
je 0x1000686a
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x40]
mov dword [ebp - 0x2c], 0x1c
call sub.KERNEL32.dll_Thread32First
test eax, eax
je 0x100066b1
mov esi, dword [ebp - 0x38]
nop dword [eax]
cmp dword [ebp - 0x2c], 0x10
jb 0x10006694
cmp dword [ebp - 0x20], esi
jne 0x10006694
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x30]
je 0x10006694
cmp edi, ebx
je 0x10006681
mov dword [edi], eax
add edi, 4
mov dword [ebp - 0x4c], edi
jmp 0x10006694
lea eax, [ebp - 0x24]
push eax
push edi
lea ecx, [ebp - 0x50]
call fcn.10001360
mov ebx, dword [ebp - 0x48]
mov edi, dword [ebp - 0x4c]
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x1c
push eax
push dword [ebp - 0x40]
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x10006660
mov esi, dword [ebp - 0x50]
mov dword [ebp - 0x44], esi
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, edi
je 0x100066ea
nop
push dword [esi]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x100066e3
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 4
cmp esi, edi
jne 0x100066c0
mov esi, dword [ebp - 0x3c]
lea eax, [ebp - 0x30]
push eax
push 0x40
push dword [esi + 0x30]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10006867
mov eax, dword [esi + 0x30]
push eax
mov dword [ebp - 0x30], eax
call fcn.10007b4e
add esp, 4
mov dword [ebp - 0x38], eax
test eax, eax
je 0x1000672f
push dword [ebp - 0x30]
push 0
push eax
call fcn.100095a0
mov eax, dword [ebp - 0x38]
add esp, 0xc
jmp 0x10006731
xor eax, eax
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x40], eax
push ecx
lea ecx, [esi + 4]
call fcn.10001330
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x10006750
push eax
call fcn.10007b57
add esp, 4
push dword [esi + 0x30]
push dword [esi]
push dword [esi + 4]
call fcn.10009020
mov esi, dword [esi]
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x30], 0xe9
mov edx, dword [eax + 0x70]
mov eax, dword [esi]
sub edx, esi
movzx ecx, al
sub edx, 5
cmp al, 0xe8
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x37], edx
cmovne ecx, dword [ebp - 0x30]
mov byte [ebp - 0x38], cl
mov eax, dword [ebp - 0x38]
mov dword [esi], eax
movzx eax, byte [ebp - 0x34]
mov byte [esi + 4], al
mov esi, dword [ebp - 0x3c]
mov eax, dword [esi + 0x30]
sub eax, 5
push eax
mov eax, dword [esi]
add eax, 5
push 0x90
push eax
call fcn.100095a0
add esp, 0x18
lea eax, [ebp - 0x30]
push eax
push 0x20
push dword [esi + 0x30]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10006867
mov ecx, dword [ebp - 0x44]
mov esi, ecx
cmp esi, edi
je 0x100067fd
push dword [esi]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x100067f3
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 4
cmp esi, edi
jne 0x100067d0
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x1000682e
sub ebx, ecx
mov eax, ecx
and ebx, 0xfffffffc
cmp ebx, 0x1000
jb 0x10006824
mov ecx, dword [eax - 4]
add ebx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006918
push ebx
push ecx
call fcn.10007b40
add esp, 8
mov ebx, dword [ebp - 0x3c]
mov eax, dword [ebx + 0x68]
push dword [eax + 0x20]
push dword [ebx + 0x70]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov al, 1
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.10007e76
mov esp, ebp
pop ebp
ret 4
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x1000689b
sub ebx, esi
mov eax, esi
and ebx, 0xfffffffc
cmp ebx, 0x1000
jb 0x10006891
mov esi, dword [eax - 4]
add ebx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006918
push ebx
push esi
call fcn.10007b40
add esp, 8
xor al, al
jmp 0x10006849
mov edx, dword [ebx + 0x38]
mov ecx, edx
mov ebx, dword [ebx + 0x3c]
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x68]
mov esi, dword [eax + 0x1c]
mov eax, ebx
shrd ecx, eax, 8
mov eax, ebx
mov byte [esi + 1], cl
mov ecx, edx
shrd ecx, eax, 0x10
mov eax, ebx
mov byte [esi], dl
shrd edx, eax, 0x18
mov eax, ebx
mov byte [esi + 4], bl
shr eax, 8
mov byte [esi + 5], al
mov eax, ebx
shr eax, 0x10
shr ebx, 0x18
mov byte [esi + 2], cl
mov byte [esi + 3], dl
mov byte [esi + 6], al
mov byte [esi + 7], bl
jmp 0x1000682e
test ecx, ecx
je 0x10006831
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [ebx + 0x38], eax
mov eax, dword [ebx + 0x68]
mov dword [ebx + 0x3c], ecx
mov eax, dword [eax + 0x1c]
mov dword [eax], 0x90909090
mov dword [eax + 4], 0x90909090
jmp 0x10006831
call fcn.1000afcf
int3