Function at 0x46227d
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x5b38f0]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x5bb404], eax
je 0x4622a8
mov eax, 0x10dd
jmp 0x4624ca
cmp dword [0x5bb400], 0
je 0x4622bb
call fcn.004621d0
jmp 0x4624c5
push ebx
push esi
push edi
mov edi, dword [0x5bb3f8]
jmp 0x462371
cmp dword [edi + 4], 0
mov eax, dword [edi + 0x10]
je 0x462348
xor ebx, ebx
mov dword [ebp - 0x334], eax
cmp byte [eax + 0x17], bl
jbe 0x462326
mov esi, dword [edi + 0xc]
lea eax, [ebp - 0x330]
and dword [ebp - 0x330], 0
lea ecx, [ebp - 0x60]
push eax
push 0
add esi, ebx
call fcn.004aab3d
push dword [ebp - 0x334]
push esi
call fcn.004aab73
cmp dword [ebp - 0x330], 0
mov dword [ebp - 0x334], eax
jne 0x462326
mov ecx, dword [edi + 0x10]
mov ebx, eax
sub ebx, ecx
movzx ecx, byte [ecx + 0x17]
cmp ebx, ecx
jl 0x4622df
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x17]
cmp ebx, eax
je 0x462343
mov eax, dword [edi + 8]
mov dword [0x5bb400], 0xd
mov dword [0x5bb3ec], eax
mov eax, dword [edi + 0xc]
jmp 0x46236a
mov esi, dword [edi + 0xc]
mov ecx, dword [eax + 0x1c]
lea eax, [esi + 5]
mov byte [esi], 0xe9
sub ecx, eax
mov dword [esi + 1], ecx
lea ecx, [esi + 5]
mov edx, dword [edi + 0x10]
mov edx, dword [edx + 0x18]
call fcn.00461dfc
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 8]
mov dword [ecx], eax
mov edi, dword [edi]
test edi, edi
jne 0x4622c9
mov edi, dword [0x5bb3f0]
test edi, edi
je 0x462423
mov ebx, dword [sym.imp.KERNEL32.dll_SetThreadContext]
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x32c], 0x10001
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x462419
mov esi, dword [0x5bb3f8]
test esi, esi
je 0x462419
mov ecx, dword [ebp - 0x274]
cmp dword [esi + 4], 0
je 0x4623dc
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x462413
lea eax, [edx + 4]
cmp ecx, eax
jae 0x462413
sub ecx, edx
mov dword [ebp - 0x274], ecx
add ecx, dword [esi + 0xc]
jmp 0x4623fb
cmp ecx, dword [esi + 0xc]
jb 0x462413
mov eax, dword [esi + 0x10]
movzx eax, byte [eax + 0x17]
add eax, dword [esi + 0xc]
cmp ecx, eax
jae 0x462413
sub ecx, dword [esi + 0xc]
mov dword [ebp - 0x274], ecx
add ecx, dword [esi + 0x10]
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x274], ecx
push eax
push dword [edi + 4]
call ebx
mov ecx, dword [ebp - 0x274]
mov esi, dword [esi]
test esi, esi
jne 0x4623bb
mov edi, dword [edi]
test edi, edi
jne 0x46238d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x5bb3f8]
mov ebx, eax
test edi, edi
je 0x462487
lea eax, [ebp - 0x330]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x17]
push eax
push dword [edi + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x462478
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x462478
call fcn.004620eb
and dword [edi + 0x10], 0
mov esi, dword [edi]
push edi
call fcn.0052558c
mov edi, esi
pop ecx
test esi, esi
jne 0x462435
xor ebx, ebx
mov dword [0x5bb3f8], ebx
call fcn.00461ed9
mov edi, dword [0x5bb3f0]
test edi, edi
je 0x4624b6
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push edi
call fcn.0052558c
mov edi, esi
pop ecx
test esi, esi
jne 0x46249e
pop edi
pop esi
mov dword [0x5bb3f0], ebx
mov dword [0x5bb404], ebx
pop ebx
mov eax, dword [0x5bb400]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052b1ec
mov esp, ebp
pop ebp
ret