Function at 0x402fe0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov ebx, ecx
push edi
push 4
mov dword [ebp - 8], 0
push dword [ebx + 0x18]
call esi
mov edi, eax
add esp, 8
mov dword [ebp - 4], edi
test edi, edi
jne 0x403015
lea eax, [edi - 0x16]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x14
push dword [ebx + 0x18]
call esi
add esp, 8
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x40303c
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, 0xffffffea
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 8], 0
mov dword [ebp - 0x14], 0
jbe 0x4031a4
nop dword [eax]
mov eax, dword [ebx + 0x18]
xor edx, edx
mov dword [ebp - 0xc], edx
xor esi, esi
mov ecx, eax
test eax, eax
je 0x40310c
mov edx, edi
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x18]
nop dword [eax]
mov ecx, dword [ebx + 0x1c]
cmp esi, ecx
jb 0x4030a9
mov eax, esi
sub eax, ecx
mov ecx, dword [ebp - 4]
push 0xffffffffffffffff
mov eax, dword [ecx + eax*4]
push eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x403190
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x403190
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x28], esi
mov byte [ebp - 0x24], al
mov dword [ebp - 0x20], 0
mov dword [edi], ebx
movups xmm0, xmmword [ebp - 0x2c]
movups xmmword [edi + 4], xmm0
test edx, edx
je 0x40316b
push 0
push 0
push edi
push 0x402fb0
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov edx, dword [ebp - 0x10]
add esp, 0x18
mov dword [edx], eax
test eax, eax
je 0x40316b
mov ecx, dword [ebx + 0x18]
inc esi
add edx, 4
add edi, 0x14
mov dword [ebp - 0x10], edx
cmp esi, ecx
jb 0x403070
mov edi, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov esi, ecx
mov eax, ecx
sub esi, dword [ebx + 0x1c]
cmp esi, ecx
jae 0x403140
mov edi, dword [edi + esi*4]
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x403190
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x403190
mov eax, dword [ebx + 0x18]
inc esi
mov edi, dword [ebp - 4]
cmp esi, eax
jb 0x403117
mov edx, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
inc edx
mov dword [ebp - 0xc], edx
cmp edx, 4
jb 0x403058
mov ecx, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x14], ecx
cmp ecx, dword [ebx + 8]
jb 0x403050
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push edi
call esi
jmp 0x4031b4
xor edi, edi
test esi, esi
je 0x403190
mov eax, dword [ebp - 4]
push 0xffffffffffffffff
mov ebx, dword [eax + edi*4]
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40318b
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, esi
jb 0x403171
push dword [ebp - 4]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [ebp - 8], 0xffffffdf
call esi
jmp 0x4031b4
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push edi
call esi
mov dword [ebp - 8], 0
add esp, 4
push dword [ebp - 0x18]
call esi
mov eax, dword [ebp - 8]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret