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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], esi
mov dword [ebp - 4], ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x10], 0
mov esi, 1
push 1
push 0x100d8cc0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x1003232e
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 0x1003232e
cmp esi, 0x15f90
jge 0x100322f7
xor eax, eax
jmp 0x10032327
cmp esi, 0x1d4c0
jge 0x10032306
mov eax, 0x32
jmp 0x10032327
cmp esi, 0x2bf20
jge 0x10032315
mov eax, 0x64
jmp 0x10032327
cmp esi, 0x57d78
mov eax, 0x1482
jl 0x10032327
mov eax, 0xfa
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10032344
add esi, 1
cmp esi, 0x57e40
jl 0x100322ba
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x1003235c
mov dword [ebp - 0x14], 0x98
lea eax, [ebp - 0x14]
push eax
call sym.libifcoremd.dll_for_exit
pop ecx
mov eax, dword [0x100d8cc4]
test eax, eax
jne 0x100323be
mov eax, dword [0x100ce600]
test eax, eax
jg 0x10032374
xor edi, edi
xor esi, esi
jmp 0x1003238d
push 1
push 2
call fcn.1009125c
mov edi, eax
push 1
push 0x16
call fcn.1009125c
add esp, 0x10
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x100d8cc4], 1
mov dword [0x100d8cc8], eax
mov eax, dword [0x100ce600]
test eax, eax
jle 0x100323be
push edi
push 2
call fcn.1009125c
push esi
push 0x16
call fcn.1009125c
add esp, 0x10
push dword [0x100d8cc8]
mov dword [0x100d8cc0], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov dword [ebp - 0x10], esi
test esi, esi
je 0x10032412
mov dword [ebx], esi
mov eax, dword [0x100ce600]
test eax, eax
jle 0x10032403
push 1
push 2
call fcn.1009125c
push 1
push 0x16
mov dword [esi + 0x64], eax
call fcn.1009125c
add esp, 0x10
mov dword [esi + 0x68], eax
mov ebx, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x10]
push eax
push 0
push 0x70
call fcn.1004970c
add esp, 0xc
test eax, eax
je 0x10032440
mov dword [ebx], 0
mov esi, 0
je 0x100323df
mov ebx, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x10]
mov eax, 0x100ce560
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 - 0x10]
push dword [0x100d8cc8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [ebp - 0x10]
jmp 0x100323dd