Function at 0x1008c090
Capabilities:
Resume thread

Disassembly:
sub esp, 0x2d8
mov eax, dword [0x101b9578]
mov dword [esp + 0x2d4], eax
mov eax, dword [esp + 0x2dc]
test eax, eax
je 0x1008c0b5
mov ecx, dword [0x101c8400]
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x101c83f8], eax
je 0x1008c0dd
mov eax, 0x10dd
mov ecx, dword [esp + 0x2d4]
call fcn.1010122d
add esp, 0x2d8
ret 4
mov eax, dword [0x101c83fc]
test eax, eax
je 0x1008c0f0
call fcn.1008bfc0
jmp 0x1008c38c
mov edx, dword [0x101c8408]
test edx, edx
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], 0
je 0x1008c176
mov eax, dword [edx + 4]
test eax, eax
je 0x1008c132
mov eax, dword [edx + 0x10]
movzx ecx, byte [eax + 0x36]
mov edi, dword [edx + 0xc]
lea esi, [eax + 0x20]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
mov dword [ecx], eax
jmp 0x1008c170
mov eax, dword [edx + 0xc]
mov ecx, dword [edx + 0x10]
mov ecx, dword [ecx + 0x44]
mov byte [eax], 0xe9
lea esi, [eax + 5]
sub ecx, esi
inc eax
mov dword [eax], ecx
mov ecx, dword [edx + 0x10]
mov ecx, dword [ecx + 0x40]
lea edi, [eax + 4]
cmp edi, ecx
jae 0x1008c168
sub ecx, edi
mov esi, ecx
shr ecx, 2
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [edx + 8]
mov ecx, dword [edx + 0x10]
mov dword [eax], ecx
mov edx, dword [edx]
test edx, edx
jne 0x1008c106
mov eax, dword [0x101c8404]
test eax, eax
mov ebp, eax
je 0x1008c287
mov ebx, dword [sym.imp.KERNEL32.dll_SetThreadContext]
jmp 0x1008c190
mov eax, dword [ebp + 4]
lea edx, [esp + 0x18]
push edx
push eax
mov dword [esp + 0x20], 0x10001
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x1008c27c
mov edi, dword [0x101c8408]
test edi, edi
je 0x1008c27c
mov ecx, dword [esp + 0xd0]
mov eax, dword [edi + 4]
test eax, eax
je 0x1008c225
mov esi, dword [edi + 0x10]
cmp ecx, esi
jb 0x1008c272
lea edx, [esi + 4]
cmp ecx, edx
jae 0x1008c272
mov dl, byte [edi + 0x10]
xor eax, eax
sub cl, dl
jmp 0x1008c1f0
mov dl, byte [esi + eax + 0x38]
shr dl, 3
cmp dl, cl
je 0x1008c21d
inc eax
cmp eax, 8
jb 0x1008c1f0
xor al, al
mov esi, dword [edi + 0xc]
mov edx, dword [ebp + 4]
movzx eax, al
lea ecx, [esp + 0x18]
add eax, esi
push ecx
mov dword [esp + 0xd4], eax
push edx
jmp 0x1008c269
mov al, byte [eax + esi + 0x38]
and al, 7
jmp 0x1008c203
mov eax, dword [edi + 0xc]
cmp ecx, eax
jb 0x1008c272
mov esi, dword [edi + 0x10]
movzx edx, byte [esi + 0x36]
add edx, eax
cmp ecx, edx
jae 0x1008c272
mov dl, byte [edi + 0xc]
xor eax, eax
sub cl, dl
mov dl, byte [esi + eax + 0x38]
and dl, 7
cmp dl, cl
je 0x1008c3a6
inc eax
cmp eax, 8
jb 0x1008c240
xor eax, eax
mov ecx, dword [ebp + 4]
add esi, eax
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0xd4], esi
push ecx
call ebx
mov ecx, dword [esp + 0xd0]
mov edi, dword [edi]
test edi, edi
jne 0x1008c1c4
mov ebp, dword [ebp]
test ebp, ebp
jne 0x1008c190
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x101c8408]
test esi, esi
mov ebx, eax
je 0x1008c314
lea esp, [esp]
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edx, [esp + 0x14]
push edx
movzx edx, byte [ecx + 0x36]
push eax
mov eax, dword [esi + 0xc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [esi + 0x10]
movzx edx, byte [ecx + 0x36]
mov eax, dword [esi + 0xc]
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov eax, dword [esi + 4]
test eax, eax
je 0x1008c303
mov ebp, dword [esi + 0x10]
test ebp, ebp
je 0x1008c303
mov edx, ebp
and edx, 0xffff0000
xor eax, eax
mov ecx, 0x12
mov edi, ebp
rep stosd dword es:[edi], eax
mov ecx, dword [edx + 8]
mov dword [ebp + 0x40], ecx
mov dword [edx + 8], ebp
mov dword [esi + 0x10], eax
mov dword [esp + 0x10], 1
mov edi, dword [esi]
push esi
call fcn.10152975
add esp, 4
test edi, edi
mov esi, edi
jne 0x1008c2a0
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [0x101c8408], 0
je 0x1008c334
mov eax, dword [0x101c83f4]
test eax, eax
jne 0x1008c334
call fcn.1008bf00
call fcn.1008bb80
mov esi, dword [0x101c8404]
test esi, esi
je 0x1008c367
mov ebp, dword [sym.imp.KERNEL32.dll_ResumeThread]
lea esp, [esp]
mov edx, dword [esi + 4]
push edx
call ebp
mov edi, dword [esi]
push esi
call fcn.10152975
add esp, 4
test edi, edi
mov esi, edi
jne 0x1008c350
mov eax, dword [esp + 0x2ec]
pop edi
xor ecx, ecx
cmp eax, ecx
pop esi
pop ebp
mov dword [0x101c8404], ecx
mov dword [0x101c83f8], ecx
pop ebx
je 0x1008c38c
mov ecx, dword [0x101c8400]
mov dword [eax], ecx
mov ecx, dword [esp + 0x2d4]
mov eax, dword [0x101c83fc]
call fcn.1010122d
add esp, 0x2d8
ret 4
movzx eax, byte [eax + esi + 0x38]
shr eax, 3
jmp 0x1008c257