Function at 0x528b70
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
mov eax, edx
mov dword [esp + 0x14], eax
push edi
mov dword [esp + 0x14], esi
mov ecx, dword [esi + 4]
mov dword [eax], 0
movzx eax, byte [ecx + 0xe04]
mov edx, dword [ecx + 0x38]
movzx ecx, byte [ecx + 0xe05]
movzx edi, word [eax*2 + 0x5be250]
mov eax, edi
shl edi, 8
shr eax, 8
xor ecx, eax
movzx eax, di
movzx ecx, word [ecx*2 + 0x5be250]
xor ecx, eax
mov eax, dword [edx + 0x10]
mov dword [edx + 0x18], ecx
mov ecx, esi
mov dword [edx + 0x1c], eax
mov eax, dword [edx + 0x14]
mov dword [edx + 0x20], eax
call fcn.00528f80
test eax, eax
je 0x528f5a
mov eax, dword [esi]
cmp dword [eax], 2
je 0x528f6c
mov edx, dword [esi + 4]
mov ecx, esi
push dword [edx + 0x478]
mov edx, dword [edx + 0x470]
call fcn.005275a0
add esp, 4
test eax, eax
je 0x528f5a
mov eax, dword [esi + 4]
xor edi, edi
mov ebx, dword [esp + 0x20]
cmp dword [eax + 0x478], edi
jbe 0x528c87
nop word [eax + eax]
mov ecx, dword [eax + 0x480]
mov eax, dword [eax + 0x47c]
sub eax, 1
je 0x528c54
sub eax, 1
je 0x528c48
sub eax, 1
jne 0x528c5a
lea eax, [ecx + 1]
cmp edi, 1
cmovne eax, ecx
mov ecx, eax
jmp 0x528c5a
lea eax, [ecx + 1]
test edi, edi
cmovne eax, ecx
mov ecx, eax
jmp 0x528c5a
cmp edi, 1
jne 0x528c5a
inc ecx
push ebx
push ecx
mov edx, edi
mov ecx, esi
call fcn.005296a0
add esp, 8
test eax, eax
je 0x528f5a
mov eax, dword [esi]
cmp dword [eax], 2
je 0x528f6c
mov eax, dword [esi + 4]
inc edi
cmp edi, dword [eax + 0x478]
jb 0x528c20
mov ecx, dword [eax + 0x38]
mov edx, dword [ecx + 0x14]
and edx, 7
je 0x528cdf
mov eax, 8
mov dword [esp + 0x10], 0
sub eax, edx
lea edx, [esp + 0x10]
push eax
call fcn.0052b130
add esp, 4
test eax, eax
je 0x528f5a
cmp dword [esp + 0x10], 0
je 0x528cdf
mov eax, dword [esi + 4]
cmp dword [eax + 0xe30], 0
jne 0x528cd7
push dword [eax + 0x30]
mov eax, dword [eax + 0x20]
push 0
push esi
call eax
add esp, 0xc
mov eax, dword [esi]
mov dword [eax], 2
mov eax, dword [esi]
cmp dword [eax], 2
je 0x528f6c
mov eax, dword [esi + 4]
mov edi, dword [eax + 0x38]
mov ecx, edi
call fcn.0052ae10
mov ebp, dword [edi + 0x14]
test ebp, ebp
je 0x528d4c
mov ecx, dword [edi + 0x10]
mov eax, dword [edi]
mov edx, dword [edi + 0x20]
mov eax, dword [eax + ecx*4]
cmp edx, ebp
jae 0x528d4c
mov ebx, dword [edi + 0x18]
mov esi, eax
mov ecx, 0x18
mov eax, esi
sub ecx, edx
add edx, 8
shr eax, cl
movzx ecx, al
mov eax, ebx
shr eax, 8
xor ecx, eax
movzx ebx, bl
shl ebx, 8
movzx ecx, word [ecx*2 + 0x5be250]
xor ebx, ecx
cmp edx, ebp
jb 0x528d12
mov esi, dword [esp + 0x14]
mov dword [edi + 0x18], ebx
mov ebx, dword [esp + 0x20]
mov dword [edi + 0x20], edx
mov ecx, dword [esi + 4]
lea edx, [esp + 0x14]
movzx edi, word [edi + 0x18]
push 0x10
mov ecx, dword [ecx + 0x38]
call fcn.0052b130
add esp, 4
test eax, eax
je 0x528f5a
cmp edi, dword [esp + 0x14]
jne 0x528e54
test ebx, ebx
je 0x528e4f
mov ecx, dword [esi + 4]
mov eax, dword [ecx + 0x47c]
sub eax, 1
je 0x528e22
sub eax, 1
je 0x528def
sub eax, 1
jne 0x528e4f
xor ebx, ebx
cmp dword [ecx + 0x470], ebx
jbe 0x528e4f
nop dword [eax]
mov ecx, dword [esi + 4]
mov eax, dword [ecx + 0x40]
mov edx, dword [eax + ebx*4]
mov edi, edx
mov eax, dword [ecx + 0x3c]
and edi, 1
lea ecx, [eax + ebx*4]
mov eax, dword [ecx]
add eax, eax
or edi, eax
lea eax, [edx + edi]
sub edi, edx
sar eax, 1
mov dword [ecx], eax
mov eax, dword [esi + 4]
sar edi, 1
mov eax, dword [eax + 0x40]
mov dword [eax + ebx*4], edi
inc ebx
mov eax, dword [esi + 4]
cmp ebx, dword [eax + 0x470]
jb 0x528db0
jmp 0x528ead
xor edi, edi
cmp dword [ecx + 0x470], edi
jbe 0x528e4f
nop dword [eax]
mov edx, dword [esi + 4]
mov eax, dword [edx + 0x3c]
lea ecx, [eax + edi*4]
mov eax, dword [edx + 0x40]
mov eax, dword [eax + edi*4]
inc edi
add dword [ecx], eax
mov eax, dword [esi + 4]
cmp edi, dword [eax + 0x470]
jb 0x528e00
jmp 0x528ead
xor edi, edi
cmp dword [ecx + 0x470], edi
jbe 0x528e4f
nop dword [eax]
mov edx, dword [esi + 4]
mov eax, dword [edx + 0x40]
lea ecx, [eax + edi*4]
mov eax, dword [edx + 0x3c]
mov eax, dword [eax + edi*4]
inc edi
sub eax, dword [ecx]
mov dword [ecx], eax
mov eax, dword [esi + 4]
cmp edi, dword [eax + 0x470]
jb 0x528e30
mov eax, dword [esi + 4]
jmp 0x528ead
mov ecx, dword [esi + 4]
cmp dword [ecx + 0xe30], 0
jne 0x528e71
push dword [ecx + 0x30]
mov eax, dword [ecx + 0x20]
push 2
push esi
call eax
mov ecx, dword [esi + 4]
add esp, 0xc
mov eax, ecx
test ebx, ebx
je 0x528ead
xor ebx, ebx
cmp dword [ecx + 0x478], ebx
jbe 0x528ead
lea edi, [ebx + 0x3c]
mov ecx, dword [esi + 4]
mov eax, dword [ecx + 0x470]
shl eax, 2
push eax
push 0
push dword [edi + ecx]
call fcn.00582b3f
mov eax, dword [esi + 4]
lea edi, [edi + 4]
inc ebx
add esp, 0xc
cmp ebx, dword [eax + 0x478]
jb 0x528e84
mov ecx, dword [esp + 0x18]
mov dword [ecx], 1
mov ecx, dword [eax + 0xe8]
test ecx, ecx
je 0x528eca
mov dword [eax + 0xe4], ecx
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x478]
mov ecx, dword [esi]
mov dword [ecx + 8], eax
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [eax + 0x47c]
mov dword [ecx + 0xc], eax
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [eax + 0x480]
mov dword [ecx + 0x10], eax
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [eax + 0x474]
mov dword [ecx + 0x14], eax
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [eax + 0x470]
mov dword [ecx + 0x18], eax
xor ecx, ecx
mov edx, dword [esi + 4]
mov eax, dword [edx + 0x470]
add eax, dword [edx + 0x488]
adc ecx, dword [edx + 0x48c]
cmp dword [esp + 0x20], 0
mov dword [edx + 0xf0], eax
mov dword [edx + 0xf4], ecx
je 0x528f64
mov edx, dword [esi + 4]
mov ecx, esi
lea eax, [edx + 0x3c]
add edx, 0x470
push eax
call fcn.0052a450
add esp, 4
test eax, eax
je 0x528f64
mov eax, dword [esi]
mov dword [eax], 7
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, dword [esi]
mov dword [eax], 2
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xc
ret