Function at 0x49a56d
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d8
mov eax, dword [0x4f06b4]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x4f5508], eax
je 0x49a598
mov eax, 0x10dd
jmp 0x49a7ca
push edi
xor edi, edi
cmp dword [0x4f550c], edi
je 0x49a5ad
call fcn.0049a4b2
jmp 0x49a7c4
push ebx
push esi
mov esi, dword [0x4f5518]
jmp 0x49a654
mov eax, dword [esi + 0x10]
cmp dword [esi + 4], edi
je 0x49a61b
xor ebx, ebx
cmp byte [eax + 0x17], bl
jbe 0x49a5f9
mov edx, dword [esi + 0xc]
lea ecx, [ebp - 0x2d4]
push ecx
add edx, ebx
mov ecx, eax
mov dword [ebp - 0x2d4], edi
call fcn.0049e57a
cmp dword [ebp - 0x2d4], edi
jne 0x49a5f9
mov ecx, dword [esi + 0x10]
mov ebx, eax
sub ebx, ecx
movzx ecx, byte [ecx + 0x17]
cmp ebx, ecx
jl 0x49a5c9
mov eax, dword [esi + 0x10]
movzx eax, byte [eax + 0x17]
cmp ebx, eax
je 0x49a616
mov eax, dword [esi + 8]
mov dword [0x4f550c], 0xd
mov dword [0x4f5510], eax
mov ecx, dword [esi + 0xc]
jmp 0x49a64d
mov ecx, dword [eax + 0x1c]
mov eax, dword [esi + 0xc]
lea edx, [eax + 5]
sub ecx, edx
mov byte [eax], 0xe9
mov dword [eax + 1], ecx
mov ecx, dword [esi + 0x10]
mov ecx, dword [ecx + 0x18]
add eax, 5
cmp eax, ecx
jae 0x49a64a
sub ecx, eax
push ecx
push 0xcc
push eax
call fcn.004a63e0
add esp, 0xc
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 8]
mov dword [eax], ecx
mov esi, dword [esi]
cmp esi, edi
jne 0x49a5ba
mov ebx, dword [0x4f5514]
cmp ebx, edi
je 0x49a706
mov edi, dword [sym.imp.KERNEL32.dll_SetThreadContext]
lea eax, [ebp - 0x2d0]
push eax
push dword [ebx + 4]
mov dword [ebp - 0x2d0], 0x10001
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x49a6fa
mov esi, dword [0x4f5518]
jmp 0x49a6f6
cmp dword [esi + 4], 0
je 0x49a6bd
mov eax, dword [esi + 0x10]
cmp dword [ebp - 0x218], eax
jb 0x49a6f4
lea ecx, [eax + 4]
cmp dword [ebp - 0x218], ecx
jae 0x49a6f4
sub dword [ebp - 0x218], eax
mov eax, dword [esi + 0xc]
jmp 0x49a6e2
mov eax, dword [esi + 0xc]
cmp dword [ebp - 0x218], eax
jb 0x49a6f4
mov ecx, dword [esi + 0x10]
movzx ecx, byte [ecx + 0x17]
add ecx, eax
cmp dword [ebp - 0x218], ecx
jae 0x49a6f4
sub dword [ebp - 0x218], eax
mov eax, dword [esi + 0x10]
add dword [ebp - 0x218], eax
lea eax, [ebp - 0x2d0]
push eax
push dword [ebx + 4]
call edi
mov esi, dword [esi]
test esi, esi
jne 0x49a696
mov ebx, dword [ebx]
test ebx, ebx
jne 0x49a670
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x4f5518]
mov dword [ebp - 0x2d4], eax
cmp esi, edi
je 0x49a789
lea eax, [ebp - 0x2d8]
push eax
mov eax, dword [esi + 0x10]
push dword [esi + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [esi + 0x10]
movzx eax, byte [eax + 0x17]
push eax
push dword [esi + 0xc]
push dword [ebp - 0x2d4]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [esi + 4], edi
je 0x49a77a
mov ebx, dword [esi + 0x10]
cmp ebx, edi
je 0x49a77a
push 8
xor eax, eax
mov edx, ebx
and edx, 0xffff0000
pop ecx
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [edx + 8]
mov dword [ebx + 0x18], eax
mov dword [edx + 8], ebx
and dword [esi + 0x10], 0
xor edi, edi
mov ebx, dword [esi]
push esi
call fcn.004a5452
pop ecx
mov esi, ebx
cmp ebx, edi
jne 0x49a71c
mov dword [0x4f5518], edi
call fcn.0049a19b
mov esi, dword [0x4f5514]
cmp esi, edi
je 0x49a7b6
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ebx, dword [esi]
push esi
call fcn.004a5452
pop ecx
mov esi, ebx
cmp ebx, edi
jne 0x49a79e
pop esi
mov dword [0x4f5514], edi
mov dword [0x4f5508], edi
pop ebx
mov eax, dword [0x4f550c]
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a545d
leave
ret