Function at 0x52c780
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x50]
mov eax, dword [edi]
mov esi, ecx
mov dword [esi + 0xb4], eax
mov ecx, dword [edi + 4]
mov dword [esi + 0xb8], ecx
call fcn.004c9510
mov edx, dword [esi + 0xb4]
mov ecx, eax
lea eax, [ecx + edx - 1]
xor edx, edx
div ecx
xor edx, edx
lea ebx, [esi + 0xfc]
imul eax, ecx
mov dword [esi + 0xb4], eax
mov eax, dword [esi + 0xb8]
lea eax, [eax + ecx - 1]
div ecx
imul eax, ecx
mov ecx, ebx
mov dword [esi + 0xb8], eax
call fcn.0052bc80
xor ebp, ebp
mov dword [ebx], ebp
mov dword [ebx + 4], ebp
mov dword [ebx + 8], ebp
mov eax, dword [esi + 0xe4]
cmp eax, ebp
lea ebx, [esi + 0xdc]
je 0x52c808
push ebp
push 0xfffffffffffffffe
push str.._AVTerrainVertex__
push eax
call sub.Storm.dll_Ordinal_403
mov dword [ebx], ebp
mov dword [ebx + 4], ebp
mov dword [ebx + 8], ebp
mov ecx, dword [esi + 0xb8]
mov edx, dword [esi + 0xb4]
add ecx, 1
add edx, 1
imul ecx, edx
push ecx
mov ecx, ebx
call fcn.005295a0
mov eax, dword [esi + 0xb4]
test eax, eax
fild dword [esi + 0xb4]
jge 0x52c843
fadd dword [0x799d08]
fld qword [0x7a45f8]
mov ebp, dword [esi + 0xb8]
fmul st(1), st(0)
mov ecx, ebp
test ecx, ecx
fld qword [0x7bb000]
mov dword [esp + 0x34], ecx
fmul st(2), st(0)
fxch st(2)
fstp dword [esp + 0x3c]
fild dword [esp + 0x34]
jge 0x52c873
fadd dword [0x799d08]
mov eax, dword [edi + 0x14]
fmul st(1)
mov cl, byte [edi + 0x10]
xor edx, edx
xor ebx, ebx
fmulp st(2)
test eax, eax
fxch st(1)
setne dl
fstp dword [esp + 0x40]
mov byte [esp + 0x11], cl
fldz
fstp dword [esp + 0x18]
test edx, edx
mov dword [esp + 0x30], edx
je 0x52c8ce
movzx edx, cl
add edx, eax
cmp edx, dword [esi + 0x988]
jle 0x52c8b1
sub cl, al
mov byte [esp + 0x11], cl
movzx edx, cl
add edx, eax
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fmul dword [0x83cf50]
fadd dword [0x861cac]
fstp dword [esp + 0x18]
xor eax, eax
add ebp, 1
mov dword [esp + 0x1c], eax
je 0x52cb6f
fld qword [0x7bad30]
fld qword [0x7ba0d8]
fld qword [0x7bad40]
fld qword [0x7bad38]
mov edx, dword [esi + 0xb4]
xor ebp, ebp
add edx, 1
je 0x52cb4f
test eax, eax
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
jge 0x52c918
fadd dword [0x799d08]
fmulp st(5)
lea edi, [ebx*8]
fld dword [esp + 0x40]
sub edi, ebx
fnstcw word [esp + 0x12]
add edi, edi
movzx eax, word [esp + 0x12]
faddp st(5)
fxch st(4)
or eax, 0xc00
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
faddp st(3)
fxch st(2)
fmulp st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
mov dword [esp + 0x14], eax
fldcw word [esp + 0x14]
fistp qword [esp + 0x34]
mov eax, dword [esp + 0x34]
shl eax, 0xe
mov dword [esp + 0x28], eax
fldcw word [esp + 0x12]
fldz
fadd st(1)
fnstcw word [esp + 0x12]
fmul st(2)
movzx eax, word [esp + 0x12]
or eax, 0xc00
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
mov dword [esp + 0x14], eax
fldcw word [esp + 0x14]
fistp qword [esp + 0x34]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
mov al, cl
fldcw word [esp + 0x12]
and al, 0xf
mov byte [esp + 0x12], al
fadd dword [esp + 0x18]
fmulp st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
or eax, 0xc00
mov dword [esp + 0x20], eax
fldcw word [esp + 0x20]
fistp qword [esp + 0x34]
mov eax, dword [esp + 0x34]
shl eax, 0x12
mov dword [esp + 0x34], eax
fldcw word [esp + 0x14]
add edi, edi
jmp 0x52c9e9
fstp st(2)
fstp st(1)
fstp st(0)
mov ecx, dword [esi + 0xe4]
add ecx, edi
push ecx
mov ecx, esi
call fcn.005fddf0
mov eax, dword [esi + 0xe4]
mov edx, dword [eax + edi + 4]
add eax, edi
and edx, 0xfffc0000
or edx, ebx
mov dword [eax + 4], edx
mov ecx, dword [esi + 0xe4]
mov eax, ebp
add ecx, edi
test eax, eax
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
jge 0x52ca2c
fadd dword [0x799d08]
fld qword [0x7a45f8]
fmul st(1), st(0)
fld dword [esp + 0x3c]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
faddp st(2)
fxch st(1)
or eax, 0xc00
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fld qword [0x7bad30]
fadd st(1), st(0)
fld qword [0x7ba0d8]
fmul st(2), st(0)
fxch st(2)
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
mov dword [esp + 0x20], eax
fldcw word [esp + 0x20]
mov eax, dword [ecx]
and eax, 0x7fffff
fistp qword [esp + 0x20]
mov edx, dword [esp + 0x20]
shl edx, 0x17
or edx, eax
mov dword [ecx], edx
fldcw word [esp + 0x14]
mov eax, dword [esi + 0xe4]
mov ecx, dword [eax + edi]
add eax, edi
and ecx, 0xff803fff
or ecx, dword [esp + 0x28]
mov dword [eax], ecx
mov eax, dword [esi + 0xe4]
mov edx, dword [eax + edi]
add eax, edi
and edx, 0xffffc000
or edx, dword [esp + 0x2c]
mov dword [eax], edx
mov eax, dword [esi + 0xe4]
mov cl, byte [eax + edi + 0xa]
add eax, edi
and cl, 0xf0
or cl, byte [esp + 0x12]
cmp dword [esp + 0x30], 0
mov byte [eax + 0xa], cl
je 0x52caeb
mov edx, dword [esi + 0xe4]
or word [edi + edx + 0xc], 0x10
lea eax, [edi + edx + 0xc]
jmp 0x52cafc
mov eax, dword [esi + 0xe4]
and word [edi + eax + 0xc], 0xffef
lea eax, [edi + eax + 0xc]
mov eax, dword [esi + 0xe4]
mov ecx, dword [eax + edi + 4]
add eax, edi
and ecx, 0x3ffff
or ecx, dword [esp + 0x34]
add ebp, 1
mov dword [eax + 4], ecx
mov edx, dword [esi + 0xb4]
add edx, 1
add ebx, 1
add edi, 0x1c
cmp ebp, edx
jb 0x52c9e3
fld qword [0x7bad38]
mov eax, dword [esp + 0x1c]
fld qword [0x7bad40]
mov cl, byte [esp + 0x11]
mov edi, dword [esp + 0x50]
fxch st(2)
fxch st(3)
fxch st(2)
fxch st(1)
mov edx, dword [esi + 0xb8]
add eax, 1
add edx, 1
cmp eax, edx
mov dword [esp + 0x1c], eax
jb 0x52c8f5
fstp st(1)
fstp st(0)
fstp st(2)
fstp st(0)
mov ecx, dword [esi + 0x81c]
fstp st(0)
mov dword [esi + 0x1cc], 0
mov eax, dword [edi + 8]
push eax
call fcn.004f4ea0
mov ecx, esi
mov byte [esi + 0x1d0], al
push eax
call fcn.00592e20
mov ecx, esi
call fcn.005db020
push 1
mov ecx, esi
call fcn.005e7310
mov ecx, esi
call fcn.005dd6a0
push 2
mov ecx, esi
call fcn.005a5f30
or dword [esi + 0x970], 8
push 8
mov ecx, esi
call fcn.00527ff0
push 0xffffffffffffffff
push 0xffffffffffffffff
xor ebp, ebp
push ebp
push ebp
mov ecx, esi
call fcn.00528d50
mov ecx, esi
call fcn.005dba00
cmp dword [esi + 0xe0], ebp
mov dword [esp + 0x50], ebp
jbe 0x52cc3d
lea ebx, [ebx]
mov eax, dword [esi + 0xe4]
movzx ecx, byte [eax + ebp + 8]
xor cl, byte [edi + 0xc]
add eax, ebp
and cl, 0xf
xor byte [eax + 8], cl
mov edx, dword [edi + 0xc]
mov ebx, dword [esi + 0xe4]
push edx
mov ecx, esi
add ebx, ebp
call fcn.00591710
movzx ecx, byte [ebx + 9]
xor cl, al
mov eax, dword [esp + 0x50]
and cl, 0x1f
xor byte [ebx + 9], cl
add eax, 1
add ebp, 0x1c
cmp eax, dword [esi + 0xe0]
mov dword [esp + 0x50], eax
jb 0x52cbf0
xor ebp, ebp
mov ecx, esi
call fcn.00557a90
mov ecx, esi
call fcn.005a3590
mov ecx, esi
call fcn.005a4e30
mov ecx, esi
call fcn.00552820
mov ecx, esi
call fcn.005e43c0
cmp dword [edi + 0x18], ebp
je 0x52cca4
mov eax, dword [0x7bac90]
mov edx, dword [0x7bac8c]
mov ecx, dword [0x7bac94]
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], edx
mov edx, dword [0x7bac98]
lea eax, [esp + 0x3c]
mov dword [esp + 0x44], ecx
push eax
mov ecx, esi
mov dword [esp + 0x4c], edx
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], ebp
call fcn.005800b0
push 0xffffffffffffffff
push 1
mov ecx, esi
call fcn.00580c10
mov ecx, esi
call fcn.005dbcc0
mov ecx, esi
call fcn.005dde70
pop edi
mov dword [esi + 0x938], ebp
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 4