Function at 0x10015830
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2dc
mov eax, dword [0x100c7034]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x100cffdc], eax
je 0x10015864
mov eax, 0x10dd
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100b010b
mov esp, ebp
pop ebp
ret
cmp dword [0x100cffe0], 0
je 0x10015885
call fcn.10015750
mov eax, dword [0x100cffe0]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100b010b
mov esp, ebp
pop ebp
ret
push ebx
push esi
mov esi, dword [0x100cffd4]
mov dword [ebp - 0x2d4], 0
push edi
test esi, esi
je 0x10015909
lea esp, [esp]
cmp dword [esi + 4], 0
je 0x100158c2
mov ecx, dword [esi + 0x10]
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [esi + 0xc]
call sub.MSVCR120.dll_memcpy
mov eax, dword [esi + 0xc]
add esp, 0xc
jmp 0x100158fe
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 0x100158fb
inc ecx
mov byte [edx], 0xcc
lea edx, [edx + 1]
cmp ecx, edi
jb 0x100158f0
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x100158a0
mov ebx, dword [0x100cffc8]
test ebx, ebx
je 0x10015a0e
jmp 0x10015920
lea eax, [ebp - 0x2d0]
mov dword [ebp - 0x2d0], 0x10001
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x10015a04
mov esi, dword [0x100cffd4]
test esi, esi
je 0x10015a04
mov edx, dword [ebp - 0x218]
cmp dword [esi + 4], 0
je 0x100159a0
mov edi, dword [esi + 0x10]
cmp edx, edi
jb 0x100159fa
lea eax, [edi + 4]
cmp edx, eax
jae 0x100159fa
xor eax, eax
sub dl, byte [esi + 0x10]
mov cl, byte [edi + eax + 0x38]
shr cl, 3
cmp cl, dl
je 0x10015992
inc eax
cmp eax, 8
jb 0x10015977
xor al, al
movzx eax, al
add eax, dword [esi + 0xc]
jmp 0x100159de
mov al, byte [eax + edi + 0x38]
and al, 7
movzx eax, al
add eax, dword [esi + 0xc]
jmp 0x100159de
mov ecx, dword [esi + 0xc]
cmp edx, ecx
jb 0x100159fa
mov edi, dword [esi + 0x10]
movzx eax, byte [edi + 0x36]
add eax, ecx
cmp edx, eax
jae 0x100159fa
xor ecx, ecx
sub dl, byte [esi + 0xc]
lea esp, [esp]
mov al, byte [edi + ecx + 0x38]
and al, 7
cmp al, dl
je 0x100159d4
inc ecx
cmp ecx, 8
jb 0x100159c0
xor eax, eax
jmp 0x100159dc
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 dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov edx, dword [ebp - 0x218]
mov esi, dword [esi]
test esi, esi
jne 0x10015956
mov ebx, dword [ebx]
test ebx, ebx
jne 0x10015920
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x100cffd4]
mov esi, eax
mov ebx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
mov dword [ebp - 0x2d8], esi
test edi, edi
je 0x10015ab7
lea eax, [ebp - 0x2dc]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x10015a9f
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x10015a99
push 0x48
push 0
mov esi, ebx
push ebx
and esi, 0xffff0000
call sub.MSVCR120.dll_memset
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 [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
mov esi, dword [edi]
push edi
call ebx
add esp, 4
mov edi, esi
test esi, esi
mov esi, dword [ebp - 0x2d8]
jne 0x10015a30
cmp dword [ebp - 0x2d4], 0
mov dword [0x100cffd4], 0
je 0x10015ad8
cmp dword [0x100cffd0], 0
jne 0x10015ad8
call fcn.100156e0
call fcn.100153d0
mov edi, dword [0x100cffc8]
test edi, edi
je 0x10015afe
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push edi
call ebx
add esp, 4
mov edi, esi
test esi, esi
jne 0x10015ae7
mov ecx, dword [ebp - 4]
mov eax, dword [0x100cffe0]
xor ecx, ebp
pop edi
pop esi
mov dword [0x100cffc8], 0
mov dword [0x100cffdc], 0
pop ebx
call fcn.100b010b
mov esp, ebp
pop ebp
ret