Function at 0x100015d0
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x338
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1001c000], eax
je 0x10001604
mov eax, 0x10dd
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000263d
mov esp, ebp
pop ebp
ret
cmp dword [0x1001c004], 0
je 0x10001625
call fcn.100014d0
mov eax, dword [0x1001c004]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000263d
mov esp, ebp
pop ebp
ret
push ebx
push esi
mov esi, dword [0x1001bff8]
push edi
test esi, esi
je 0x1000173d
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
lea esp, [esp]
cmp dword [esi + 4], 0
je 0x100016f2
mov edx, dword [esi + 0x10]
xor edi, edi
cmp byte [edx + 0x17], 0
jbe 0x100016d0
mov eax, dword [esi + 0xc]
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x54], ecx
add eax, edi
lea ecx, [ebp - 0x334]
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x50], ecx
lea ecx, [ebp - 0x44]
cmovne ecx, eax
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x334], 0
test edx, edx
jne 0x100016a1
push 0xd
call ebx
xor edx, edx
jmp 0x100016b8
movzx eax, byte [edx]
push edx
push ecx
lea ecx, [ebp - 0x60]
lea eax, [eax*8 + 0x10013da8]
push eax
mov eax, dword [eax + 4]
call eax
mov edx, eax
cmp dword [ebp - 0x334], 0
jne 0x100016d0
mov ecx, dword [esi + 0x10]
mov edi, edx
sub edi, ecx
movzx eax, byte [ecx + 0x17]
cmp edi, eax
jl 0x10001655
mov eax, dword [esi + 0x10]
movzx eax, byte [eax + 0x17]
cmp edi, eax
je 0x100016ed
mov eax, dword [esi + 8]
mov dword [0x1001c004], 0xd
mov dword [0x1001bfec], eax
mov eax, dword [esi + 0xc]
jmp 0x1000172e
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 0xc]
mov ecx, dword [eax + 0x1c]
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 + 0x18]
mov edi, eax
sub edi, edx
cmp edx, eax
cmova edi, ecx
test edi, edi
je 0x1000172b
mov edi, edi
inc ecx
mov byte [edx], 0xcc
lea edx, [edx + 1]
cmp ecx, edi
jb 0x10001720
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x10001640
mov edi, dword [0x1001bff0]
test edi, edi
je 0x100017f8
mov ebx, dword [sym.imp.KERNEL32.dll_SetThreadContext]
jmp 0x10001760
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x32c], 0x10001
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x100017ee
mov esi, dword [0x1001bff8]
test esi, esi
je 0x100017ee
mov ecx, dword [ebp - 0x274]
mov edi, edi
cmp dword [esi + 4], 0
je 0x100017b1
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x100017e8
lea eax, [edx + 4]
cmp ecx, eax
jae 0x100017e8
sub ecx, edx
mov dword [ebp - 0x274], ecx
add ecx, dword [esi + 0xc]
jmp 0x100017d0
mov edx, dword [esi + 0xc]
cmp ecx, edx
jb 0x100017e8
mov eax, dword [esi + 0x10]
movzx eax, byte [eax + 0x17]
add eax, edx
cmp ecx, eax
jae 0x100017e8
sub ecx, edx
mov dword [ebp - 0x274], ecx
add ecx, dword [esi + 0x10]
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x274], ecx
push eax
push dword [edi + 4]
call ebx
mov ecx, dword [ebp - 0x274]
mov esi, dword [esi]
test esi, esi
jne 0x10001790
mov edi, dword [edi]
test edi, edi
jne 0x10001760
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x1001bff8]
mov esi, eax
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x330], esi
test edi, edi
je 0x10001887
lea eax, [ebp - 0x338]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [edi + 0xc]
call ebx
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x17]
push eax
push dword [edi + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x10001870
mov edx, dword [edi + 0x10]
test edx, edx
je 0x10001870
mov ecx, edx
xorps xmm0, xmm0
and ecx, 0xffff0000
movdqu xmmword [edx], xmm0
movdqu xmmword [edx + 0x10], xmm0
mov eax, dword [ecx + 8]
mov dword [edx + 0x18], eax
mov dword [ecx + 8], edx
mov dword [edi + 0x10], 0
mov esi, dword [edi]
push edi
call fcn.1000264c
add esp, 4
mov edi, esi
test esi, esi
mov esi, dword [ebp - 0x330]
jne 0x10001816
mov esi, dword [0x1001bffc]
mov dword [0x1001bff8], 0
test esi, esi
je 0x100018b8
jmp 0x100018a0
lea eax, [ebp - 0x330]
push eax
push 0x20
push 0x10000
push esi
call ebx
mov esi, dword [esi + 4]
test esi, esi
jne 0x100018a0
mov edi, dword [0x1001bff0]
test edi, edi
je 0x100018de
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
push dword [edi + 4]
call ebx
mov esi, dword [edi]
push edi
call fcn.1000264c
add esp, 4
mov edi, esi
test esi, esi
jne 0x100018c8
mov ecx, dword [ebp - 4]
mov eax, dword [0x1001c004]
xor ecx, ebp
pop edi
pop esi
mov dword [0x1001bff0], 0
mov dword [0x1001c000], 0
pop ebx
call fcn.1000263d
mov esp, ebp
pop ebp
ret