Function at 0x416260
Capabilities:
Create thread
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 8], edi
mov dword [ebp - 4], esi
mov esi, 1
mov dword [ebp - 0xc], 0
push 1
push 0x4406b60
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4162ec
mov eax, 0x51eb851f
imul esi
mov ecx, esi
sar ecx, 0x1f
sar edx, 5
sub edx, ecx
imul edi, edx, 0x64
neg edi
add edi, esi
jne 0x4162ec
cmp esi, 0x15f90
jge 0x4162b5
xor eax, eax
jmp 0x4162e5
cmp esi, 0x1d4c0
jge 0x4162c4
mov eax, 0x32
jmp 0x4162e5
cmp esi, 0x2bf20
jge 0x4162d3
mov eax, 0x64
jmp 0x4162e5
cmp esi, 0x57d78
mov eax, 0x1482
jl 0x4162e5
mov eax, 0xfa
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x416302
add esi, 1
cmp esi, 0x57e40
jl 0x416278
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x41631a
mov dword [ebp - 0x10], 0x98
lea eax, [ebp - 0x10]
push eax
call fcn.004317a0
pop ecx
mov eax, dword [0x4406b64]
test eax, eax
jne 0x416345
mov eax, dword [0x4c9460]
cmp eax, 1
je 0x416385
xor edi, edi
xor esi, esi
mov eax, dword [0x4c9460]
mov dword [0x4406b64], 1
cmp eax, 1
je 0x416370
push dword [0x4406b68]
mov dword [0x4406b60], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4163a0
mov edx, dword [ebp + 8]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov dword [edx], eax
xor eax, eax
mov esp, ebp
pop ebp
ret
push edi
push 2
call fcn.00489f2b
push esi
push 0x16
call fcn.00489f2b
add esp, 0x10
jmp 0x416345
push 1
push 2
call fcn.00489f2b
mov edi, eax
push 1
push 0x16
call fcn.00489f2b
add esp, 0x10
mov esi, eax
jmp 0x416331
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0x70
call fcn.00431768
add esp, 0xc
test eax, eax
je 0x4163ca
mov edx, dword [ebp + 8]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov dword [edx], 0
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xc]
mov eax, 0x4c93c0
mov ecx, dword [eax]
mov dword [edx], ecx
mov esi, dword [eax + 4]
mov dword [edx + 4], esi
mov edi, dword [eax + 8]
mov dword [edx + 8], edi
mov ecx, dword [eax + 0xc]
mov dword [edx + 0xc], ecx
mov ecx, dword [eax + 0x10]
mov dword [edx + 0x10], ecx
mov ecx, dword [eax + 0x14]
mov dword [edx + 0x14], ecx
mov ecx, dword [eax + 0x18]
mov dword [edx + 0x18], ecx
mov ecx, dword [eax + 0x1c]
mov dword [edx + 0x1c], ecx
mov ecx, dword [eax + 0x20]
mov dword [edx + 0x20], ecx
mov ecx, dword [eax + 0x24]
mov dword [edx + 0x24], ecx
mov ecx, dword [eax + 0x28]
mov dword [edx + 0x28], ecx
mov ecx, dword [eax + 0x2c]
mov dword [edx + 0x2c], ecx
mov ecx, dword [eax + 0x30]
mov dword [edx + 0x30], ecx
mov ecx, dword [eax + 0x34]
mov dword [edx + 0x34], ecx
mov ecx, dword [eax + 0x38]
mov dword [edx + 0x38], ecx
mov ecx, dword [eax + 0x3c]
mov dword [edx + 0x3c], ecx
mov ecx, dword [eax + 0x40]
mov dword [edx + 0x40], ecx
mov ecx, dword [eax + 0x44]
mov dword [edx + 0x44], ecx
mov ecx, dword [eax + 0x48]
mov dword [edx + 0x48], ecx
mov ecx, dword [eax + 0x4c]
mov dword [edx + 0x4c], ecx
mov ecx, dword [eax + 0x50]
mov dword [edx + 0x50], ecx
mov ecx, dword [eax + 0x54]
mov dword [edx + 0x54], ecx
mov ecx, dword [eax + 0x58]
mov dword [edx + 0x58], ecx
mov ecx, dword [eax + 0x5c]
mov dword [edx + 0x5c], ecx
mov ecx, dword [eax + 0x60]
mov dword [edx + 0x60], ecx
mov ecx, dword [eax + 0x64]
mov dword [edx + 0x64], ecx
mov ecx, dword [eax + 0x68]
mov dword [edx + 0x68], ecx
mov eax, dword [eax + 0x6c]
mov dword [edx + 0x6c], eax
push dword [ebp - 0xc]
push dword [0x4406b68]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ecx, dword [ebp - 0xc]
push 2
add ecx, 0x6c
xor edx, edx
push edx
push edx
push ecx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x4164bf
mov eax, dword [ebp - 0xc]
jmp 0x41635f
push dword [ebp - 0xc]
push 0
push 0x416120
call fcn.00489d75
add esp, 0xc
mov eax, dword [ebp - 0xc]
jmp 0x41635f