Function at 0x10077789
Capabilities:
Resume thread

Disassembly:
sub esp, 0x2d0
push ebx
mov ebx, dword [esp + 0x2d8]
test ebx, ebx
je 0x100777a2
mov eax, dword [0x100d384c]
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x100d3844], eax
je 0x100777ba
mov eax, 0x10dd
jmp 0x100779d6
cmp dword [0x100d3848], 0
je 0x100777cd
call fcn.10077696
jmp 0x100779d1
push ebp
push esi
mov esi, dword [0x100d3854]
push edi
jmp 0x10077869
cmp dword [esi + 4], 0
mov eax, dword [esi + 0x10]
je 0x1007783d
xor edi, edi
cmp byte [eax + 0x17], 0
jbe 0x1007781a
and dword [esp + 0x10], 0
lea ecx, [esp + 0x10]
push ecx
push 0
push eax
mov eax, dword [esi + 0xc]
add eax, edi
push eax
call fcn.10077d6b
cmp dword [esp + 0x10], 0
jne 0x1007781a
mov ecx, dword [esi + 0x10]
mov edi, eax
sub edi, ecx
movzx ecx, byte [ecx + 0x17]
cmp edi, ecx
jl 0x100777ec
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
movzx eax, byte [eax + 0x17]
cmp edi, eax
je 0x10077838
mov dword [0x100d3848], 0xd
mov dword [0x100d384c], ecx
mov eax, dword [esi + 0xc]
jmp 0x10077865
mov edx, dword [esi + 0xc]
mov byte [edx], 0xe9
lea ecx, [edx + 5]
mov eax, dword [eax + 0x1c]
sub eax, ecx
mov dword [edx + 1], eax
mov eax, dword [esi + 0x10]
push dword [eax + 0x18]
lea eax, [edx + 5]
push eax
call fcn.100772da
mov eax, dword [esi + 0x10]
pop ecx
pop ecx
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x100777db
mov edi, dword [0x100d3850]
test edi, edi
je 0x1007791c
mov ebp, dword [sym.imp.KERNEL32.dll_SetThreadContext]
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x10001
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x10077912
mov esi, dword [0x100d3854]
test esi, esi
je 0x10077912
mov ecx, dword [esp + 0xcc]
cmp dword [esi + 4], 0
je 0x100778d2
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x1007790c
lea eax, [edx + 4]
cmp ecx, eax
jae 0x1007790c
sub ecx, edx
mov dword [esp + 0xcc], ecx
mov eax, dword [esi + 0xc]
jmp 0x100778f2
cmp ecx, dword [esi + 0xc]
jb 0x1007790c
mov eax, dword [esi + 0x10]
movzx eax, byte [eax + 0x17]
add eax, dword [esi + 0xc]
cmp ecx, eax
jae 0x1007790c
sub ecx, dword [esi + 0xc]
mov dword [esp + 0xcc], ecx
mov eax, dword [esi + 0x10]
add eax, ecx
mov dword [esp + 0xcc], eax
lea eax, [esp + 0x14]
push eax
push dword [edi + 4]
call ebp
mov ecx, dword [esp + 0xcc]
mov esi, dword [esi]
test esi, esi
jne 0x100778b0
mov edi, dword [edi]
test edi, edi
jne 0x10077885
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x100d3854]
mov ebp, eax
test edi, edi
je 0x1007798a
lea eax, [esp + 0x10]
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 ebp
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x10077978
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x10077978
mov eax, dword [0x100d383c]
mov dword [ecx + 0x18], eax
and dword [edi + 0x10], 0
mov dword [0x100d383c], ecx
mov esi, dword [edi]
push 0x18
push edi
call fcn.1007c382
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x1007792e
mov edi, dword [0x100d3850]
xor ebp, ebp
mov dword [0x100d3854], ebp
test edi, edi
je 0x100779b7
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push 8
push edi
call fcn.1007c382
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x1007799c
mov dword [0x100d3850], ebp
mov dword [0x100d3844], ebp
pop edi
pop esi
pop ebp
test ebx, ebx
je 0x100779d1
mov eax, dword [0x100d384c]
mov dword [ebx], eax
mov eax, dword [0x100d3848]
pop ebx
add esp, 0x2d0
ret 4