Function at 0x1003c760
Capabilities:
Resume thread

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x2d0
test eax, eax
je 0x1003c776
mov ecx, dword [0x10057ee0]
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x10057ed8], eax
je 0x1003c792
mov eax, 0x10dd
add esp, 0x2d0
ret 4
mov eax, dword [0x10057edc]
test eax, eax
je 0x1003c7ae
call fcn.1003c630
mov eax, dword [0x10057edc]
add esp, 0x2d0
ret 4
push ebx
push ebp
push esi
mov esi, dword [0x10057ee8]
test esi, esi
push edi
je 0x1003c876
mov ebp, 0xd
mov eax, dword [esi + 4]
test eax, eax
je 0x1003c82e
mov eax, dword [esi + 0x10]
xor edi, edi
mov cl, byte [eax + 0x17]
test cl, cl
jbe 0x1003c80b
lea edx, [esp + 0x10]
mov dword [esp + 0x10], 0
push edx
push 0
push eax
mov eax, dword [esi + 0xc]
add eax, edi
push eax
call fcn.1003d1e0
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x1003c80b
mov ecx, dword [esi + 0x10]
mov edi, eax
xor edx, edx
sub edi, ecx
mov dl, byte [ecx + 0x17]
cmp edi, edx
jl 0x1003c7d8
mov eax, dword [esi + 0x10]
xor ecx, ecx
mov cl, byte [eax + 0x17]
cmp edi, ecx
je 0x1003c826
mov dword [0x10057edc], ebp
mov edx, dword [esi + 8]
mov dword [0x10057ee0], edx
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
jmp 0x1003c86a
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0xc]
mov ecx, dword [edx + 0x1c]
lea edx, [eax + 5]
mov byte [eax], 0xe9
inc eax
sub ecx, edx
mov dword [eax], ecx
mov ecx, dword [esi + 0x10]
lea edi, [eax + 4]
mov ecx, dword [ecx + 0x18]
cmp edi, ecx
jae 0x1003c864
sub ecx, edi
mov eax, 0xcccccccc
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x10]
mov dword [eax], ecx
mov esi, dword [esi]
test esi, esi
jne 0x1003c7c5
mov edi, dword [0x10057ee4]
test edi, edi
je 0x1003c925
mov ebp, dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov eax, dword [edi + 4]
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], 0x10001
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x1003c91b
mov esi, dword [0x10057ee8]
test esi, esi
je 0x1003c91b
mov eax, dword [esp + 0xcc]
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x1003c8d9
mov ecx, dword [esi + 0x10]
cmp eax, ecx
jb 0x1003c915
lea edx, [ecx + 4]
cmp eax, edx
jae 0x1003c915
sub eax, ecx
mov dword [esp + 0xcc], eax
mov edx, dword [esi + 0xc]
jmp 0x1003c8fa
mov ecx, dword [esi + 0xc]
cmp eax, ecx
jb 0x1003c915
mov edx, dword [esi + 0x10]
xor ebx, ebx
mov bl, byte [edx + 0x17]
add ebx, ecx
cmp eax, ebx
jae 0x1003c915
sub eax, ecx
mov dword [esp + 0xcc], eax
mov edx, dword [esi + 0x10]
mov ecx, dword [edi + 4]
add eax, edx
mov dword [esp + 0xcc], eax
lea eax, [esp + 0x14]
push eax
push ecx
call ebp
mov eax, dword [esp + 0xcc]
mov esi, dword [esi]
test esi, esi
jne 0x1003c8b6
mov edi, dword [edi]
test edi, edi
jne 0x1003c88a
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x10057ee8]
mov ebp, eax
test esi, esi
je 0x1003c998
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edx, [esp + 0x10]
push edx
xor edx, edx
mov dl, byte [ecx + 0x17]
push eax
mov eax, dword [esi + 0xc]
push edx
push eax
call ebx
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0xc]
xor edx, edx
mov dl, byte [ecx + 0x17]
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov eax, dword [esi + 4]
test eax, eax
je 0x1003c987
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1003c987
push eax
call fcn.1003c720
add esp, 4
mov dword [esi + 0x10], 0
mov edi, dword [esi]
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov esi, edi
test edi, edi
jne 0x1003c93d
xor ebx, ebx
mov dword [0x10057ee8], ebx
call fcn.1003c6f0
mov esi, dword [0x10057ee4]
cmp esi, ebx
je 0x1003c9cc
mov ebp, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [esi + 4]
push ecx
call ebp
mov edi, dword [esi]
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
cmp edi, ebx
mov esi, edi
jne 0x1003c9b5
mov eax, dword [esp + 0x2e4]
pop edi
pop esi
mov dword [0x10057ee4], ebx
mov dword [0x10057ed8], ebx
pop ebp
cmp eax, ebx
pop ebx
je 0x1003c9ef
mov edx, dword [0x10057ee0]
mov dword [eax], edx
mov eax, dword [0x10057edc]
add esp, 0x2d0
ret 4