Function at 0x41a980
Capabilities:
Allocate thread local storage
Check os version
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0
push 0
push 0x100000
push 0x200000
push 0
push 0x1002
mov dword [0x458cdc], 0x44fb0c
mov dword [0x458d10], eax
call dword [sym.imp.ntdll.dll_RtlCreateHeap]
mov dword [0x458d0c], eax
test eax, eax
jne 0x41a9e4
mov eax, 0xc000009a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042d1c6
mov esp, ebp
pop ebp
ret 0xc
lea eax, [ebp - 0x12c]
mov dword [ebp - 0x12c], 0x11c
push eax
call dword [sym.imp.ntdll.dll_RtlGetVersion]
test eax, eax
js 0x41aad2
mov eax, dword [ebp - 0x128]
lea esi, [ebp - 0x12c]
mov ecx, 0x47
mov edi, 0x458bc0
rep movsd dword es:[edi], dword [esi]
cmp eax, 6
jne 0x41aa57
mov eax, dword [ebp - 0x124]
cmp eax, 1
jne 0x41aa35
mov eax, 0x3d
jmp 0x41aad7
cmp eax, 2
jne 0x41aa44
mov eax, 0x3e
jmp 0x41aad7
cmp eax, 3
jne 0x41aad2
mov eax, 0x3f
jmp 0x41aad7
cmp eax, 0xa
jne 0x41aad2
cmp dword [ebp - 0x124], 0
jne 0x41aad2
mov eax, dword [ebp - 0x120]
cmp eax, 0x3ad7
ja 0x41aaa5
je 0x41aa9e
cmp eax, 0x2800
je 0x41aa97
cmp eax, 0x295a
je 0x41aa90
cmp eax, 0x3839
jne 0x41aab3
mov eax, 0x66
jmp 0x41aad7
mov eax, 0x65
jmp 0x41aad7
mov eax, 0x64
jmp 0x41aad7
mov eax, 0x67
jmp 0x41aad7
cmp eax, 0x3fab
je 0x41aacb
cmp eax, 0x42ee
je 0x41aac4
mov ecx, 0x42ee
cmp ecx, eax
sbb eax, eax
and eax, 5
add eax, 0x64
jmp 0x41aad7
mov eax, 0x69
jmp 0x41aad7
mov eax, 0x68
jmp 0x41aad7
mov eax, 0x7fffffff
push 0
push 0x2c
push 0x458ce0
push 0
mov dword [0x458d14], eax
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
push 0
push 0
push 0xf0003
push 0x458b04
call dword [sym.imp.ntdll.dll_NtCreateKeyedEvent]
test eax, eax
js 0x41ad44
mov al, 1
cmp al, byte [0x458d08]
push 0x459158
sbb eax, eax
and eax, 0xfa0
mov dword [0x457ae8], eax
call dword [sym.imp.ntdll.dll_RtlInitializeSListHead]
push 0x459140
call dword [sym.imp.ntdll.dll_RtlInitializeSListHead]
xor eax, eax
mov dword [0x459148], 0
mov dword [ebp - 0x154], eax
mov ecx, 0x28
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x144], eax
mov dword [ebp - 0x140], eax
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x130], eax
lea eax, [ebp - 0x154]
mov edx, eax
mov dword [0x45914c], 0x200
mov dword [0x459150], 0x38
mov dword [0x4588f0], eax
mov dword [0x458d40], eax
call fcn.00412330
mov edx, eax
mov ebx, 1
xor eax, eax
mov word [edx], ax
mov eax, ebx
lock xadd dword [0x4588f4], eax
inc eax
sub al, bl
mov dword [edx + 4], 0
movzx ecx, al
mov byte [edx + 2], al
mov dword [edx + 8], 0
mov dword [edx + 0xc], str.Type
cmp ecx, 0x100
jae 0x41ad39
mov dword [ecx*4 + 0x458d40], edx
lea ecx, [ebx + 0x27]
movzx eax, al
mov dword [0x4588f0], edx
mov word [edx - 8], ax
mov dword [edx + 4], ebx
call fcn.00412330
xor ecx, ecx
mov word [eax], cx
mov ecx, ebx
lock xadd dword [0x4588f4], ecx
inc ecx
dec cl
mov dword [eax + 4], 0
mov byte [eax + 2], cl
movzx ecx, cl
mov dword [eax + 8], 0
mov dword [eax + 0xc], str.Alloc
cmp ecx, 0x100
jae 0x41ad39
mov dword [ecx*4 + 0x458d40], eax
mov dword [0x4588ec], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x458940], eax
cmp eax, 0xffffffff
je 0x41ad44
call fcn.004126f0
test al, al
je 0x41ad44
mov edx, dword [0x4588f0]
lea ecx, [ebx + 0x27]
call fcn.00412330
mov ecx, ebx
mov word [eax], bx
lock xadd dword [0x4588f4], ecx
inc ecx
dec cl
mov dword [eax + 4], 0
movzx edx, cl
mov byte [eax + 2], cl
mov dword [eax + 8], 0x42cf40
mov dword [eax + 0xc], str.FileStream
cmp edx, 0x100
jae 0x41ad39
lea esi, [eax + 0x10]
mov dword [edx*4 + 0x458d40], eax
push esi
call dword [sym.imp.ntdll.dll_RtlInitializeSListHead]
mov edx, dword [0x4588f0]
lea ecx, [ebx + 0x27]
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0x10
mov dword [esi + 0x10], 0x30
call fcn.00412330
xor ecx, ecx
mov word [eax], cx
lock xadd dword [0x4588f4], ebx
inc ebx
dec bl
mov dword [eax + 4], ecx
movzx ecx, bl
mov byte [eax + 2], bl
mov dword [eax + 8], 0x416b10
mov dword [eax + 0xc], str.SymbolProvider
cmp ecx, 0x100
jae 0x41ad39
mov dword [ecx*4 + 0x458d40], eax
mov dword [0x458d24], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042d1c6
mov esp, ebp
pop ebp
ret 0xc
push 0xc0000001
call dword [sym.imp.ntdll.dll_RtlRaiseStatus]
mov ecx, dword [ebp - 8]
mov eax, 0xc0000001
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042d1c6
mov esp, ebp
pop ebp
ret 0xc