Function at 0x14016a0
Capabilities:
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call esi
cmp dword [0x15bcf3c], eax
je 0x14016c1
mov eax, 0x10dd
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [0x15bcf38], 0
push ebx
push edi
je 0x140175d
call esi
cmp dword [0x15bcf3c], eax
jne 0x140193b
mov edi, dword [0x15bcf50]
test edi, edi
je 0x1401749
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
nop
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call ebx
cmp dword [edi + 4], 0
jne 0x1401736
mov esi, dword [edi + 0x10]
test esi, esi
je 0x1401736
push 0x48
push 0
push esi
call fcn.0142ac10
mov ecx, esi
add esp, 0xc
and ecx, 0xffff0000
mov eax, dword [ecx + 8]
mov dword [esi + 0x40], eax
mov dword [ecx + 8], esi
mov dword [edi + 0x10], 0
mov esi, dword [edi]
push 0x18
push edi
call fcn.01428255
add esp, 8
mov edi, esi
test esi, esi
jne 0x14016f0
mov dword [0x15bcf50], 0
call fcn.01401430
jmp 0x1401927
mov esi, dword [0x15bcf50]
xor ebx, ebx
test esi, esi
je 0x14017d6
nop dword [eax]
mov ecx, dword [esi + 0x10]
cmp dword [esi + 4], ebx
je 0x1401791
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [esi + 0xc]
call fcn.0142ae20
mov eax, dword [esi + 0xc]
add esp, 0xc
jmp 0x14017cb
mov edx, dword [esi + 0xc]
xor edi, edi
mov ecx, dword [ecx + 0x44]
lea eax, [edx + 5]
mov byte [edx], 0xe9
sub ecx, eax
mov dword [edx + 1], ecx
add edx, 5
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + 0x40]
sub ecx, edx
cmp edx, dword [eax + 0x40]
cmova ecx, edi
test ecx, ecx
je 0x14017c8
push ecx
push 0xcc
push edx
call fcn.0142ac10
add esp, 0xc
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x1401770
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x15bcf50]
mov esi, eax
mov dword [ebp - 4], esi
test edi, edi
je 0x1401867
nop dword [eax + eax]
lea eax, [ebp - 8]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x1401851
mov esi, dword [edi + 0x10]
test esi, esi
je 0x1401851
push 0x48
push 0
push esi
call fcn.0142ac10
mov ecx, esi
add esp, 0xc
and ecx, 0xffff0000
mov ebx, 1
mov eax, dword [ecx + 8]
mov dword [esi + 0x40], eax
mov dword [ecx + 8], esi
mov dword [edi + 0x10], 0
mov esi, dword [edi]
push 0x18
push edi
call fcn.01428255
add esp, 8
mov edi, esi
test esi, esi
mov esi, dword [ebp - 4]
jne 0x14017f0
mov dword [0x15bcf50], 0
test ebx, ebx
je 0x14018ed
cmp dword [0x15bbe48], 0
jne 0x14018ed
mov ecx, dword [0x15bcf48]
mov edi, 0x15bcf48
test ecx, ecx
je 0x14018ed
nop dword [eax]
cmp dword [ecx], 0x52727464
je 0x140189d
lea edi, [ecx + 4]
jmp 0x14018e7
lea ebx, [ecx + 0x10000]
xor esi, esi
lea edx, [ecx + 0x88]
nop dword [eax + eax]
mov eax, dword [edx]
test eax, eax
je 0x14018be
cmp eax, ecx
jb 0x1401898
cmp eax, ebx
jae 0x1401898
inc esi
add edx, 0x48
cmp esi, 0x38d
jb 0x14018b0
mov eax, dword [ecx + 4]
push 0x8000
push 0
push ecx
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x15bcf40], 0
mov ecx, dword [edi]
test ecx, ecx
jne 0x1401890
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x15bcf48]
mov edi, eax
test esi, esi
je 0x1401927
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push eax
push 0x20
push 0x10000
push esi
call ebx
push 0x10000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov esi, dword [esi + 4]
test esi, esi
jne 0x1401905
mov dword [0x15bcf4c], 0
mov dword [0x15bcf3c], 0
mov eax, dword [0x15bcf38]
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret