Function at 0x46c500
Capabilities:
Create thread

Disassembly:
push ebp
mov ecx, 0x73b89c
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
call fcn.005a0120
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x73b894], eax
je 0x46c661
mov edx, dword [0x73b88c]
mov eax, dword [edx + 8]
mov edi, dword [edx + 4]
and eax, 0x7fffffff
lea ecx, [edi + 1]
mov dword [ebp - 0x1c], eax
mov eax, dword [edx]
cmp eax, 1
jbe 0x46c650
mov eax, dword [ebp - 0x1c]
xor edx, edx
cmp ecx, eax
ja 0x46c655
mov dword [esp + 4], edx
mov dword [esp], eax
mov ecx, 0x73b88c
call fcn.005bb6a0
mov edx, dword [0x73b88c]
sub esp, 8
mov eax, dword [edx + 4]
lea eax, [edx + eax*4]
add eax, dword [edx + 0xc]
mov dword [eax], esi
mov eax, dword [0x73b88c]
mov ecx, dword [0x7398c4]
add dword [eax + 4], 1
mov edx, dword [ecx + 4]
mov edi, dword [ecx + 8]
mov eax, dword [ecx]
lea esi, [edx + 1]
and edi, 0x7fffffff
cmp eax, 1
jbe 0x46c670
xor edx, edx
cmp esi, edi
mov eax, edi
ja 0x46c67a
mov dword [esp + 4], edx
mov dword [esp], eax
mov ecx, 0x7398c4
call fcn.005baec0
mov eax, dword [0x7398c4]
sub esp, 8
mov edx, dword [eax + 4]
lea ecx, [eax + edx*4]
add ecx, dword [eax + 0xc]
add edx, 1
mov dword [ecx], ebx
mov dword [eax + 4], edx
mov edx, dword [0x73b894]
mov eax, dword [0x73b888]
test edx, edx
jne 0x46c690
test eax, eax
je 0x46c6b0
mov dword [esp + 0x14], 0x73b894
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x46f580
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
sub esp, 0x18
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
mov ecx, 0x73b89c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.005a0160
cmp ecx, dword [ebp - 0x1c]
jbe 0x46c6a0
mov edx, 8
mov eax, ecx
jmp 0x46c55a
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x46c63a
cmp esi, edi
mov eax, ecx
jbe 0x46c5d0
mov edx, 8
mov eax, esi
jmp 0x46c5b4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x46c63a
lea eax, [edx + edi*4]
add eax, dword [edx + 0xc]
mov dword [eax], esi
jmp 0x46c57f
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edx, dword [0x73b88c]
mov dword [0x73b888], eax
sub esp, 0x10
mov eax, dword [edx]
cmp eax, 1
jbe 0x46c71d
test dword [edx + 8], 0x7fffffff
je 0x46c790
mov dword [esp + 4], 0
mov eax, dword [edx + 8]
mov ecx, 0x73b88c
and eax, 0x7fffffff
mov dword [esp], eax
call fcn.005bb6a0
mov edx, dword [0x73b88c]
sub esp, 8
mov eax, edx
mov esi, dword [0x73b888]
mov eax, dword [eax]
cmp eax, 1
mov eax, dword [edx + 4]
ja 0x46c73c
mov ecx, dword [edx + 8]
and ecx, 0x7fffffff
cmp eax, ecx
jl 0x46c760
add eax, 1
mov dword [esp + 4], 8
mov ecx, 0x73b88c
mov dword [esp], eax
call fcn.005bb6a0
mov edx, dword [0x73b88c]
sub esp, 8
mov eax, dword [edx + 4]
mov ebx, dword [edx + 0xc]
shl eax, 2
mov dword [esp + 8], eax
add ebx, edx
lea eax, [ebx + 4]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov dword [ebx], esi
mov eax, dword [0x73b88c]
add dword [eax + 4], 1
jmp 0x46c5f9
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], 4
call fcn.004a4d50
mov dword [0x73b88c], eax
mov edx, eax
jmp 0x46c71f