Function at 0x461300
Capabilities:
Create thread
Get thread local storage value
Resume thread

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
call fcn.0045f420
test eax, eax
je 0x461570
mov ebp, dword [esp + 0x40]
mov edi, eax
test ebp, ebp
je 0x46132a
mov eax, dword [eax + 0xb4]
mov edx, dword [esp + 0x40]
mov dword [edx], eax
mov eax, dword [esp + 0x4c]
mov dword [edi + 0x68], 0
xor ebx, ebx
mov dword [edi + 0x24], 1
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [edi + 4], eax
mov eax, dword [esp + 0x48]
mov dword [edi + 0x14], 0xffffffff
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [edi + 8], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call esi
mov dword [edi + 0x18], eax
sub esp, 0x10
test eax, eax
jne 0x4613b8
test ebx, ebx
jne 0x4613a0
mov dword [esp], 0
mov ebx, 1
call ebp
sub esp, 4
jmp 0x46135b
mov dword [esp], 0x14
add ebx, 1
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
cmp ebx, 5
jne 0x46135b
lea ebx, [edi + 0x38]
mov dword [edi + 0x1c], 0xffffffff
mov dword [esp], ebx
call fcn.0045ef40
cmp eax, 1
je 0x4615bf
mov esi, dword [edi + 0x18]
mov dword [edi + 0x38], 0xffffffff
mov dword [edi], 0xbab1f00d
mov dword [edi + 0x6c], 0
mov dword [edi + 0x64], 0
test esi, esi
je 0x461554
mov ecx, dword [esp + 0x44]
xor esi, esi
test ecx, ecx
je 0x461425
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x44]
mov eax, dword [eax]
mov esi, dword [edx + 8]
mov dword [edi + 0x24], eax
test al, 8
jne 0x461580
mov eax, dword [esp + 0x44]
mov eax, dword [eax + 0xc]
mov dword [edi + 0x6c], eax
mov dword [esp + 4], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x45fa10
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
mov esi, eax
lea eax, [eax - 1]
cmp eax, 0xfffffffd
ja 0x461510
mov ecx, dword [edi + 0x6c]
mov eax, 0xfffffff1
cmp ecx, 0xfffffff2
jge 0x4614e8
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [edi + 0x18]
sub esp, 8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
sub esp, 4
test byte [edi + 0x24], 4
jne 0x4614c0
mov dword [edi + 0x14], esi
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
sub esp, 4
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
sub esp, 4
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [edi + 0x14], 0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x4614a1
mov eax, 0xfffffffe
cmp ecx, 0xffffffff
jl 0x46146d
mov eax, 2
cmp ecx, eax
cmovle eax, ecx
cmp ecx, 0xf
mov ecx, 0xf
cmovge eax, ecx
jmp 0x46146d
mov eax, dword [edi + 0x18]
lea esi, [edi + 0x1c]
test eax, eax
je 0x461526
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [esp], esi
call fcn.0045ed80
mov dword [esp], ebx
call fcn.0045ef40
cmp eax, 1
je 0x4615bf
mov dword [edi + 0x38], 0xffffffff
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov edx, dword [esp + 0x40]
test edx, edx
je 0x461566
mov eax, dword [esp + 0x40]
mov dword [eax], 0
mov eax, dword [edi + 0xb0]
test eax, eax
je 0x4615a8
mov eax, 0xb
jmp 0x4614b3
call fcn.0045f6a0
mov eax, dword [0x50f180]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x4615b8
mov eax, dword [eax + 0x6c]
jmp 0x461422
mov eax, edi
call fcn.0045f4e0
jmp 0x461570
call fcn.0045f760
jmp 0x46159a
call fcn.0045f260
lea esi, [esi]
lea esi, [esi]
nop