Function at 0x4a6b58
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x5441b8], eax
je 0x4a6b76
mov eax, 0x10dd
leave
ret
push ebx
xor ebx, ebx
cmp dword [0x5441bc], ebx
je 0x4a6b8b
call fcn.004a6ab7
jmp 0x4a6d6a
push esi
mov esi, dword [0x5441c8]
push edi
jmp 0x4a6c1b
cmp dword [esi + 4], ebx
je 0x4a6bef
mov ecx, dword [esi + 0x10]
xor edi, edi
cmp byte [ecx + 0x17], bl
jbe 0x4a6bcd
mov edx, dword [esi + 0xc]
add edx, edi
lea eax, [ebp - 4]
mov dword [ebp - 4], ebx
call fcn.004a70de
cmp dword [ebp - 4], ebx
mov ecx, eax
jne 0x4a6bcd
mov eax, dword [esi + 0x10]
mov edi, ecx
sub edi, eax
movzx eax, byte [eax + 0x17]
cmp edi, eax
jl 0x4a6ba7
mov eax, dword [esi + 0x10]
movzx eax, byte [eax + 0x17]
cmp edi, eax
je 0x4a6bea
mov eax, dword [esi + 8]
mov dword [0x5441bc], 0xd
mov dword [0x5441c0], eax
mov ecx, dword [esi + 0xc]
jmp 0x4a6c14
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + 0x1c]
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 + 0x18]
call fcn.004a6714
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 8]
mov dword [eax], ecx
mov esi, dword [esi]
cmp esi, ebx
jne 0x4a6b98
mov edi, dword [0x5441c4]
cmp edi, ebx
je 0x4a6ccd
mov ebx, dword [sym.imp.KERNEL32.dll_SetThreadContext]
lea eax, [ebp - 0x2d4]
push eax
push dword [edi + 4]
mov dword [ebp - 0x2d4], 0x10001
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x4a6cc1
mov esi, dword [0x5441c8]
jmp 0x4a6cbd
cmp dword [esi + 4], 0
je 0x4a6c84
mov eax, dword [esi + 0x10]
cmp dword [ebp - 0x21c], eax
jb 0x4a6cbb
lea ecx, [eax + 4]
cmp dword [ebp - 0x21c], ecx
jae 0x4a6cbb
sub dword [ebp - 0x21c], eax
mov eax, dword [esi + 0xc]
jmp 0x4a6ca9
mov eax, dword [esi + 0xc]
cmp dword [ebp - 0x21c], eax
jb 0x4a6cbb
mov ecx, dword [esi + 0x10]
movzx ecx, byte [ecx + 0x17]
add ecx, eax
cmp dword [ebp - 0x21c], ecx
jae 0x4a6cbb
sub dword [ebp - 0x21c], eax
mov eax, dword [esi + 0x10]
add dword [ebp - 0x21c], eax
lea eax, [ebp - 0x2d4]
push eax
push dword [edi + 4]
call ebx
mov esi, dword [esi]
test esi, esi
jne 0x4a6c5d
mov edi, dword [edi]
test edi, edi
jne 0x4a6c37
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x5441c8]
cmp esi, ebx
mov dword [ebp - 4], eax
je 0x4a6d2f
lea eax, [ebp - 8]
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 - 4]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [esi + 4], ebx
je 0x4a6d20
mov edi, dword [esi + 0x10]
cmp edi, ebx
je 0x4a6d20
call fcn.004a6989
mov dword [esi + 0x10], ebx
mov edi, dword [esi]
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x4a6ce0
mov dword [0x5441c8], ebx
call fcn.004a6781
mov esi, dword [0x5441c4]
cmp esi, ebx
je 0x4a6d5c
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edi, dword [esi]
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x4a6d44
pop edi
mov dword [0x5441c4], ebx
mov dword [0x5441b8], ebx
pop esi
mov eax, dword [0x5441bc]
pop ebx
leave
ret