Function at 0x41ad54
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x6015a8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
xor ebx, ebx
push 0x5b9b5c
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x41ad9e
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetThreadGroupAffinity
push eax
call edi
push str.SetThreadGroupAffinity
push dword [ebp - 0x24]
mov dword [ebp - 0x34], eax
call edi
mov dword [ebp - 0x2c], eax
push dword [0x6138d4]
mov edi, dword [sym.imp.KERNEL32.dll_ResetEvent]
call edi
push dword [esi + 0x10]
call edi
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x41adc2
push eax
call fcn.00551dba
pop ecx
mov dword [esi + 8], ebx
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x41add3
push eax
call fcn.00551dba
pop ecx
mov dword [esi + 0xc], ebx
mov edi, dword [ebp + 8]
xor ecx, ecx
push 4
pop edx
mov eax, edi
mul edx
seto cl
mov dword [esi + 4], edi
neg ecx
or ecx, eax
push ecx
call fcn.00551daf
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
xor ecx, ecx
mov edi, 0x80
mov edx, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00551daf
pop ecx
pop ecx
xor ecx, ecx
cmp dword [esi + 4], ebx
mov dword [esi + 0xc], eax
jle 0x41ae44
xor eax, eax
mov edx, dword [esi + 0xc]
mov dword [eax + edx + 0x24], ebx
mov edx, dword [esi + 0xc]
mov dword [eax + edx + 0x28], ebx
mov edx, dword [esi + 0xc]
mov dword [eax + edx], ebx
mov edx, dword [esi + 0xc]
mov dword [eax + edx + 4], ecx
mov edx, dword [esi + 8]
mov dword [edx + ecx*4], ebx
inc ecx
add eax, edi
cmp ecx, dword [esi + 4]
jl 0x41ae1b
call fcn.00461b70
cmp dword [eax + 0x44], ebx
je 0x41aed5
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x28], ebx
call fcn.00461b70
mov eax, dword [eax + 0x44]
cmp dword [eax + 0x10], ebx
jle 0x41aed5
mov dword [ebp - 0x38], ebx
call fcn.00461b70
mov eax, dword [eax + 0x44]
mov eax, dword [eax + 0x14]
mov ecx, dword [ebp - 0x38]
mov eax, dword [eax + ecx + 4]
cmp eax, ebx
mov dword [ebp - 0x3c], eax
jle 0x41aebe
mov ecx, dword [ebp - 0x20]
shl ecx, 7
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp + 8]
jge 0x41aeb0
mov eax, dword [esi + 0xc]
mov edx, dword [ebp - 0x28]
mov dword [ecx + eax], edx
mov eax, dword [ebp - 0x30]
cdq
idiv dword [ebp - 0x3c]
add eax, edx
mov edx, dword [esi + 0xc]
mov dword [ecx + edx + 4], eax
xor ebx, ebx
inc dword [ebp - 0x20]
add dword [ebp - 0x30], 2
add ecx, edi
dec dword [ebp - 0x24]
jne 0x41ae8d
inc dword [ebp - 0x28]
add dword [ebp - 0x38], 0xc
call fcn.00461b70
mov eax, dword [eax + 0x44]
mov ecx, dword [ebp - 0x28]
cmp ecx, dword [eax + 0x10]
jl 0x41ae68
cmp dword [esi + 4], ebx
mov dword [ebp - 0x20], ebx
jle 0x41af9f
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x40]
push eax
mov eax, dword [esi + 0xc]
push 4
add eax, ebx
push eax
push 0x41afaf
push 0
push 0
shl edi, 2
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esi + 8]
mov dword [edi + ecx], eax
mov eax, dword [esi + 8]
add eax, edi
xor ecx, ecx
cmp dword [eax], ecx
je 0x41af81
cmp dword [ebp - 0x34], ecx
je 0x41af5e
cmp dword [ebp - 0x2c], ecx
je 0x41af5e
lea ecx, [ebp - 0x10]
push ecx
push dword [eax]
call dword [ebp - 0x34]
test eax, eax
je 0x41af73
mov eax, dword [esi + 0xc]
add eax, ebx
mov cx, word [eax]
mov word [ebp - 0xc], cx
mov ecx, dword [eax + 4]
xor edx, edx
inc edx
lea eax, [ebp - 0x1c]
push eax
shl edx, cl
lea eax, [ebp - 0x10]
push eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x10], edx
push dword [edi + eax]
call dword [ebp - 0x2c]
test eax, eax
jne 0x41af73
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41af73
mov ecx, dword [esi + 0xc]
mov ecx, dword [ebx + ecx + 4]
xor edx, edx
inc edx
shl edx, cl
push edx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
mov eax, dword [esi + 8]
push 0
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [esi + 8]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
inc dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
sub ebx, 0xffffff80
cmp eax, dword [esi + 4]
jl 0x41aee1
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.00562d51
leave
ret 4