Function at 0x100107b0
Capabilities:
Allocate or change rwx memory
Check for software breakpoints
Execute shellcode via indirect call
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xac
mov eax, dword [0x10065070]
xor eax, esp
mov dword [esp + 0xa8], eax
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
xor esi, esi
mov dword [esp + 0x3c], ebx
test edi, edi
jne 0x100107f5
lea eax, [edx + 0x57]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.10045f1d
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x10066eb4], eax
je 0x1001081f
mov eax, 0x10dd
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.10045f1d
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [0x10066eb0]
test eax, eax
jne 0x10010c60
test ebx, ebx
je 0x10010846
mov ecx, dword [ebx]
test ecx, ecx
jne 0x10010862
mov dword [0x10066eb0], 6
mov dword [0x10066ebc], ebx
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.10045f1d
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x20], eax
call fcn.10010220
mov ecx, edi
mov dword [esp + 0x14], eax
call fcn.10010220
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x14]
jne 0x10010895
cmp dword [0x10066e6c], ebx
jne 0x10010c55
jmp 0x10010c7e
push 0x18
call fcn.10045fe5
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x14]
add esp, 4
mov dword [esp + 0x20], eax
lea eax, [esp + 0x24]
mov ecx, esi
push eax
call fcn.1000fda0
mov ecx, dword [0x10066eb8]
add esp, 4
mov edi, dword [esp + 0x24]
mov eax, dword [0x10066ec0]
test ecx, ecx
jne 0x100108d9
test eax, eax
je 0x100108f2
mov ecx, eax
mov dword [0x10066eb8], ecx
mov edx, dword [ecx + 8]
mov ebx, dword [esp + 0x10]
test edx, edx
je 0x100108f6
cmp edx, ebx
jb 0x100108f6
cmp edx, edi
jbe 0x10010984
jmp 0x100108f6
mov ebx, dword [esp + 0x10]
mov ecx, eax
mov dword [0x10066eb8], ecx
test eax, eax
je 0x10010925
mov edx, eax
cmp dword [edx + 8], 0
je 0x10010914
cmp dword [edx + 8], ebx
jb 0x10010914
cmp dword [edx + 8], edi
jbe 0x10010984
mov ecx, dword [ecx + 4]
mov eax, ecx
mov dword [0x10066eb8], ecx
mov edx, ecx
test eax, eax
jne 0x10010904
mov ecx, esi
mov edx, ebx
push edi
and ecx, 0xffff0000
call fcn.10010070
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x10010c77
mov dword [ecx], 0x52727464
xor edx, edx
mov dword [ecx + 8], 0
mov esi, 0x38b
mov eax, dword [0x10066ec0]
mov dword [ecx + 4], eax
lea eax, [ecx + 0xffa8]
mov dword [0x10066eb8], ecx
mov dword [0x10066ec0], ecx
mov dword [eax + 0x40], edx
mov edx, eax
sub eax, 0x48
sub esi, 1
jne 0x10010970
mov esi, dword [esp + 0x14]
mov dword [ecx + 8], edx
mov ebx, dword [ecx + 8]
cmp ebx, dword [esp + 0x10]
jb 0x10010c77
cmp ebx, edi
ja 0x10010c77
mov eax, dword [ebx + 0x40]
push 0x48
push 0xcc
push ebx
mov dword [ecx + 8], eax
call sub.msvcrt.dll_memset
add esp, 0xc
test ebx, ebx
je 0x10010c79
lea eax, [ebx + 0x38]
mov dword [esp + 0x1c], 0
xorps xmm0, xmm0
mov dword [esp + 0x34], eax
movq qword [eax], xmm0
mov edx, ebx
lea eax, [ebx + 0x1e]
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], eax
mov byte [esp + 0x1a], bl
mov dword [esp + 0x10], ebx
lea eax, [esp + 0x6c]
mov dword [esp + 0x40], 0
test edx, edx
mov dword [esp + 0x60], eax
lea ecx, [esp + 0x70]
mov dword [esp + 0x44], 0
lea eax, [esp + 0x30]
mov dword [esp + 0x48], 0
cmovne ecx, edx
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov edi, esi
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x64], eax
mov dword [esp + 0x6c], 0
mov dword [esp + 0x30], 0
test esi, esi
jne 0x10010a53
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10010a6f
movzx eax, byte [esi]
mov edx, dword [eax*8 + 0x10067834]
lea eax, [eax*8 + 0x10067830]
push esi
push ecx
push eax
lea ecx, [esp + 0x4c]
call edx
mov esi, eax
mov edx, dword [esp + 0x28]
mov eax, esi
inc dword [esp + 0x1c]
sub eax, edi
add eax, dword [esp + 0x30]
mov ebx, esi
sub ebx, dword [esp + 0x14]
add edx, eax
mov ch, dl
mov dword [esp + 0x28], edx
sub ch, byte [esp + 0x1a]
mov al, bl
and al, 7
mov byte [esp + 0x1b], ch
mov cl, ch
shl cl, 3
or cl, al
mov eax, dword [esp + 0x34]
mov byte [eax], cl
inc eax
cmp dword [esp + 0x1c], 8
mov dword [esp + 0x34], eax
jae 0x10010b11
mov cl, byte [edi]
cmp cl, 0xeb
je 0x10010b11
cmp cl, 0xe9
je 0x10010b11
cmp cl, 0xe0
je 0x10010b11
cmp cl, 0xc2
je 0x10010b11
cmp cl, 0xc3
je 0x10010b11
cmp cl, 0xcc
je 0x10010b11
lea eax, [edi + 1]
cmp cl, 0xf3
jne 0x10010b3e
cmp byte [eax], 0xc3
je 0x10010b11
cmp cl, 0x26
je 0x10010afd
cmp cl, 0x2e
je 0x10010afd
cmp cl, 0x36
je 0x10010afd
cmp cl, 0x3e
je 0x10010afd
cmp cl, 0x64
je 0x10010afd
cmp cl, 0x65
jne 0x10010b08
cmp byte [eax], 0xff
jne 0x10010b08
cmp byte [edi + 2], 0x25
je 0x10010b11
cmp ebx, 5
jb 0x100109e2
cmp ebx, 5
jae 0x10010b48
mov ecx, esi
call fcn.1000fe30
test eax, eax
je 0x10010c29
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, eax
cmp ebx, 5
jb 0x10010b16
mov edx, dword [esp + 0x28]
mov ch, byte [esp + 0x1b]
jmp 0x10010b4c
cmp cl, 0xff
jne 0x10010adf
cmp byte [eax], 0x25
jmp 0x10010b06
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x1c], 8
ja 0x10010c29
mov esi, dword [esp + 0x24]
cmp edx, esi
jbe 0x10010b60
int3
mov edi, dword [esp + 0x10]
push ebx
push eax
mov byte [esi], ch
lea eax, [edi + 0x20]
mov byte [edi + 0x36], bl
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp ebx, 0x19
jbe 0x10010b88
mov esi, 6
mov ebx, edi
jmp 0x10010c7e
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
add esi, ebx
mov dword [edi + 0x44], eax
movzx ecx, byte [edx]
add ecx, edi
mov dword [edi + 0x40], esi
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub esi, eax
mov dword [ecx + 1], esi
add ecx, 5
call fcn.1000fd70
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0
push eax
push 0x40
push ebx
mov ebx, dword [esp + 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10010be4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [esp + 0x10]
mov esi, eax
jmp 0x10010c7e
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x3c]
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0
mov dword [ecx + 0x10], edi
mov dword [ecx + 0xc], ebx
mov eax, dword [esp + 0x38]
mov dword [ecx + 0x14], eax
mov eax, dword [0x10066ec8]
mov dword [ecx], eax
xor eax, eax
mov dword [0x10066ec8], ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.10045f1d
mov esp, ebp
pop ebp
ret 0xc
cmp dword [0x10066e6c], 0
mov esi, 9
mov ebx, dword [esp + 0x10]
je 0x10010c7e
mov edi, dword [esp + 0x20]
mov ecx, ebx
call fcn.100101f0
test edi, edi
je 0x10010c55
push 0x18
push edi
call fcn.1004632f
add esp, 8
mov eax, dword [esp + 0x3c]
mov dword [0x10066ebc], eax
mov eax, esi
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10045f1d
mov esp, ebp
pop ebp
ret 0xc
xor ebx, ebx
mov esi, 8
mov edi, dword [esp + 0x20]
mov dword [0x10066eb0], esi
test ebx, ebx
je 0x10010c46
jmp 0x10010c3f