Function at 0x4d1818
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff04
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x20]
mov eax, dword [ebp - 4]
call fcn.004d32a4
test ebx, ebx
je 0x4d1841
mov byte [ebx], 0
mov dword [ebp - 0x30], edi
cmp dword [ebp - 0x30], 0
jne 0x4d1864
mov eax, dword [0x66b514]
cmp dword [eax], 0
je 0x4d1864
mov eax, dword [ebp - 8]
push eax
mov eax, dword [0x66b514]
mov eax, dword [eax]
call eax
mov dword [ebp - 0x30], eax
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 8]
call fcn.004d1524
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jbe 0x4d1885
mov eax, dword [ebp - 0x24]
call fcn.00403448
mov dword [ebp - 0x28], eax
jmp 0x4d18c2
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_GetExitCodeThread
test eax, eax
je 0x4d18bd
cmp dword [ebp - 0x2c], 0x103
jne 0x4d1afb
push 0
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WaitForSingleObject
test eax, eax
je 0x4d1afb
xor eax, eax
mov dword [ebp - 0x28], eax
jmp 0x4d18c2
xor eax, eax
mov dword [ebp - 0x28], eax
lea edx, [ebp - 0x10]
mov eax, 0xcc
call fcn.00422430
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [eax], 0x10007
xor edx, edx
push ebp
push 0x4d1af4
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_SuspendThread
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x4d1922
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x4d1911
mov dword [ebp - 0x14], esi
jmp 0x4d19e7
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xb8]
mov dword [ebp - 0x14], eax
jmp 0x4d19e7
test ebx, ebx
je 0x4d192f
cmp dword [ebp - 0x2c], 0
seta al
mov byte [ebx], al
xor edx, edx
push ebp
push 0x4d19e0
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_GetThreadContext
test eax, eax
je 0x4d19a5
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xb4]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc4]
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x4d196f
mov dword [ebp - 0x14], esi
jmp 0x4d197b
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xb8]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x20], 0
je 0x4d19c9
cmp dword [ebp - 0x24], 0
jbe 0x4d19c9
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x24]
jae 0x4d1995
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
call fcn.0040d904
jmp 0x4d19c9
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x4d19b8
mov dword [ebp - 0x14], esi
jmp 0x4d19c4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xb8]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x24], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d19e7
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ResumeThread
ret
cmp dword [ebp - 0x28], 0
jne 0x4d1a2e
cmp dword [ebp - 0x14], 0
je 0x4d1ad0
push 0
mov eax, dword [ebp - 0x14]
push eax
push 1
mov eax, dword [ebp - 0x30]
push eax
movzx eax, byte [ebp + 0xc]
push eax
push 1
movzx eax, byte [ebp + 0x1c]
push eax
push 0xffffffffffffffff
push 0
push 0
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xbc]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x14]
jmp 0x4d1ad0
cmp dword [ebp - 0x18], 0
jne 0x4d1a68
push 0
mov eax, dword [ebp - 0x14]
push eax
push 1
mov eax, dword [ebp - 0x30]
push eax
movzx eax, byte [ebp + 0xc]
push eax
push 1
movzx eax, byte [ebp + 0x1c]
push eax
push 0xffffffffffffffff
push 0
push 0
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xbc]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x14]
jmp 0x4d1ad0
mov ebx, dword [ebp - 0x28]
sub ebx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
mov esi, eax
lea edi, [ebp - 0xfc]
mov ecx, 0x33
rep movsd dword es:[edi], dword [esi]
push ebp
lea eax, [ebp - 0xfc]
push eax
mov ecx, ebx
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
call fcn.004d15fc
pop ecx
mov eax, dword [ebp - 0x20]
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
movzx eax, byte [ebp + 0x1c]
push eax
mov eax, dword [ebp - 0x30]
push eax
movzx eax, byte [ebp + 0xc]
push eax
movzx eax, byte [ebp + 0x18]
push eax
movzx eax, byte [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
push ebx
lea eax, [ebp - 0xfc]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
call fcn.004d1480
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d1afb
cmp dword [ebp - 0x28], 0
je 0x4d1aeb
mov eax, dword [ebp - 0x28]
call fcn.004034b4
mov eax, dword [ebp - 0x10]
call fcn.004034b4
ret
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c