Function at 0x40a390
Capabilities:
Encode data using xor
Get thread local storage value
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4abb7b
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x4d5104]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x38], edi
push dword [0x518c04]
mov ecx, 0x8f4
lea eax, [edi + 0x864]
test edi, edi
cmove eax, ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [eax]
mov esi, dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40a3ff
nop word [eax + eax]
cmp dword [eax], esi
je 0x40a5ad
mov eax, dword [eax + 8]
test eax, eax
jne 0x40a3f0
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov dword [ebp - 4], 0
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x54], edx
test edi, edi
mov dword [ebp - 0x70], edi
lea ecx, [edi + 0x438]
mov dword [ebp - 0x5c], 0
mov eax, 0x4c8
mov dword [ebp - 0x58], 0
cmove ecx, eax
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x74], ecx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x88], ecx
mov dword [ebp - 0x84], edi
mov dword [ebp - 0x6c], 0
mov eax, dword [eax]
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x78], edx
mov esi, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], eax
xorps xmm0, xmm0
mov byte [ebp - 0x8b], 0
movups xmmword [ebp - 0x28], xmm0
mov byte [ebp - 0x27], 1
movq qword [ebp - 0x18], xmm0
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x14], edx
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
push eax
push 0x38
mov dword [ebp - 0x50], eax
call fcn.0042b1e0
mov edx, eax
add esp, 4
mov dword [edx + 0x14], 0
mov dword [edx + 0x18], 0x41ae00
mov dword [edx], 0
mov dword [edx + 4], 0
mov dword [edx + 8], 0
mov dword [edx + 0xc], 0
mov dword [edx + 0x10], 0
mov dword [edx + 0x1c], 0
mov cl, byte [ebp - 0x27]
mov byte [edx + 0x21], cl
mov ecx, esi
mov eax, dword [ebp - 0x24]
mov byte [ebp - 0x27], 0
mov dword [edx + 0x24], eax
mov eax, dword [ebp - 0x20]
mov dword [edx + 0x28], eax
mov dword [edx + 0x2c], 0
mov dword [edx + 0x30], 0
mov eax, dword [ebp - 0x1c]
mov dword [edx + 0x2c], eax
mov eax, dword [ebp - 0x18]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [edx + 0x34], eax
lea eax, [ebp - 0x2c]
push edx
push eax
call fcn.0042b060
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
call fcn.0041ac70
mov byte [ebp - 4], 5
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x40a590
or edi, 0xffffffff
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x40a590
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x40a590
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a8e74
mov esp, ebp
pop ebp
ret 4
cmp dword [eax + 4], 0
je 0x40a3ff
push dword [ebp + 8]
lea ecx, [ebp - 0x28]
call fcn.0040e310
cmp dword [ebp - 0x14], 0x10
lea edi, [ebp - 0x28]
mov esi, dword [ebp - 0x18]
mov edx, 0x811c9dc5
cmovae edi, dword [ebp - 0x28]
xor ecx, ecx
test esi, esi
je 0x40a5f1
nop dword [eax + eax]
movzx eax, byte [ecx + edi]
inc ecx
xor eax, edx
imul edx, eax, 0x1000193
cmp ecx, esi
jb 0x40a5e0
mov edi, dword [ebp - 0x38]
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0xc]
and eax, edx
mov edi, dword [edi + 4]
mov edx, dword [ecx + eax*8]
lea eax, [eax*8 + 4]
add eax, ecx
mov dword [ebp - 0x3c], edx
mov esi, edx
mov dword [ebp - 0x40], eax
cmp edx, edi
jne 0x40a61b
mov eax, edi
jmp 0x40a61f
mov eax, dword [eax]
mov eax, dword [eax]
cmp esi, eax
je 0x40a68b
cmp dword [ebp - 0x14], 0x10
lea ecx, [esi + 8]
mov edx, dword [ecx + 0x10]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], edx
mov edx, dword [ecx + 0x14]
cmp edx, 0x10
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp - 0x34]
jb 0x40a647
mov ecx, dword [ecx]
push dword [ebp - 0x18]
push eax
call fcn.0042cb50
add esp, 8
test al, al
jne 0x40a661
mov esi, dword [esi]
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x40]
jmp 0x40a613
cmp dword [ebp - 0x2c], 0x10
lea eax, [esi + 8]
jb 0x40a66c
mov eax, dword [eax]
cmp dword [ebp - 0x14], 0x10
lea ecx, [ebp - 0x28]
push dword [ebp - 0x34]
cmovae ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x18]
push eax
call fcn.0042cb50
add esp, 8
test al, al
cmovne edi, esi
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x40a6bd
mov ecx, dword [ebp - 0x28]
lea edx, [eax + 1]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a6b3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a710
push edx
push ecx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 8
mov esi, dword [ebp - 0x38]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp edi, dword [esi + 4]
je 0x40a590
mov eax, dword [edi + 0x20]
mov byte [eax + 0x70], 1
mov eax, dword fs:[0x2c]
mov ecx, dword [edi + 0x20]
mov eax, dword [eax]
add eax, 4
push eax
lea eax, [ecx + 0x20]
mov ecx, dword [ecx + 0x18]
push eax
call fcn.004364a0
push edi
lea eax, [ebp - 0x2c]
mov ecx, esi
push eax
call fcn.0040e5d0
jmp 0x40a590
call fcn.004a1b50
int3