Function at 0x51f1c8
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3f8
mov eax, dword [0x8d5f40]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x14], 0
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x3f8], eax
je 0x51f38c
xor ebx, ebx
mov dword [ebp - 0x3e0], ebx
mov byte [ebp - 0x3f4], bl
mov byte [ebp - 0x3d9], bl
test edi, edi
je 0x51f322
push esi
push ebx
push 0x48
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x51f38c
mov esi, edi
mov byte [ebp - 0x3d9], 1
mov ecx, 0xb3
lea edi, [ebp - 0x3d8]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
push 0x108
push eax
lea eax, [ebp - 0x10c]
push eax
call fcn.00718210
mov eax, dword [ebp - 0x320]
lea esi, [ebp - 0x3f0]
mov dword [ebp - 0x3f0], eax
lea edi, [ebp - 0x10c]
xor eax, eax
xor ecx, ecx
mov word [ebp - 0x3e8], ax
mov eax, dword [ebp - 0x324]
mov dword [ebp - 0x3ec], ecx
push 3
pop edx
mov dword [ebp - 0x3e4], edx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x3f0], eax
lea esi, [ebp - 0x3f0]
mov dword [ebp - 0x3ec], ecx
lea edi, [ebp - 0xec]
mov dword [ebp - 0x3e4], edx
xor eax, eax
mov word [ebp - 0x3e8], ax
mov eax, dword [ebp - 0x314]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x3f0], eax
lea esi, [ebp - 0x3f0]
xor eax, eax
mov dword [ebp - 0x3ec], ecx
mov word [ebp - 0x3e8], ax
lea edi, [ebp - 0xdc]
mov dword [ebp - 0x3e4], edx
lea eax, [ebp - 0x3d8]
movsd dword es:[edi], dword [esi]
push eax
lea eax, [ebp - 0x10c]
push eax
movsd dword es:[edi], dword [esi]
push ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0051e8f3
add esp, 0x18
test al, al
je 0x51f40a
mov esi, dword [ebp - 0x3f8]
mov edi, dword [ebp + 0x18]
add esi, 8
test edi, edi
je 0x51f3bc
dec edi
jmp 0x51f3eb
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, esi
jne 0x51f350
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov ebx, eax
mov dword [ebp - 0x3d8], 0x10001
lea eax, [ebp - 0x3d8]
push eax
call dword [sym.imp.KERNEL32.dll_RtlCaptureContext]
jmp 0x51f23d
push esi
push ebx
push 0x4a
mov dword [ebp - 0x3d8], 0x10001
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x51f38c
xor eax, eax
inc eax
push ebx
mov dword [ebp - 0x3f4], eax
mov byte [ebp - 0x3d9], al
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x51f39d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006fedff
leave
ret
lea eax, [ebp - 0x3d8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x51f23d
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x51f385
mov eax, dword [ebp - 0x10c]
mov dword [esi - 8], eax
mov eax, dword [ebp - 0xec]
mov dword [esi - 4], eax
mov eax, dword [ebp - 0xdc]
mov dword [esi], eax
add esi, 0x24
mov eax, dword [ebp - 0x3e0]
inc eax
mov dword [ebp - 0x3e0], eax
cmp eax, dword [ebp + 0x14]
je 0x51f40a
lea eax, [ebp - 0x3d8]
push eax
lea eax, [ebp - 0x10c]
push eax
push ebx
call fcn.0051e8f3
add esp, 0xc
test al, al
jne 0x51f314
cmp byte [ebp - 0x3f4], 0
je 0x51f41a
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp byte [ebp - 0x3d9], 0
je 0x51f42a
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x3e0]
jmp 0x51f38e