Function at 0x483470
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 4], esi
mov dword [ebp - 8], ebx
mov ebx, 1
mov dword [ebp - 0xc], 0
push 1
push 0x516e74
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4834fc
mov eax, 0x51eb851f
imul ebx
mov ecx, ebx
sar ecx, 0x1f
sar edx, 5
sub edx, ecx
imul esi, edx, 0x64
mov eax, ebx
sub eax, esi
jne 0x4834fc
cmp ebx, 0x15f90
jge 0x4834c5
xor eax, eax
jmp 0x4834f5
cmp ebx, 0x1d4c0
jge 0x4834d4
mov eax, 0x32
jmp 0x4834f5
cmp ebx, 0x2bf20
jge 0x4834e3
mov eax, 0x64
jmp 0x4834f5
mov eax, 0x1482
cmp ebx, 0x57d78
jl 0x4834f5
mov eax, 0xfa
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x483510
inc ebx
cmp ebx, 0x57e40
jl 0x483488
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x483528
mov dword [ebp - 0x10], 0x98
lea eax, [ebp - 0x10]
push eax
call fcn.0048deb0
pop ecx
mov eax, dword [0x516e78]
test eax, eax
jne 0x483560
mov eax, dword [0x50fea0]
cmp eax, 1
je 0x4835e4
xor esi, esi
xor ebx, ebx
mov eax, dword [0x516e7c]
test eax, eax
je 0x4835a4
mov eax, dword [0x50fea0]
mov dword [0x516e78], 1
cmp eax, 1
je 0x48358f
push dword [0x516e80]
mov dword [0x516e74], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [ebp + 8]
test eax, eax
je 0x483602
mov esi, dword [ebp - 4]
mov dword [ebx], eax
mov ebx, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
push 2
call fcn.004d1f04
push esi
push 0x16
call fcn.004d1f04
add esp, 0x10
jmp 0x483560
mov dword [0x516e7c], 1
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x516e80], eax
cmp eax, 0xffffffff
jne 0x4835c8
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x48354c
push 0x483a80
call fcn.004d2409
push 0x483a50
call fcn.004d2409
add esp, 8
jmp 0x48354c
push 1
push 2
call fcn.004d1f04
mov ebx, eax
push 1
push 0x16
call fcn.004d1f04
add esp, 0x10
mov esi, eax
jmp 0x483543
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0x70
call fcn.00484a50
add esp, 0xc
test eax, eax
je 0x483629
mov esi, dword [ebp - 4]
mov dword [ebx], 0
mov ebx, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
mov edx, dword [0x50fe00]
mov dword [eax], edx
mov ecx, dword [0x50fe04]
mov dword [eax + 4], ecx
mov esi, dword [0x50fe08]
mov dword [eax + 8], esi
mov edx, dword [0x50fe0c]
mov dword [eax + 0xc], edx
mov ecx, dword [0x50fe10]
mov dword [eax + 0x10], ecx
mov esi, dword [0x50fe14]
mov dword [eax + 0x14], esi
mov edx, dword [0x50fe18]
mov dword [eax + 0x18], edx
mov ecx, dword [0x50fe1c]
mov dword [eax + 0x1c], ecx
mov esi, dword [0x50fe20]
mov dword [eax + 0x20], esi
mov edx, dword [0x50fe24]
mov dword [eax + 0x24], edx
mov ecx, dword [0x50fe28]
mov dword [eax + 0x28], ecx
mov esi, dword [0x50fe2c]
mov dword [eax + 0x2c], esi
mov edx, dword [0x50fe30]
mov dword [eax + 0x30], edx
mov ecx, dword [0x50fe34]
mov dword [eax + 0x34], ecx
mov esi, dword [0x50fe38]
mov dword [eax + 0x38], esi
mov edx, dword [0x50fe3c]
mov dword [eax + 0x3c], edx
mov ecx, dword [0x50fe40]
mov dword [eax + 0x40], ecx
mov esi, dword [0x50fe44]
mov dword [eax + 0x44], esi
mov edx, dword [0x50fe48]
mov dword [eax + 0x48], edx
mov ecx, dword [0x50fe4c]
mov dword [eax + 0x4c], ecx
mov esi, dword [0x50fe50]
mov dword [eax + 0x50], esi
mov edx, dword [0x50fe54]
mov dword [eax + 0x54], edx
mov ecx, dword [0x50fe58]
mov dword [eax + 0x58], ecx
mov esi, dword [0x50fe5c]
mov dword [eax + 0x5c], esi
mov edx, dword [0x50fe60]
mov dword [eax + 0x60], edx
mov ecx, dword [0x50fe64]
mov dword [eax + 0x64], ecx
mov esi, dword [0x50fe68]
mov dword [eax + 0x68], esi
mov edx, dword [0x50fe6c]
mov dword [eax + 0x6c], edx
push dword [ebp - 0xc]
push dword [0x516e80]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [ebp - 0xc]
jmp 0x483581