Function at 0x41a470
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 [0x4bf6bc]
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 0x41a4d9
mov ecx, str.:memory:
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x41a4c1
test dl, dl
je 0x41a4bd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x41a4c1
add eax, 2
add ecx, 2
test dl, dl
jne 0x41a4a1
xor eax, eax
jmp 0x41a4c6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x41a4d9
mov dword [esp + 0x10], 0
mov ebx, 1
jmp 0x41a4e2
mov ebx, 1
mov dword [esp + 0x10], ebx
cmp dword [0x4c3c38], 0
je 0x41a4f8
cmp dword [0x4c3c44], 0
jg 0x41a646
push 0xc
call fcn.0047e6d7
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x41a530
add dword [0x4c3c44], ebx
mov dword [0x4c3c38], ebx
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0047bd9c
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 [0x4c3c48], eax
jne 0x41a56e
add dword [0x4c3c44], ebx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
sub dword [0x4c3c44], ebx
mov dword [0x4c38a4], eax
cmp eax, 0xffffffff
je 0x41a586
mov dword [0x4c3c48], ebx
jmp 0x41a573
mov eax, dword [0x4c38a4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x41a586
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x41a592
mov dword [esp + 0x18], 0x4ae50c
mov edi, dword [esp + 0x18]
cmp byte [edi + 4], 0
je 0x41a605
mov eax, dword [esp + 0x14]
test eax, eax
je 0x41a605
cmp dword [esp + 0x10], 0
jne 0x41a605
call fcn.00427af0
mov ebx, eax
test ebx, ebx
je 0x41a63d
mov edi, dword [edi + 8]
test edi, edi
je 0x41a5f7
lea ecx, [ecx]
mov eax, dword [edi]
mov edx, dword [eax + 0x4c]
mov ecx, ebx
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x41a5e7
test al, al
je 0x41a5e3
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x41a5e7
add ecx, 2
add edx, 2
test al, al
jne 0x41a5c7
xor eax, eax
jmp 0x41a5ec
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x41a660
mov edi, dword [edi + 0x44]
test edi, edi
jne 0x41a5c0
push ebx
call fcn.0047c501
add esp, 4
mov ebx, 1
cmp dword [0x4c3c38], 0
je 0x41a617
cmp dword [0x4c3c44], 0
jg 0x41a633
push 0x48
call fcn.0047e6d7
mov edi, eax
add esp, 4
test edi, edi
jne 0x41a68c
add dword [0x4c3c44], ebx
mov dword [0x4c3c38], ebx
mov edx, dword [esp + 0xc]
mov dword [edx], 0
push esi
call fcn.0047c501
add esp, 4
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0047bd9c
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.0047c501
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0047bd9c
mov esp, ebp
pop ebp
ret
push 0x48
push 0
push edi
call fcn.00483260
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0x10]
add esp, 0xc
push eax
mov edx, edi
call fcn.00439460
mov ebx, eax
xor ecx, ecx
add esp, 4
cmp ebx, ecx
je 0x41a6f7
mov eax, dword [edi]
cmp eax, ecx
je 0x41a6c4
mov esi, eax
call fcn.00439ac0
mov esi, dword [esp + 0x1c]
push edi
call fcn.0047c501
add esp, 4
push esi
call fcn.0047c501
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.0047bd9c
mov esp, ebp
pop ebp
ret
mov dword [esi + 4], edi
mov edx, dword [edi]
mov dword [edx + 0xac], 0x41a410
mov eax, dword [edi]
mov dword [eax + 0xb0], 0x41a440
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.00483260
add esp, 0xc
cmp byte [esi + 0x11], 0
jne 0x41a75e
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 0x41a7c2
mov ecx, 0x8000
cmp ax, cx
ja 0x41a7c2
movzx eax, ax
lea edx, [eax - 1]
test eax, edx
jne 0x41a7c2
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.004193c0
test eax, eax
setne al
mov byte [edi + 0x12], al
jmp 0x41a7ea
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 0x41a7e8
cmp dword [esp + 0x10], 0
jne 0x41a7e8
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 0x41a801
mov dword [ecx + 0x30], eax
mov eax, dword [esp + 0x18]
cmp byte [eax + 4], 0
je 0x41a827
cmp dword [esp + 0x14], 0
je 0x41a827
cmp dword [esp + 0x10], 0
jne 0x41a827
mov ecx, dword [eax + 8]
mov dword [edi + 0x44], ecx
call fcn.00419340
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.0047bd9c
mov esp, ebp
pop ebp
ret