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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov dword [ebp - 0x2c], 0xa8
mov dword [ebp - 0x30], 3
mov dword [ebp - 0x18], 0x28
mov dword [ebp - 0x50], 0x47
mov dword [ebp - 0x3c], 0
mov dword [ebp - 4], 0xf9
mov dword [ebp - 0x10], 0xfd
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x2c]
xor eax, dword [ebp - 0x10]
je 0x410100
mov ecx, dword [0x41c12c]
imul ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x410100
mov dword [ebp - 0x1c], 1
jmp 0x410107
mov dword [ebp - 0x1c], 0
cmp dword [ebp - 0x1c], 0
jne 0x410147
mov edx, dword [0x41c11c]
sub edx, dword [0x41c0c4]
mov eax, dword [0x41c0d4]
or eax, dword [0x41c0c8]
cmp edx, eax
jbe 0x410131
mov dword [ebp - 0x20], 1
jmp 0x410138
mov dword [ebp - 0x20], 0
cmp dword [ebp - 0x20], 0
jne 0x410147
mov dword [ebp - 0x24], 0
jmp 0x41014e
mov dword [ebp - 0x24], 1
cmp dword [ebp - 0x24], 0
jne 0x41017d
mov ecx, dword [ebp - 0x10]
imul ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x3c]
xor edx, edx
div dword [ebp - 4]
cmp ecx, eax
je 0x410170
mov dword [ebp - 0x28], 1
jmp 0x410177
mov dword [ebp - 0x28], 0
cmp dword [ebp - 0x28], 0
je 0x4101bf
mov dword [ebp - 0x40], 5
mov dword [ebp - 8], 0
mov edx, dword [ebp - 0x40]
push edx
mov eax, dword [0x41c120]
push eax
call fcn.0040f743
add esp, 8
mov ecx, dword [ebp - 8]
xor ecx, dword [ebp - 8]
mov dword [ebp - 8], ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x44], eax
mov edx, dword [ebp - 0x44]
movzx eax, word [edx]
mov dword [ebp - 8], eax
jmp 0x410256
mov ecx, dword [0x41c130]
push ecx
mov edx, dword [0x41c120]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [0x41c134]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x41c128], eax
mov eax, dword [0x41c0cc]
or eax, dword [0x41c118]
mov dword [0x41c12c], eax
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x48], edx
mov eax, dword [0x41c12c]
cmp eax, dword [ebp - 0x48]
je 0x410239
mov dword [ebp - 0x58], 0x77
mov dword [ebp - 0x4c], 5
mov ecx, dword [ebp + 8]
imul ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x18], ecx
jmp 0x410256
mov dword [ebp - 0x5c], 0x25
mov dword [ebp - 0x60], 0xd3
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [str.p4vH_], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
sub ecx, 0x34
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 0xc5
ja case.0x41027c.1
mov edx, dword [ebp - 0xc]
movzx eax, byte [edx + 0x410333]
jmp dword [eax*4 + 0x41031f]
mov dword [ebp - 0x64], 0xff
mov ecx, dword [ebp - 0x2c]
imul ecx, dword [ebp - 0x30]
mov dword [ebp + 8], ecx
jmp 0x410312
mov edx, dword [0x41c0d0]
imul edx, dword [ebp - 0x68]
mov dword [0x41c134], edx
jmp 0x410312
mov dword [ebp - 0x6c], 0x53
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [0x41c118], eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.OLEAUT32.dll_SafeArrayAllocDescriptor]
mov dword [ebp - 4], eax
jmp 0x410312
mov dword [ebp - 0x70], 0xda
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x78], 0
mov eax, dword [ebp - 0x14]
or eax, dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
jmp 0x410312
mov dword [ebp - 0x7c], 0x7b
mov ecx, dword [ebp - 0x18]
mov edx, 1
lock xadd dword [ecx], edx
inc edx
mov dword [0x41c0cc], edx
mov eax, dword [ebp - 4]
or eax, dword [ebp - 0x3c]
mov esp, ebp
pop ebp
ret