Function at 0x41fb30
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x5a55fa
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, edx
push 0x5da110
call fcn.0049d036
add esp, 4
test byte [0x660fc0], 1
jne 0x41fba5
mov eax, dword [0x627340]
or dword [0x660fc0], 1
mov ecx, eax
dec eax
mov dword [0x627340], eax
test ecx, ecx
jle 0x41fba5
push 0
push 0
push 0
push 0x47ff50
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0042d470
lea esi, [ebx + 0x4a80]
mov dword [eax + 0x58], esi
call fcn.0042d400
mov dword [eax + 0x4c], esi
call fcn.00493460
mov dword [eax + 0x30], esi
mov eax, dword [0x660898]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], 1
test eax, eax
jne 0x41fbff
call fcn.00410d40
test eax, eax
je 0x41fbf6
push str.CheckCurrentThreadId
push eax
call esi
mov dword [0x660898], eax
jmp 0x41fbfb
mov eax, dword [0x660898]
test eax, eax
je 0x41fc03
push 0
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0x24]
mov ecx, edi
call eax
mov dword [esp + 0x28], 0
call fcn.00422ca0
or ebp, 0xffffffff
mov dword [esp + 0x28], ebp
mov eax, dword [0x660898]
test eax, eax
jne 0x41fc4a
call fcn.00410d40
test eax, eax
je 0x41fc41
push str.CheckCurrentThreadId
push eax
call esi
mov dword [0x660898], eax
jmp 0x41fc46
mov eax, dword [0x660898]
test eax, eax
je 0x41fc4e
push 1
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0x28]
mov ecx, edi
call eax
lea esi, [ebx + 0x8b0]
push edi
push esi
call fcn.0042d2c0
mov ecx, eax
call fcn.0047d540
push edi
push 6
call fcn.00422ae0
test eax, eax
jne 0x41fd0d
push edi
lea ecx, [ebx + 0x8f0]
push ecx
mov edx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.004066b0
push ecx
mov dword [esp + 0x34], 1
mov eax, esp
mov dword [esp + 0x24], esp
push eax
mov ecx, esi
call fcn.004066b0
mov dword [esp + 0x34], ebp
call fcn.0041c8f0
xor esi, esi
cmp eax, esi
jne 0x41fd0d
push edi
lea edx, [esp + 0x34]
mov ecx, ebx
mov dword [esp + 0x34], esi
call fcn.0041d1b0
test eax, eax
jne 0x41fcd2
cmp dword [esp + 0x30], esi
je 0x41fcd2
lea esi, [eax + 1]
call fcn.0042d250
call fcn.004bdf80
test esi, esi
jne 0x41fce4
test eax, eax
jne 0x41fd17
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x41fcf9
xor edx, edx
test eax, eax
sete dl
lea edx, [edx + edx + 1]
mov dword [ecx], edx
push 0x5da174
call fcn.0049d036
add esp, 4
xor eax, eax
jmp 0x41fdc8
mov eax, dword [esp + 0x30]
mov dword [eax], 1
mov ecx, dword [esp + 0x38]
push ecx
push edi
lea edx, [esp + 0x40]
push edx
push ebx
call fcn.00424bd0
mov edx, dword [esp + 0x34]
mov dword [esp + 0x28], 2
mov ecx, dword [eax]
mov esi, dword [edx]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x41fd85
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x41fd78
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x41fd78
call fcn.004073f0
mov ebx, eax
mov eax, ebp
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x41fd6d
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x34]
add ebx, 0x10
mov dword [ecx], ebx
jmp 0x41fd85
mov ebx, dword [ecx - 0xc]
mov eax, dword [esp + 0x34]
push ecx
call fcn.004072f0
mov dword [esp + 0x28], ebp
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
lock xadd dword [edx], ebp
dec ebp
test ebp, ebp
jg 0x41fda6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx]
cmp dword [edx - 0xc], 0
jne 0x41fdc3
push 0x5da1b0
call fcn.0049d036
add esp, 4
xor eax, eax
jmp 0x41fdc8
mov eax, 1
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc