Function at 0x4da970
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x83e264]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
push edi
mov edi, dword [ebp + 8]
test esi, esi
je 0x4da9aa
xor ecx, ecx
cmp ecx, dword [esi]
sbb ebx, ebx
and ebx, dword [esi]
cmp dword [esi + 8], 1
jne 0x4da9aa
mov byte [ebp - 0x11], 1
mov dword [edi + 4], 4
jmp 0x4da9ae
mov byte [ebp - 0x11], 0
push 0x28
push 1
push dword [edi]
call fcn.004d8260
mov ecx, dword [edi]
add esp, 0xc
cmp byte [ebp - 0x11], 0
mov dword [ebp - 0x18], eax
mov dword [eax], ecx
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x10], ecx
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0xc], ecx
movups xmm0, xmmword [edi]
movups xmmword [eax + 0x18], xmm0
je 0x4da9e1
call fcn.004db8a0
lea eax, [edi + 0xc]
push eax
push 0
push dword [ebp - 0x18]
push 0x4dad80
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [edi + 8], eax
test eax, eax
jne 0x4daa22
call fcn.004db870
push 0xc
call fcn.004d86d0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051deb6
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x4dac7f
cmp dword [esi + 4], 0
jl 0x4dac7f
call fcn.004db1d0
mov ebx, eax
test ebx, ebx
je 0x4daa68
mov ecx, dword [ebx]
push 2
push ebx
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 4
jl 0x4daa68
push dword [esi + 4]
mov eax, dword [ebx]
push edi
push str.id_p:_cpu_affinity_of_cpu_id__i_was_specified__attempting_to_honor_the_value.
push 2
mov eax, dword [eax]
push 4
push ebx
call eax
add esp, 0x18
mov eax, dword [esi + 4]
xor bl, bl
push 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 0x4dad60
push 0x85750c
mov dword [ebp - 0x20], 0x4dace0
mov dword [ebp - 0x1c], 0
call dword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
cmp dword [0x857510], 0
je 0x4daad8
mov eax, dword [0x857514]
test eax, eax
je 0x4daad8
call eax
movzx esi, ax
xor ebx, ebx
mov byte [ebp - 0x12], bl
test esi, esi
je 0x4daad5
push 0
call dword [0x857510]
mov ecx, dword [ebp - 0x18]
add eax, ebx
cmp eax, ecx
ja 0x4daace
mov ebx, eax
add esi, 1
jne 0x4daab4
jmp 0x4daad5
mov al, cl
sub al, bl
mov byte [ebp - 0x12], al
mov bl, byte [ebp - 0x12]
xor ecx, ecx
movzx edx, bl
bts ecx, edx
mov dword [ebp - 8], 0
xor eax, eax
xorps xmm0, xmm0
cmp edx, 0x20
movq qword [ebp - 0x10], xmm0
cmovae eax, ecx
xor ecx, eax
mov dword [ebp - 0x10], ecx
call fcn.004db1d0
mov esi, eax
test esi, esi
je 0x4dab37
mov ecx, dword [esi]
push 2
push esi
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 5
jl 0x4dab37
movzx eax, word [ebp - 0xc]
mov ecx, dword [esi]
push eax
push 0
push dword [ebp - 0x10]
mov eax, dword [ecx]
push edi
push str.id_p:_computed_mask__llx_on_group__hu.
push 2
push 5
push esi
call eax
add esp, 0x20
push 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x4dad20
push eax
push 0x4dad60
push 0x857508
mov dword [ebp - 0x1c], 0
call dword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
mov eax, dword [0x857518]
test eax, eax
je 0x4dac7f
cmp dword [0x85751c], 0
je 0x4dac7f
push 0
lea ecx, [ebp - 0x10]
push ecx
push dword [edi + 8]
call eax
mov dword [ebp - 0x18], eax
call fcn.004db1d0
mov esi, eax
test esi, esi
je 0x4dabbb
mov ecx, dword [esi]
push 2
push esi
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 5
jl 0x4dabbb
mov eax, dword [ebp - 0x18]
mov ecx, dword [esi]
movsx eax, al
push eax
push edi
mov eax, dword [ecx]
push str.id_p:_SetThreadGroupAffinity___result__hhi.
push 2
push 5
push esi
call eax
add esp, 0x18
cmp dword [ebp - 0x18], 0
je 0x4dac47
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push dword [edi + 8]
mov byte [ebp - 0x16], bl
call dword [0x85751c]
mov ebx, eax
call fcn.004db1d0
mov esi, eax
test esi, esi
je 0x4dac15
mov ecx, dword [esi]
push 2
push esi
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 5
jl 0x4dac15
mov ecx, dword [esi]
movsx eax, bl
push eax
push edi
mov eax, dword [ecx]
push str.id_p:_SetThreadIdealProcessorEx___result__hhi.
push 2
push 5
push esi
call eax
add esp, 0x18
test ebx, ebx
jne 0x4dac7f
call fcn.004db1d0
mov ebx, eax
test ebx, ebx
je 0x4dac7f
mov ecx, dword [ebx]
push 2
push ebx
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 3
jl 0x4dac7f
mov esi, dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.id_p:_SetThreadIdealProcessorEx___failed_with__x.
jmp 0x4dac73
call fcn.004db1d0
mov ebx, eax
test ebx, ebx
je 0x4dac7f
mov ecx, dword [ebx]
push 2
push ebx
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 3
jl 0x4dac7f
mov esi, dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.id_p:_SetThreadGroupAffinity___failed_with__x.
mov eax, dword [esi]
push 2
push 3
push ebx
call eax
add esp, 0x18
cmp byte [ebp - 0x11], 0
je 0x4daca8
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051deb6
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
mov dword [edi + 4], 2
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0051deb6
mov esp, ebp
pop ebp
ret