Function at 0x4053a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
test ebx, ebx
je 0x405581
cmp dword [ebx + 8], 0
je 0x4053c5
cmp dword [ebx + 4], 0
je 0x405581
lea eax, [esi + 4]
push edi
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi + 0x20]
mov edx, dword [ebx]
and ecx, edx
mov eax, dword [esi + 0x28]
mov edi, dword [eax + ecx*4]
test edi, edi
je 0x4053f0
cmp dword [edi + 8], edx
je 0x405407
mov edi, dword [edi + 4]
test edi, edi
jne 0x4053e4
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [edi + 0x3c], 0
je 0x4053f0
mov dword [ebp + 8], 0
cmp dword [edi + 0xc], 1
jne 0x405435
mov esi, dword [edi + 0x2c]
test esi, esi
je 0x40545a
cmp dword [esi + 0x24], 0
je 0x405430
mov esi, dword [esi + 0x2c]
test esi, esi
jne 0x405421
jmp 0x40545a
mov dword [ebp + 8], esi
jmp 0x405452
mov eax, dword [edi + 0x18]
test eax, eax
je 0x405441
cmp dword [edi + 0x28], eax
jae 0x40545a
lea eax, [ebp + 8]
push eax
mov eax, dword [edi + 0x34]
push edi
push esi
call eax
mov esi, dword [ebp + 8]
add esp, 0xc
test esi, esi
jne 0x405506
test byte [ebx + 0xc], 1
je 0x4053f0
xor esi, esi
cmp dword [edi + 0x1c], 0x100
jae 0x4054ed
push 0x20
call fcn.004d9a7e
movups xmm0, xmmword [ebx]
mov esi, eax
add esp, 4
movups xmmword [esi + 8], xmm0
movq xmm0, qword [ebx + 0x10]
movq qword [esi + 0x18], xmm0
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x405498
mov dword [esi + 0xc], eax
jmp 0x4054b0
push eax
call fcn.004d9a7e
push dword [esi + 0x10]
mov dword [esi + 0xc], eax
push dword [ebx + 4]
push eax
call fcn.004d6950
add esp, 0x10
mov eax, dword [edi + 0x20]
xor ecx, ecx
test eax, eax
je 0x4054d7
mov edx, dword [esi + 0x18]
nop dword [eax]
cmp dword [eax + 0x18], edx
jbe 0x4054ce
mov ecx, eax
mov eax, dword [eax + 4]
test eax, eax
jne 0x4054c0
test ecx, ecx
je 0x4054d7
mov dword [ecx + 4], esi
jmp 0x4054da
mov dword [edi + 0x20], esi
test eax, eax
jne 0x4054e3
mov dword [edi + 0x24], esi
jmp 0x4054e5
mov dword [eax], esi
mov dword [esi], ecx
mov dword [esi + 4], eax
inc dword [edi + 0x1c]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
test esi, esi
pop edi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret 4
movups xmm0, xmmword [ebx]
movups xmmword [esi + 0xc], xmm0
movq xmm0, qword [ebx + 0x10]
movq qword [esi + 0x1c], xmm0
mov eax, dword [esi + 0x14]
test eax, eax
je 0x405536
push eax
call fcn.004d9a7e
push dword [esi + 0x14]
mov dword [esi + 0x10], eax
push dword [ebx + 4]
push eax
call fcn.004d6950
add esp, 0x10
mov eax, dword [ebp + 8]
mov dword [eax + 0x24], 1
lea eax, [ebp - 8]
push eax
push 0
push dword [ebp + 8]
push 0x404de0
push 0
push 0
call fcn.004d9be5
add esp, 0x18
mov esi, eax
push dword [edi + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4