Function at 0x10022a00
Capabilities:
Allocate or change rwx memory
Check for software breakpoints
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x100a5064]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, edx
mov ebx, ecx
xor edi, edi
mov dword [ebp - 0x30], ebx
test esi, esi
jne 0x10022a36
pop edi
pop esi
lea eax, [edx + 0x57]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b901
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x100a8674], eax
je 0x10022a5c
pop edi
pop esi
mov eax, 0x10dd
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b901
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [0x100a8670]
test eax, eax
jne 0x10022e67
test ebx, ebx
je 0x10022a83
mov ecx, dword [ebx]
test ecx, ecx
jne 0x10022a9b
mov dword [0x100a8670], 6
mov dword [0x100a867c], ebx
pop edi
pop esi
mov eax, 6
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b901
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
call fcn.10022440
mov ebx, eax
mov ecx, esi
mov dword [ebp - 0x24], ebx
call fcn.10022440
mov dword [ebp - 0x38], eax
cmp eax, ebx
jne 0x10022acc
cmp dword [0x100a8644], edi
jne 0x10022e5d
jmp 0x10022e20
push 0x18
call fcn.1005bb1d
mov dword [ebp - 0x28], eax
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x1c]
mov ecx, ebx
push eax
call fcn.10021fc0
mov ecx, dword [0x100a8678]
add esp, 8
mov edi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
mov eax, dword [0x100a8680]
test ecx, ecx
jne 0x10022b08
test eax, eax
je 0x10022b1b
mov ecx, eax
mov dword [0x100a8678], ecx
mov edx, dword [ecx + 8]
test edx, edx
je 0x10022b1b
cmp edx, ebx
jb 0x10022b1b
cmp edx, edi
jbe 0x10022ba2
mov ecx, eax
mov dword [0x100a8678], ecx
test eax, eax
je 0x10022b47
test ecx, ecx
je 0x10022b3a
mov eax, dword [ecx + 8]
test eax, eax
je 0x10022b3a
cmp eax, ebx
jb 0x10022b3a
cmp eax, edi
jbe 0x10022ba2
mov ecx, dword [ecx + 4]
mov dword [0x100a8678], ecx
test ecx, ecx
jne 0x10022b2b
mov ecx, dword [ebp - 0x24]
mov edx, ebx
movzx eax, cx
push edi
sub ecx, eax
call fcn.100222c0
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x10022e1b
mov dword [ecx], 0x52727464
xor edx, edx
mov dword [ecx + 8], 0
mov esi, 0x38b
mov eax, dword [0x100a8680]
mov dword [ecx + 4], eax
lea eax, [ecx + 0xffa8]
mov dword [0x100a8678], ecx
mov dword [0x100a8680], ecx
mov dword [eax + 0x40], edx
mov edx, eax
sub eax, 0x48
sub esi, 1
jne 0x10022b92
mov dword [ecx + 8], edx
mov edx, dword [ecx + 8]
mov dword [ebp - 0x14], edx
cmp edx, ebx
jb 0x10022e1b
cmp edx, edi
ja 0x10022e1b
mov eax, dword [edx + 0x40]
xorps xmm0, xmm0
mov dword [ecx + 8], eax
lea eax, [edx + 0x38]
mov dword [edx], 0xcccccccc
mov dword [edx + 4], 0xcccccccc
mov dword [edx + 8], 0xcccccccc
mov edi, dword [ebp - 0x24]
mov dword [edx + 0xc], 0xcccccccc
mov dword [edx + 0x10], 0xcccccccc
mov dword [edx + 0x14], 0xcccccccc
mov dword [edx + 0x18], 0xcccccccc
mov dword [edx + 0x1c], 0xcccccccc
mov dword [edx + 0x20], 0xcccccccc
mov dword [edx + 0x24], 0xcccccccc
mov dword [edx + 0x28], 0xcccccccc
mov dword [edx + 0x2c], 0xcccccccc
mov dword [edx + 0x30], 0xcccccccc
mov dword [edx + 0x34], 0xcccccccc
mov dword [edx + 0x40], 0xcccccccc
mov dword [edx + 0x44], 0xcccccccc
mov dword [ebp - 0x20], eax
movq qword [eax], xmm0
mov eax, dword [ebp - 0x14]
mov ebx, eax
add eax, 0x1e
mov dword [ebp - 0x2c], edx
mov edx, edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push ecx
push edx
mov ecx, ebx
mov esi, edx
call fcn.10023490
mov edx, eax
mov eax, dword [ebp - 0xc]
sub eax, esi
add eax, edx
add ebx, eax
mov dword [ebp - 0x1c], ebx
mov ebx, edx
mov ah, byte [ebp - 0x1c]
sub ebx, edi
sub ah, byte [ebp - 0x14]
mov cl, bl
mov edi, dword [ebp - 0x20]
and cl, 7
inc dword [ebp - 0x20]
mov al, ah
shl al, 3
or cl, al
mov byte [ebp - 0xd], ah
mov byte [edi], cl
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x24]
inc ecx
mov dword [ebp - 0x18], ecx
cmp ecx, 8
jae 0x10022d07
mov al, byte [esi]
cmp al, 0xeb
je 0x10022d07
cmp al, 0xe9
je 0x10022d07
cmp al, 0xe0
je 0x10022d07
cmp al, 0xc2
je 0x10022d07
cmp al, 0xc3
je 0x10022d07
cmp al, 0xcc
je 0x10022d07
cmp al, 0xf3
jne 0x10022cfd
cmp byte [esi + 1], 0xc3
je 0x10022d07
cmp al, 0x26
je 0x10022ce4
cmp al, 0x2e
je 0x10022ce4
cmp al, 0x36
je 0x10022ce4
cmp al, 0x3e
je 0x10022ce4
cmp al, 0x64
je 0x10022ce4
cmp al, 0x65
jne 0x10022cf0
cmp byte [esi + 1], 0xff
jne 0x10022cf0
cmp byte [esi + 2], 0x25
je 0x10022d07
cmp ebx, 5
jae 0x10022d39
mov ebx, dword [ebp - 0x1c]
jmp 0x10022c54
cmp al, 0xff
jne 0x10022ccc
cmp byte [esi + 1], 0x25
jmp 0x10022cee
cmp ebx, 5
jae 0x10022d30
nop dword [eax]
mov ecx, edx
call fcn.10022050
test eax, eax
je 0x10022e0b
add edx, eax
mov ebx, edx
sub ebx, edi
cmp ebx, 5
jb 0x10022d10
mov ah, byte [ebp - 0xd]
mov ecx, dword [ebp - 0x18]
cmp ecx, 8
ja 0x10022e0b
mov esi, dword [ebp - 0x34]
cmp dword [ebp - 0x1c], esi
jbe 0x10022d42
int3
mov byte [esi], ah
mov eax, dword [ebp - 0x14]
push ebx
push edi
mov byte [eax + 0x36], bl
add eax, 0x20
push eax
call fcn.1005d630
add esp, 0xc
cmp ebx, 0x19
jbe 0x10022d67
mov edi, 6
jmp 0x10022e20
mov eax, dword [ebp - 0x14]
lea edx, [ebx + edi]
mov ecx, dword [ebp - 0x38]
mov dword [eax + 0x44], ecx
movzx ecx, byte [esi]
add ecx, eax
mov dword [eax + 0x40], edx
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
mov eax, esi
mov dword [ecx + 1], edx
add ecx, 5
sub eax, ecx
xor edx, edx
cmp ecx, esi
cmova eax, edx
test eax, eax
je 0x10022da7
push eax
push 0xcc
push ecx
call fcn.1005dbb0
add esp, 0xc
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x40
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10022dca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x10022e20
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [ecx + 0x10], eax
mov dword [ecx + 0xc], edi
mov dword [ecx + 4], 0
mov eax, dword [ebp - 8]
pop edi
mov dword [ecx + 0x14], eax
mov eax, dword [0x100a8688]
pop esi
mov dword [ecx], eax
xor eax, eax
mov dword [0x100a8688], ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b901
mov esp, ebp
pop ebp
ret 0xc
cmp dword [0x100a8644], 0
mov edi, 9
jne 0x10022e26
jmp 0x10022e20
mov edi, 8
mov dword [0x100a8670], edi
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x10022e4b
push 0x48
push 0
mov esi, ebx
push ebx
and esi, 0xffff0000
call fcn.1005dbb0
mov eax, dword [esi + 8]
add esp, 0xc
mov dword [ebx + 0x40], eax
mov dword [esi + 8], ebx
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x10022e5d
push 0x18
push eax
call fcn.1005be67
add esp, 8
mov eax, dword [ebp - 0x30]
mov dword [0x100a867c], eax
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005b901
mov esp, ebp
pop ebp
ret 0xc