Function at 0x1003a5f0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x1029912c]
xor eax, esp
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
push 0
push 0
push 1
push 0
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov esi, eax
mov dword [edi + 4], esi
test esi, esi
jne 0x1003a6bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
mov ecx, edi
push 1
mov dword [esp + 0x14], eax
call dword [edx]
mov ecx, dword fs:[0x2c]
mov eax, dword [0x102a7d90]
mov edx, dword [ecx + eax*4]
mov ecx, dword [0x102a8ac0]
cmp ecx, dword [edx + 4]
jle 0x1003a6a5
push 0x102a8ac0
call fcn.101d529a
add esp, 4
cmp dword [0x102a8ac0], 0xffffffff
jne 0x1003a6a5
push 0x10232180
mov dword [0x102a8ac8], 0x102a8ac4
mov dword [0x102a8ac4], 0x1026b454
call fcn.101d56bf
add esp, 4
push 0x102a8ac0
call fcn.101d5250
add esp, 4
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0x102a8ac4
test eax, eax
jne 0x1003a859
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebx + 8], eax
mov dword [edi + 8], eax
cmp dword [ebx + 8], 0
jne 0x1003a766
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
mov ecx, edi
push 1
mov dword [esp + 0x14], eax
call dword [edx]
mov ecx, dword fs:[0x2c]
mov eax, dword [0x102a7d90]
mov edx, dword [ecx + eax*4]
mov ecx, dword [0x102a8ac0]
cmp ecx, dword [edx + 4]
jle 0x1003a74e
push 0x102a8ac0
call fcn.101d529a
add esp, 4
cmp dword [0x102a8ac0], 0xffffffff
jne 0x1003a74e
push 0x10232180
mov dword [0x102a8ac8], 0x102a8ac4
mov dword [0x102a8ac4], 0x1026b454
call fcn.101d56bf
add esp, 4
push 0x102a8ac0
call fcn.101d5250
add esp, 4
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0x102a8ac4
test eax, eax
jne 0x1003a867
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0
push eax
push 0
push edi
push 0x1003a540
push dword [esp + 0x1c]
push 0
call fcn.101f9259
add esp, 0x18
mov dword [ebx + 4], eax
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1003a835
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
mov ecx, edi
push 1
mov dword [esp + 0x10], eax
call dword [edx]
test esi, esi
je 0x1003a7b3
push esi
call ebx
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 8]
test eax, eax
je 0x1003a7c1
push eax
call ebx
mov eax, dword [0x102a7d90]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
mov eax, dword [0x102a8ac0]
cmp eax, dword [ecx + 4]
jle 0x1003a821
push 0x102a8ac0
call fcn.101d529a
add esp, 4
cmp dword [0x102a8ac0], 0xffffffff
jne 0x1003a821
push 0x10232180
mov dword [0x102a8ac8], 0x102a8ac4
mov dword [0x102a8ac4], 0x1026b454
call fcn.101d56bf
add esp, 4
push 0x102a8ac0
call fcn.101d5250
add esp, 4
mov eax, dword [esp + 0xc]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], 0x102a8ac4
test eax, eax
jne 0x1003a875
test esi, esi
je 0x1003a845
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call ebx
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.101d506b
mov esp, ebp
pop ebp
ret 8
mov edx, str.thread.entry_event
lea ecx, [esp + 0x10]
call fcn.1003c190
mov edx, str.thread.exit_event
lea ecx, [esp + 0x10]
call fcn.1003c190
mov edx, str.thread
lea ecx, [esp + 0x18]
call fcn.1003c190
int3