Function at 0x1001c090
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 [0x1010e07c]
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 0x1001c0f9
mov ecx, str.:memory:
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1001c0e1
test dl, dl
je 0x1001c0dd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1001c0e1
add eax, 2
add ecx, 2
test dl, dl
jne 0x1001c0c1
xor eax, eax
jmp 0x1001c0e6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1001c0f9
mov dword [esp + 0x10], 0
mov ebx, 1
jmp 0x1001c102
mov ebx, 1
mov dword [esp + 0x10], ebx
cmp dword [0x10112c64], 0
je 0x1001c118
cmp dword [0x10112c70], 0
jg 0x1001c266
push 0xc
call fcn.100b3794
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x1001c150
add dword [0x10112c70], ebx
mov dword [0x10112c64], ebx
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.100b2b2c
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 [0x10112c74], eax
jne 0x1001c18e
add dword [0x10112c70], ebx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
sub dword [0x10112c70], ebx
mov dword [0x101128cc], eax
cmp eax, 0xffffffff
je 0x1001c1a6
mov dword [0x10112c74], ebx
jmp 0x1001c193
mov eax, dword [0x101128cc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x1001c1a6
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x1001c1b2
mov dword [esp + 0x18], 0x100f15ac
mov edi, dword [esp + 0x18]
cmp byte [edi + 4], 0
je 0x1001c225
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1001c225
cmp dword [esp + 0x10], 0
jne 0x1001c225
call fcn.10029700
mov ebx, eax
test ebx, ebx
je 0x1001c25d
mov edi, dword [edi + 8]
test edi, edi
je 0x1001c217
lea ecx, [ecx]
mov eax, dword [edi]
mov edx, dword [eax + 0x4c]
mov ecx, ebx
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1001c207
test al, al
je 0x1001c203
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x1001c207
add ecx, 2
add edx, 2
test al, al
jne 0x1001c1e7
xor eax, eax
jmp 0x1001c20c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1001c280
mov edi, dword [edi + 0x44]
test edi, edi
jne 0x1001c1e0
push ebx
call fcn.100b3828
add esp, 4
mov ebx, 1
cmp dword [0x10112c64], 0
je 0x1001c237
cmp dword [0x10112c70], 0
jg 0x1001c253
push 0x48
call fcn.100b3794
mov edi, eax
add esp, 4
test edi, edi
jne 0x1001c2ac
add dword [0x10112c70], ebx
mov dword [0x10112c64], ebx
mov edx, dword [esp + 0xc]
mov dword [edx], 0
push esi
call fcn.100b3828
add esp, 4
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.100b2b2c
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.100b3828
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.100b2b2c
mov esp, ebp
pop ebp
ret
push 0x48
push 0
push edi
call fcn.100b2ed0
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0x10]
add esp, 0xc
push eax
mov edx, edi
call fcn.1003b070
mov ebx, eax
xor ecx, ecx
add esp, 4
cmp ebx, ecx
je 0x1001c317
mov eax, dword [edi]
cmp eax, ecx
je 0x1001c2e4
mov esi, eax
call fcn.1003b6d0
mov esi, dword [esp + 0x1c]
push edi
call fcn.100b3828
add esp, 4
push esi
call fcn.100b3828
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.100b2b2c
mov esp, ebp
pop ebp
ret
mov dword [esi + 4], edi
mov edx, dword [edi]
mov dword [edx + 0xac], 0x1001c030
mov eax, dword [edi]
mov dword [eax + 0xb0], 0x1001c060
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.100b2ed0
add esp, 0xc
cmp byte [esi + 0x11], 0
jne 0x1001c37e
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 0x1001c3e2
mov ecx, 0x8000
cmp ax, cx
ja 0x1001c3e2
movzx eax, ax
lea edx, [eax - 1]
test eax, edx
jne 0x1001c3e2
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.1001afe0
test eax, eax
setne al
mov byte [edi + 0x12], al
jmp 0x1001c40a
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 0x1001c408
cmp dword [esp + 0x10], 0
jne 0x1001c408
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 0x1001c421
mov dword [ecx + 0x30], eax
mov eax, dword [esp + 0x18]
cmp byte [eax + 4], 0
je 0x1001c447
cmp dword [esp + 0x14], 0
je 0x1001c447
cmp dword [esp + 0x10], 0
jne 0x1001c447
mov ecx, dword [eax + 8]
mov dword [edi + 0x44], ecx
call fcn.1001af60
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.100b2b2c
mov esp, ebp
pop ebp
ret