Function at 0x27012ac8
Capabilities:
Resume thread

Disassembly:
push ebp
lea ebp, [esp - 0x25c]
sub esp, 0x2dc
mov eax, dword [0x270b313c]
xor eax, ebp
mov dword [ebp + 0x258], eax
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x270c48e0], eax
je 0x27012afa
mov eax, 0x10dd
jmp 0x27012d1e
push edi
xor edi, edi
cmp dword [0x270c48e4], edi
je 0x27012b0f
call fcn.27012a05
jmp 0x27012d18
push esi
mov esi, dword [0x270c48f0]
mov dword [ebp - 0x7c], edi
jmp 0x27012b65
mov eax, dword [esi + 0x10]
cmp dword [esi + 4], edi
je 0x27012b3c
movzx ecx, byte [eax + 0x36]
push ecx
add eax, 0x20
push eax
push dword [esi + 0xc]
call sub.msvcrt.dll_memcpy
mov ecx, dword [esi + 0xc]
add esp, 0xc
jmp 0x27012b5e
mov ecx, dword [eax + 0x44]
mov eax, dword [esi + 0xc]
lea edx, [eax + 5]
mov byte [eax], 0xe9
inc eax
sub ecx, edx
mov dword [eax], ecx
mov edx, dword [esi + 0x10]
lea ecx, [eax + 4]
mov eax, dword [edx + 0x40]
call fcn.27012337
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 8]
mov dword [eax], ecx
mov esi, dword [esi]
cmp esi, edi
jne 0x27012b1b
mov eax, dword [0x270c48ec]
push ebx
mov ebx, eax
cmp eax, edi
je 0x27012c3b
lea eax, [ebp - 0x74]
push eax
mov dword [ebp - 0x74], 0x10001
push dword [ebx + 4]
call sub.KERNEL32.dll_GetThreadContext
test eax, eax
je 0x27012c31
mov esi, dword [0x270c48f0]
jmp 0x27012c29
cmp dword [esi + 4], edi
je 0x27012be2
mov eax, dword [esi + 0x10]
cmp dword [ebp + 0x44], eax
jb 0x27012c25
add eax, 4
cmp dword [ebp + 0x44], eax
jae 0x27012c25
mov ecx, dword [esi + 0x10]
mov al, byte [ebp + 0x44]
sub al, cl
mov dl, byte [ecx + edi + 0x38]
shr dl, 3
cmp dl, al
je 0x27012bda
inc edi
cmp edi, 8
jb 0x27012bbc
xor al, al
movzx eax, al
add eax, dword [esi + 0xc]
mov dword [ebp + 0x44], eax
jmp 0x27012c19
mov al, byte [edi + ecx + 0x38]
and al, 7
jmp 0x27012bcf
mov ecx, dword [esi + 0xc]
cmp dword [ebp + 0x44], ecx
jb 0x27012c25
mov eax, dword [esi + 0x10]
movzx edx, byte [eax + 0x36]
add edx, ecx
cmp dword [ebp + 0x44], edx
jae 0x27012c25
mov cl, byte [ebp + 0x44]
sub cl, byte [esi + 0xc]
mov dl, byte [eax + edi + 0x38]
and dl, 7
cmp dl, cl
je 0x27012c4c
inc edi
cmp edi, 8
jb 0x27012bfe
xor eax, eax
mov ecx, dword [esi + 0x10]
add ecx, eax
mov dword [ebp + 0x44], ecx
lea eax, [ebp - 0x74]
push eax
push dword [ebx + 4]
call sub.KERNEL32.dll_SetThreadContext
mov esi, dword [esi]
xor edi, edi
cmp esi, edi
jne 0x27012b9f
mov ebx, dword [ebx]
cmp ebx, edi
jne 0x27012b79
call sub.KERNEL32.dll_GetCurrentProcess
mov esi, dword [0x270c48f0]
mov ebx, eax
cmp esi, edi
jmp 0x27012cab
movzx eax, byte [edi + eax + 0x38]
shr eax, 3
jmp 0x27012c11
lea eax, [ebp - 0x80]
push eax
mov eax, dword [esi + 0x10]
push dword [esi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [esi + 0xc]
call sub.KERNEL32.dll_VirtualProtect
mov eax, dword [esi + 0x10]
movzx eax, byte [eax + 0x36]
push eax
push dword [esi + 0xc]
push ebx
call sub.KERNEL32.dll_FlushInstructionCache
cmp dword [esi + 4], 0
je 0x27012c9d
cmp dword [esi + 0x10], 0
je 0x27012c9d
mov edi, dword [esi + 0x10]
call fcn.270128f5
and dword [esi + 0x10], 0
mov dword [ebp - 0x7c], 1
mov edi, dword [esi]
lea esi, [ebp - 0x78]
call fcn.27014f00
mov esi, edi
test edi, edi
mov dword [ebp - 0x78], esi
jne 0x27012c56
xor edi, edi
mov dword [0x270c48f0], edi
pop ebx
cmp dword [ebp - 0x7c], edi
je 0x27012ccb
cmp dword [0x270c48dc], edi
jne 0x27012ccb
call fcn.27012916
call fcn.27012674
mov eax, dword [0x270c48ec]
mov esi, eax
cmp eax, edi
je 0x27012cee
push dword [esi + 4]
call sub.KERNEL32.dll_ResumeThread
mov esi, dword [esi]
cmp esi, edi
jne 0x27012cdb
mov eax, dword [0x270c48ec]
mov dword [ebp - 0x78], eax
cmp eax, edi
je 0x27012d09
mov eax, dword [ebp - 0x78]
mov esi, dword [eax]
lea edi, [ebp - 0x78]
call fcn.27014f1c
mov dword [ebp - 0x78], esi
test esi, esi
jne 0x27012cf5
and dword [0x270c48ec], 0
and dword [0x270c48e0], 0
pop esi
mov eax, dword [0x270c48e4]
pop edi
mov ecx, dword [ebp + 0x258]
xor ecx, ebp
call fcn.27088f70
add ebp, 0x25c
leave
ret