Function at 0x49f380
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c9c10
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push esi
push edi
mov eax, dword [0x4fca20]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x68], esi
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 1
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x58], esi
call fcn.0049d420
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x70]
push eax
lea edi, [ebx + 0x3c]
push ecx
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.0049dbf0
test eax, eax
jne 0x49f46b
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.0049b860
mov eax, dword [ebp - 0x70]
cmp eax, esi
je 0x49f40f
push eax
call fcn.0047d656
add esp, 4
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x68], esi
mov dword [ebp - 4], 0xffffffff
cmp eax, esi
je 0x49f452
mov esi, eax
add eax, 4
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x49f452
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x49f452
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov eax, 0xfffffffe
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x70]
push edx
mov ecx, edi
mov dword [ebp - 0x20], 1
call fcn.0049dca0
mov ecx, dword [ebp + 0x14]
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov edx, dword [ebp + 0x18]
mov dword [eax + 4], edx
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x10], esp
cmp eax, esi
je 0x49f4a7
add eax, 4
mov ecx, 1
lock xadd dword [eax], ecx
mov ecx, ebx
call fcn.0049cb20
mov edx, dword [ebp - 0x60]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [ebx + 0x70]
mov ecx, dword [ebp - 0x60]
push eax
push ecx
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x49f4d9
mov dword [ebp - 0x10], 0xfffffff8
jmp 0x49f4f0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebx]
mov edx, dword [edx + 0x1c]
push 1
push eax
mov eax, dword [ebp + 0xc]
push ecx
push eax
mov ecx, ebx
call edx
mov eax, dword [ebp + 8]
lea ecx, [edi + 0x14]
push ecx
lea ecx, [ebp - 0x18]
mov dword [ebp + 8], eax
call fcn.0040e6c0
lea edx, [ebp + 8]
push edx
lea eax, [ebp + 0x10]
lea ebx, [edi + 4]
push eax
mov ecx, ebx
mov byte [ebp - 4], 4
call fcn.0049ce20
mov edi, dword [edi + 8]
mov eax, dword [ebp + 0x10]
cmp eax, edi
je 0x49f52e
push eax
lea ecx, [ebp + 8]
push ecx
mov ecx, ebx
call fcn.0049bc70
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0040e6f0
mov edx, dword [ebp - 0x60]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 5
call fcn.0049b860
mov eax, dword [ebp - 0x70]
cmp eax, esi
je 0x49f560
push eax
call fcn.0047d656
add esp, 4
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x68], esi
mov dword [ebp - 4], 0xffffffff
cmp eax, esi
je 0x49f5a3
mov esi, eax
add eax, 4
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x49f5a3
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x49f5a3
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14