Function at 0x1002fa50
Capabilities:
Allocate thread local storage
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
mov eax, dword [0x100eb6ac]
xor eax, esp
mov dword [esp + 0x80], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], ecx
test eax, eax
je 0x1002fab9
mov ecx, str.:memory:
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1002faa1
test dl, dl
je 0x1002fa9d
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1002faa1
add eax, 2
add ecx, 2
test dl, dl
jne 0x1002fa81
xor eax, eax
jmp 0x1002faa6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1002fab9
mov dword [esp + 0x10], 0
mov ebx, 1
jmp 0x1002fac2
mov ebx, 1
mov dword [esp + 0x10], ebx
cmp dword [0x100f0574], 0
je 0x1002fad8
cmp dword [0x100f0580], 0
jg 0x1002fc26
push 0xc
call fcn.1009ce65
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x1002fb10
add dword [0x100f0580], ebx
mov dword [0x100f0574], ebx
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.1009c0cb
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov byte [esi + 8], al
mov dword [esi], edx
cmp dword [0x100f0584], eax
jne 0x1002fb4e
add dword [0x100f0580], ebx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
sub dword [0x100f0580], ebx
mov dword [0x100f01dc], eax
cmp eax, 0xffffffff
je 0x1002fb66
mov dword [0x100f0584], ebx
jmp 0x1002fb53
mov eax, dword [0x100f01dc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x1002fb66
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x1002fb72
mov dword [esp + 0x18], 0x100d56dc
mov edi, dword [esp + 0x18]
cmp byte [edi + 4], 0
je 0x1002fbe5
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002fbe5
cmp dword [esp + 0x10], 0
jne 0x1002fbe5
call fcn.1003d0c0
mov ebx, eax
test ebx, ebx
je 0x1002fc1d
mov edi, dword [edi + 8]
test edi, edi
je 0x1002fbd7
lea ecx, [ecx]
mov eax, dword [edi]
mov edx, dword [eax + 0x4c]
mov ecx, ebx
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1002fbc7
test al, al
je 0x1002fbc3
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x1002fbc7
add ecx, 2
add edx, 2
test al, al
jne 0x1002fba7
xor eax, eax
jmp 0x1002fbcc
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1002fc40
mov edi, dword [edi + 0x44]
test edi, edi
jne 0x1002fba0
push ebx
call fcn.1009cc76
add esp, 4
mov ebx, 1
cmp dword [0x100f0574], 0
je 0x1002fbf7
cmp dword [0x100f0580], 0
jg 0x1002fc13
push 0x48
call fcn.1009ce65
mov edi, eax
add esp, 4
test edi, edi
jne 0x1002fc6c
add dword [0x100f0580], ebx
mov dword [0x100f0574], ebx
mov edx, dword [esp + 0xc]
mov dword [edx], 0
push esi
call fcn.1009cc76
add esp, 4
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.1009c0cb
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xc]
mov dword [esi + 4], edi
mov dword [ecx], esi
inc dword [edi + 0x30]
push ebx
call fcn.1009cc76
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.1009c0cb
mov esp, ebp
pop ebp
ret
push 0x48
push 0
push edi
call fcn.100a39b0
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0x10]
add esp, 0xc
push eax
mov edx, edi
call fcn.1004ea40
mov ebx, eax
xor ecx, ecx
add esp, 4
cmp ebx, ecx
je 0x1002fcd7
mov eax, dword [edi]
cmp eax, ecx
je 0x1002fca4
mov esi, eax
call fcn.1004f0a0
mov esi, dword [esp + 0x1c]
push edi
call fcn.1009cc76
add esp, 4
push esi
call fcn.1009cc76
mov ecx, dword [esp + 0x10]
add esp, 4
mov dword [ecx], 0
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.1009c0cb
mov esp, ebp
pop ebp
ret
mov dword [esi + 4], edi
mov edx, dword [edi]
mov dword [edx + 0xac], 0x1002f9f0
mov eax, dword [edi]
mov dword [eax + 0xb0], 0x1002fa20
mov esi, dword [edi]
push 0x64
mov dword [edi + 4], ecx
mov dword [edi + 8], ecx
mov cl, byte [esi + 0xd]
lea edx, [esp + 0x24]
push 0
push edx
mov byte [edi + 0xd], cl
call fcn.100a39b0
add esp, 0xc
cmp byte [esi + 0x11], 0
jne 0x1002fd3e
mov eax, dword [esi + 0x58]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
push 0
push 0
push eax
call edx
mov esi, dword [esi + 0x58]
mov eax, dword [esi]
mov edx, dword [eax + 8]
add esp, 0xc
push 0x64
lea ecx, [esp + 0x24]
push ecx
push esi
call edx
add esp, 0xc
movzx eax, byte [esp + 0x30]
movzx ecx, byte [esp + 0x31]
shl ax, 8
or ax, cx
mov edx, 0x200
mov word [edi + 0x14], ax
cmp ax, dx
jb 0x1002fda2
mov ecx, 0x8000
cmp ax, cx
ja 0x1002fda2
movzx eax, ax
lea edx, [eax - 1]
test eax, edx
jne 0x1002fda2
mov al, byte [esp + 0x35]
movzx esi, byte [esp + 0x34]
mov byte [edi + 0xe], al
mov cl, byte [esp + 0x36]
mov byte [edi + 0xf], cl
mov dl, byte [esp + 0x37]
lea ecx, [esp + 0x54]
mov byte [edi + 0x10], dl
mov byte [edi + 0x11], 1
call fcn.1002e9a0
test eax, eax
setne al
mov byte [edi + 0x12], al
jmp 0x1002fdca
cmp dword [esp + 0x14], 0
mov ecx, 0x400
mov al, 0x20
mov word [edi + 0x14], cx
mov word [edi + 0xe], 0x2040
mov byte [edi + 0x10], al
je 0x1002fdc8
cmp dword [esp + 0x10], 0
jne 0x1002fdc8
mov byte [edi + 0x12], 0
xor esi, esi
movzx eax, word [edi + 0x14]
mov ecx, dword [edi]
mov edx, eax
sub edx, esi
mov word [edi + 0x16], dx
cmp byte [ecx + 0x11], 0
jne 0x1002fde1
mov dword [ecx + 0x30], eax
mov eax, dword [esp + 0x18]
cmp byte [eax + 4], 0
je 0x1002fe07
cmp dword [esp + 0x14], 0
je 0x1002fe07
cmp dword [esp + 0x10], 0
jne 0x1002fe07
mov ecx, dword [eax + 8]
mov dword [edi + 0x44], ecx
call fcn.1002e920
mov dword [eax + 8], edi
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x8c]
mov dword [edi + 0x30], 1
pop edi
pop esi
pop ebx
mov dword [eax], edx
xor ecx, esp
xor eax, eax
call fcn.1009c0cb
mov esp, ebp
pop ebp
ret