Function at 0x580380
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2d4
mov ecx, dword [ebp + 8]
mov eax, dword [0x5f3418]
xor eax, ebp
mov dword [ebp - 0x10], eax
test ecx, ecx
je 0x5803a4
mov eax, dword [0x6c04ec]
mov dword [ecx], eax
mov edi, dword [0x6c04dc]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, 0x10dd
cmp edi, eax
jne 0x58066f
cmp dword [0x6c04e8], 0
jne 0x580688
mov esi, dword [0x6c04e0]
test esi, esi
je 0x580495
xor ebx, ebx
cmp dword [esi + 4], 0
mov ecx, dword [esi + 0x10]
je 0x580420
cmp byte [ecx + 0x17], 0
je 0x580457
xor edi, edi
mov dword [ebp - 0x2dc], ebx
mov eax, dword [esi + 0xc]
add eax, edi
lea edx, [ebp - 0x2dc]
push edx
push ebx
push ecx
push eax
call fcn.0058ac40
cmp dword [ebp - 0x2dc], ebx
jne 0x58048b
mov ecx, eax
mov edx, dword [esi + 0x10]
sub eax, edx
movzx edx, byte [edx + 0x17]
mov edi, eax
cmp eax, edx
jl 0x5803eb
jmp 0x58045b
mov eax, dword [ecx + 0x1c]
mov edx, dword [esi + 0xc]
lea ecx, [edx + 5]
mov byte [edx], 0xe9
sub eax, ecx
mov dword [edx + 1], eax
mov eax, dword [esi + 0x10]
mov edi, dword [eax + 0x18]
cmp ecx, edi
jae 0x580452
sub edi, edx
add edi, 0xfffffffb
push edi
push 0xcc
push ecx
call fcn.005191b0
add esp, 0xc
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
jmp 0x58047d
xor edx, edx
xor eax, eax
movzx ecx, dl
cmp eax, ecx
jne 0x580467
mov ecx, dword [esi + 8]
jmp 0x58047a
mov dword [0x6c04e8], 0xd
mov ecx, dword [esi + 8]
mov dword [0x6c04ec], ecx
mov eax, dword [esi + 0xc]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x5803da
jmp 0x580495
mov eax, dword [esi + 0x10]
mov dl, byte [eax + 0x17]
mov eax, edi
jmp 0x58045b
mov esi, dword [0x6c04e4]
test esi, esi
je 0x58056b
push 0x2c8
push 0xff
lea eax, [ebp - 0x2d8]
push eax
call fcn.005191b0
add esp, 0xc
mov dword [ebp - 0x2dc], 0x10001
lea eax, [ebp - 0x2dc]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x580564
mov edi, dword [0x6c04e0]
test edi, edi
je 0x580564
mov eax, dword [4]
mov dword [ebp - 0x2e0], esi
mov edx, dword [ebp - 0x224]
test eax, eax
je 0x58053b
mov ebx, dword [edi + 0x10]
mov ecx, edx
sub ecx, ebx
jb 0x580533
add ebx, 4
cmp edx, ebx
jae 0x580533
mov dword [ebp - 0x224], ecx
lea eax, [edi + 0xc]
add ecx, dword [eax]
mov dword [ebp - 0x224], ecx
lea eax, [ebp - 0x2dc]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov eax, dword [4]
mov edi, dword [edi]
test edi, edi
jne 0x5804f3
jmp 0x580564
mov ebx, dword [edi + 0xc]
xor eax, eax
mov ecx, edx
sub ecx, ebx
jb 0x580533
mov esi, dword [edi + 0x10]
movzx esi, byte [esi + 0x17]
add esi, ebx
cmp edx, esi
mov esi, dword [ebp - 0x2e0]
jae 0x580533
lea eax, [edi + 0x10]
mov dword [ebp - 0x224], ecx
jmp 0x580516
mov esi, dword [esi]
jmp 0x58049b
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x6c04e0]
test edi, edi
je 0x5805ed
mov esi, eax
mov dword [ebp - 0x2dc], 0xffffffff
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x17]
lea ecx, [ebp - 0x2dc]
push ecx
push dword [edi + 0x14]
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 esi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x5805dc
mov eax, dword [edi + 0x10]
test eax, eax
je 0x5805dc
mov ecx, eax
and ecx, 0xffff0000
xorps xmm0, xmm0
movups xmmword [eax + 0x10], xmm0
movups xmmword [eax], xmm0
mov edx, dword [ecx + 8]
mov dword [eax + 0x18], edx
mov dword [ecx + 8], eax
mov ebx, dword [edi]
push edi
call fcn.0050fc7c
add esp, 4
mov edi, ebx
test ebx, ebx
jne 0x58057d
mov dword [0x6c04e0], 0
mov esi, dword [0x6c04f0]
test esi, esi
je 0x580629
lea edi, [ebp - 0x2dc]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x2dc], 0xffffffff
push edi
push 0x20
push 0x10000
push esi
call ebx
mov esi, dword [esi + 4]
test esi, esi
jne 0x58060d
mov esi, dword [0x6c04e4]
test esi, esi
je 0x58064f
mov edi, dword [sym.imp.KERNEL32.dll_ResumeThread]
push dword [esi + 4]
call edi
mov ebx, dword [esi]
push esi
call fcn.0050fc7c
add esp, 4
mov esi, ebx
test ebx, ebx
jne 0x580639
xor eax, eax
mov dword [0x6c04e4], eax
mov dword [0x6c04dc], eax
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x580669
mov eax, dword [0x6c04ec]
mov dword [ecx], eax
mov esi, dword [0x6c04e8]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00512ee3
mov eax, esi
add esp, 0x2d4
pop esi
pop edi
pop ebx
pop ebp
ret 4
call fcn.00580260
jmp 0x580669