Function at 0x483740
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], edi
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 0x4837cc
mov eax, 0x51eb851f
imul ebx
mov ecx, ebx
sar ecx, 0x1f
sar edx, 5
sub edx, ecx
imul edi, edx, 0x64
mov eax, ebx
sub eax, edi
jne 0x4837cc
cmp ebx, 0x15f90
jge 0x483795
xor eax, eax
jmp 0x4837c5
cmp ebx, 0x1d4c0
jge 0x4837a4
mov eax, 0x32
jmp 0x4837c5
cmp ebx, 0x2bf20
jge 0x4837b3
mov eax, 0x64
jmp 0x4837c5
mov eax, 0x1482
cmp ebx, 0x57d78
jl 0x4837c5
mov eax, 0xfa
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4837e0
inc ebx
cmp ebx, 0x57e40
jl 0x483758
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4837f8
mov dword [ebp - 0x10], 0x98
lea eax, [ebp - 0x10]
push eax
call fcn.0048deb0
pop ecx
mov eax, dword [0x516e78]
test eax, eax
jne 0x483830
mov eax, dword [0x50fea0]
cmp eax, 1
je 0x4838ca
xor edi, edi
xor ebx, ebx
mov eax, dword [0x516e7c]
test eax, eax
je 0x483887
mov eax, dword [0x50fea0]
mov dword [0x516e78], 1
cmp eax, 1
je 0x483872
push dword [0x516e80]
mov dword [0x516e74], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xc], edi
test edi, edi
je 0x483908
mov dword [ebx], edi
mov eax, dword [0x50fea0]
cmp eax, 1
je 0x4838e8
mov ebx, dword [ebp - 8]
mov edi, dword [ebp - 4]
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
push 2
call fcn.004d1f04
push edi
push 0x16
call fcn.004d1f04
add esp, 0x10
jmp 0x483830
mov dword [0x516e7c], 1
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x516e80], eax
cmp eax, 0xffffffff
jne 0x4838ae
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x48381c
push 0x483a80
call fcn.004d2409
push 0x483a50
call fcn.004d2409
add esp, 8
jmp 0x48381c
push 1
push 2
call fcn.004d1f04
mov ebx, eax
push 1
push 0x16
call fcn.004d1f04
add esp, 0x10
mov edi, eax
jmp 0x483813
push 1
push 2
call fcn.004d1f04
push 1
push 0x16
mov dword [edi + 0x64], eax
call fcn.004d1f04
add esp, 0x10
mov dword [edi + 0x68], eax
jmp 0x483866
lea eax, [ebp - 0xc]
push eax
push 0
push 0x70
call fcn.00484a50
add esp, 0xc
test eax, eax
je 0x48392c
mov edi, 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 edi, dword [0x50fe08]
mov dword [eax + 8], edi
mov edx, dword [0x50fe0c]
mov dword [eax + 0xc], edx
mov ecx, dword [0x50fe10]
mov dword [eax + 0x10], ecx
mov edi, dword [0x50fe14]
mov dword [eax + 0x14], edi
mov edx, dword [0x50fe18]
mov dword [eax + 0x18], edx
mov ecx, dword [0x50fe1c]
mov dword [eax + 0x1c], ecx
mov edi, dword [0x50fe20]
mov dword [eax + 0x20], edi
mov edx, dword [0x50fe24]
mov dword [eax + 0x24], edx
mov ecx, dword [0x50fe28]
mov dword [eax + 0x28], ecx
mov edi, dword [0x50fe2c]
mov dword [eax + 0x2c], edi
mov edx, dword [0x50fe30]
mov dword [eax + 0x30], edx
mov ecx, dword [0x50fe34]
mov dword [eax + 0x34], ecx
mov edi, dword [0x50fe38]
mov dword [eax + 0x38], edi
mov edx, dword [0x50fe3c]
mov dword [eax + 0x3c], edx
mov ecx, dword [0x50fe40]
mov dword [eax + 0x40], ecx
mov edi, dword [0x50fe44]
mov dword [eax + 0x44], edi
mov edx, dword [0x50fe48]
mov dword [eax + 0x48], edx
mov ecx, dword [0x50fe4c]
mov dword [eax + 0x4c], ecx
mov edi, dword [0x50fe50]
mov dword [eax + 0x50], edi
mov edx, dword [0x50fe54]
mov dword [eax + 0x54], edx
mov ecx, dword [0x50fe58]
mov dword [eax + 0x58], ecx
mov edi, dword [0x50fe5c]
mov dword [eax + 0x5c], edi
mov edx, dword [0x50fe60]
mov dword [eax + 0x60], edx
mov ecx, dword [0x50fe64]
mov dword [eax + 0x64], ecx
mov edi, dword [0x50fe68]
mov dword [eax + 0x68], edi
mov edx, dword [0x50fe6c]
mov dword [eax + 0x6c], edx
push dword [ebp - 0xc]
push dword [0x516e80]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov edi, dword [ebp - 0xc]
jmp 0x483856