Function at 0x527810
Capabilities:
Allocate thread local storage
Encode data using xor
Get file size
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x5a9008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 0x48], eax
cmp dword [ebx + 4], edi
je 0x527861
mov eax, dword [esi + 0xc]
mov ecx, dword [ebx]
shr eax, 0xe
and eax, 1
mov edx, dword [eax*4 + 0x568dfc]
mov eax, dword [ebx + 8]
lea ecx, [eax + ecx*2]
nop
movzx eax, word [edx]
lea edx, [edx + 2]
mov word [ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x527850
push 0
push 0x80
push 4
push 0
push 3
push 0xc0000000
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x4c], eax
cmp ebx, 0xffffffff
jne 0x52788f
call eax
mov edi, eax
mov dword [esi + 4], ebx
test edi, edi
je 0x5278bf
cmp edi, 0x13
jne 0x5279bf
test dword [esi + 0xc], 0x20000
je 0x5279bf
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ef615
mov esp, ebp
pop ebp
ret
test dword [esi + 0xc], 0x200000
jne 0x527921
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [esi + 0x64], eax
cmp eax, 0xffffffff
jne 0x5278e3
call dword [ebp - 0x4c]
mov edi, eax
test edi, edi
jne 0x5279bf
or dword [esi + 0xc], 0x10000000
mov ecx, dword [0x5ad450]
cmp ecx, 0x40
jl 0x52790d
mov edi, 0xffff87bb
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ef615
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x64]
mov ebx, dword [esi + 4]
mov dword [ecx*4 + 0x5ad350], eax
inc ecx
mov dword [0x5ad450], ecx
push 0
push 1
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_LockFile]
test eax, eax
je 0x52793f
mov ebx, dword [ebp - 0x48]
mov dword [ebx], 1
jmp 0x52797d
lea eax, [ebp - 0x60]
mov dword [ebp - 0x50], 0
push eax
push 0
push 1
push 0
push 0
push dword [esi + 4]
xorps xmm0, xmm0
movups xmmword [ebp - 0x60], xmm0
call dword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
je 0x527971
mov ebx, dword [ebp - 0x48]
mov dword [ebx], 0
jmp 0x52797d
call dword [ebp - 0x4c]
mov edi, eax
test edi, edi
jne 0x5279bf
mov ebx, dword [ebp - 0x48]
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [esi + 0x18]
inc edi
shl edi, 6
cmp eax, edi
jge 0x5279d2
cmp dword [ebx], 0
jle 0x5279d2
push 0
push 0
push edi
lfence
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, edi
jne 0x5279ba
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x5279de
call dword [ebp - 0x4c]
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ef615
mov esp, ebp
pop ebp
ret
mov edi, eax
add eax, 0xffffff80
shr eax, 6
inc eax
mov dword [esi + 0x18], eax
push 0
push 0
push 0
push 4
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x48], eax
test eax, eax
je 0x5279ba
push 0
push edi
push 0
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
push dword [ebp - 0x48]
mov dword [esi + 0x34], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x34]
test eax, eax
je 0x5279ba
cmp dword [ebx], 0
jle 0x527b62
cmp dword [0x5ad474], 0
jne 0x527a73
push 1
push 0x5ad454
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
push 0x5ad454
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov dword [0x5ad468], 0xc
mov dword [0x5ad470], 0
mov dword [0x5ad46c], 0x5ad454
mov dword [0x5ad474], 1
lea eax, [ebp - 0x44]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x5279ba
mov eax, dword [ebp - 0x28]
lea edi, [ebp - 0x10]
mov dword [ebp - 0x10], eax
mov ecx, 0x84222325
mov eax, dword [ebp - 0x18]
mov ebx, 0xcbf29ce4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
movzx eax, byte [edi]
push 0x100
cdq
push 0x1b3
xor edx, ebx
xor eax, ecx
push edx
push eax
call fcn.005205d0
mov ecx, eax
inc edi
lea eax, [ebp - 4]
mov ebx, edx
cmp edi, eax
jb 0x527aa7
mov eax, dword [esi + 0x34]
push esi
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ebx
call fcn.00526fe0
mov ebx, dword [sym.imp.KERNEL32.dll_CreateMutexA]
lea edi, [esi + 0x98]
add esp, 4
mov byte [esi + 0xa2], 0x72
push edi
push 0
push 0x5ad468
call ebx
mov dword [esi + 0x90], eax
test eax, eax
je 0x5279ba
push edi
push 0
push 0x5ad468
mov byte [esi + 0xa2], 0x77
call ebx
mov dword [esi + 0x94], eax
test eax, eax
je 0x5279ba
mov eax, dword [esi + 0x34]
pop edi
mov dword [eax], 0xbeefc0de
mov eax, dword [esi + 0x34]
mov dword [eax + 4], 0x126002
mov eax, dword [esi + 0x34]
mov dword [eax + 8], 0
mov eax, dword [esi + 0x34]
pop esi
pop ebx
mov dword [eax + 0xc], 0
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ef615
mov esp, ebp
pop ebp
ret
cmp dword [eax], 0xbeefc0de
je 0x527b82
mov edi, 0xffff87b7
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ef615
mov esp, ebp
pop ebp
ret
cmp dword [eax + 4], 0x126002
je 0x527ba3
mov edi, 0xffff87b6
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ef615
mov esp, ebp
pop ebp
ret
call dword [ebp - 0x4c]
mov edi, eax
test edi, edi
je 0x527bba
cmp edi, 0xd
je 0x527bba
cmp edi, 0xb
jne 0x5279bf
push esi
call fcn.00526fe0
mov ebx, dword [sym.imp.KERNEL32.dll_OpenMutexA]
lea edi, [esi + 0x98]
add esp, 4
mov byte [esi + 0xa2], 0x72
push edi
push 0
push 0x100000
call ebx
mov dword [esi + 0x90], eax
test eax, eax
je 0x5279ba
push edi
push 0
push 0x100000
mov byte [esi + 0xa2], 0x77
call ebx
mov dword [esi + 0x94], eax
test eax, eax
je 0x5279ba
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ef615
mov esp, ebp
pop ebp
ret