Function at 0x10006790
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e0
mov eax, dword [0x100afcf0]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x2dc], ecx
test ecx, ecx
je 0x100067b7
mov eax, dword [0x100b1f00]
mov dword [ecx], eax
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x100b1ef8], eax
je 0x100067d9
mov eax, 0x10dd
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10060c02
mov esp, ebp
pop ebp
ret 4
cmp dword [0x100b1efc], 0
je 0x100067ec
call fcn.10006660
jmp 0x10006aa2
push ebx
push esi
mov esi, dword [0x100b1f08]
mov dword [ebp - 0x2d4], 0
push edi
test esi, esi
je 0x1000686c
cmp dword [esi + 4], 0
je 0x10006825
mov ecx, dword [esi + 0x10]
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [esi + 0xc]
call fcn.10060eb0
mov eax, dword [esi + 0xc]
add esp, 0xc
jmp 0x10006861
mov eax, dword [esi + 0x10]
xor ebx, ebx
mov edx, dword [esi + 0xc]
mov ecx, dword [eax + 0x44]
lea eax, [edx + 5]
mov byte [edx], 0xe9
sub ecx, eax
mov dword [edx + 1], ecx
add edx, 5
mov eax, dword [esi + 0x10]
xor ecx, ecx
mov eax, dword [eax + 0x40]
mov edi, eax
sub edi, edx
cmp edx, eax
cmova edi, ebx
test edi, edi
je 0x1000685e
inc ecx
mov byte [edx], 0xcc
lea edx, [edx + 1]
cmp ecx, edi
jb 0x10006853
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x10006803
mov ebx, dword [0x100b1f04]
test ebx, ebx
je 0x10006965
lea ebx, [ebx]
lea eax, [ebp - 0x2d0]
mov dword [ebp - 0x2d0], 0x10001
push eax
push dword [ebx + 4]
call sub.KERNEL32.dll_GetThreadContext
test eax, eax
je 0x1000695b
mov esi, dword [0x100b1f08]
test esi, esi
je 0x1000695b
mov edx, dword [ebp - 0x218]
cmp dword [esi + 4], 0
je 0x100068ff
mov edi, dword [esi + 0x10]
cmp edx, edi
jb 0x10006951
lea eax, [edi + 4]
cmp edx, eax
jae 0x10006951
xor eax, eax
sub dl, byte [esi + 0x10]
mov cl, byte [edi + eax + 0x38]
shr cl, 3
cmp cl, dl
je 0x100068f1
inc eax
cmp eax, 8
jb 0x100068d6
xor al, al
movzx eax, al
add eax, dword [esi + 0xc]
jmp 0x10006936
mov al, byte [eax + edi + 0x38]
and al, 7
movzx eax, al
add eax, dword [esi + 0xc]
jmp 0x10006936
mov ecx, dword [esi + 0xc]
cmp edx, ecx
jb 0x10006951
mov edi, dword [esi + 0x10]
movzx eax, byte [edi + 0x36]
add eax, ecx
cmp edx, eax
jae 0x10006951
xor ecx, ecx
sub dl, byte [esi + 0xc]
mov al, byte [edi + ecx + 0x38]
and al, 7
cmp al, dl
je 0x1000692c
inc ecx
cmp ecx, 8
jb 0x10006918
xor eax, eax
jmp 0x10006934
movzx eax, byte [ecx + edi + 0x38]
shr eax, 3
add eax, edi
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x2d0]
push eax
push dword [ebx + 4]
call sub.KERNEL32.dll_SetThreadContext
mov edx, dword [ebp - 0x218]
mov esi, dword [esi]
test esi, esi
jne 0x100068b5
mov ebx, dword [ebx]
test ebx, ebx
jne 0x10006880
call sub.KERNEL32.dll_GetCurrentProcess
mov edi, dword [0x100b1f08]
mov ebx, eax
mov dword [ebp - 0x2d8], ebx
test edi, edi
je 0x100069fe
lea eax, [ebp - 0x2e0]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call sub.KERNEL32.dll_VirtualProtect
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
push ebx
call sub.KERNEL32.dll_FlushInstructionCache
cmp dword [edi + 4], 0
je 0x100069ed
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x100069e7
push 0x48
push 0
mov esi, ebx
push ebx
and esi, 0xffff0000
call fcn.10060c20
mov eax, dword [esi + 8]
add esp, 0xc
mov dword [ebx + 0x40], eax
mov dword [esi + 8], ebx
mov dword [edi + 0x10], 0
mov dword [ebp - 0x2d4], 1
mov ebx, dword [ebp - 0x2d8]
mov esi, dword [edi]
push edi
call fcn.10060d01
add esp, 4
mov edi, esi
test esi, esi
jne 0x10006980
cmp dword [ebp - 0x2d4], 0
mov dword [0x100b1f08], 0
je 0x10006a1f
cmp dword [0x100b1ef4], 0
jne 0x10006a1f
call fcn.10005c50
call sub.KERNEL32.dll_GetCurrentProcess
mov esi, dword [0x100b1ee8]
mov edi, eax
test esi, esi
je 0x10006a57
lea eax, [ebp - 0x2e0]
push eax
push 0x20
push 0x10000
push esi
call sub.KERNEL32.dll_VirtualProtect
push 0x10000
push esi
push edi
call sub.KERNEL32.dll_FlushInstructionCache
mov esi, dword [esi + 4]
test esi, esi
jne 0x10006a30
mov edi, dword [0x100b1f04]
test edi, edi
je 0x10006a7a
push dword [edi + 4]
call sub.KERNEL32.dll_ResumeThread
mov esi, dword [edi]
push edi
call fcn.10060d01
add esp, 4
mov edi, esi
test esi, esi
jne 0x10006a61
mov ecx, dword [ebp - 0x2dc]
mov dword [0x100b1f04], 0
mov dword [0x100b1ef8], 0
pop edi
pop esi
pop ebx
test ecx, ecx
je 0x10006aa2
mov eax, dword [0x100b1f00]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
mov eax, dword [0x100b1efc]
xor ecx, ebp
call fcn.10060c02
mov esp, ebp
pop ebp
ret 4