Function at 0x524cd0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
cmp dword [ebp + 0x2c], 0
mov eax, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x18]
mov ecx, dword [eax]
mov esi, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x24], ecx
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x38]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
movsx ecx, word [eax + edx*2]
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], edx
lea eax, [ecx + eax*8]
mov dword [ebp - 0x14], eax
je 0x524d42
cmp edi, 2
jne 0x524d42
mov edx, dword [ebp + 0x1c]
lea esi, [edi*2 - 1]
mov ecx, eax
sar ecx, 1
sub ecx, 0x10
mov edx, dword [edx]
mov dword [ebp + 0x28], edx
jmp 0x524d66
mov edx, dword [ebp + 0x1c]
lea esi, [edi*2 - 1]
mov ecx, eax
sar ecx, 1
sub ecx, 4
cmp dword [ebp + 0x2c], 0
mov edx, dword [edx]
mov dword [ebp + 0x28], edx
je 0x524d67
mov dword [ebp + 0x28], edx
cmp edi, 2
jne 0x524d67
dec esi
mov eax, esi
imul eax, ecx
add eax, edx
cdq
idiv esi
mov edx, dword [ebp + 0x28]
sub edx, dword [ebp - 0x14]
add edx, 0xffffffe0
cmp edx, eax
cmovge edx, eax
mov eax, 0x40
cmp edx, eax
cmovg edx, eax
cmp edx, 4
jge 0x524d98
mov esi, 1
mov dword [ebp + 0x28], esi
jmp 0x524dd7
mov eax, edx
mov ecx, 0xe
and edx, 7
sar eax, 3
sub cl, al
movsx esi, word [edx*2 + 0x60beb8]
sar esi, cl
inc esi
and esi, 0xfffffffe
mov dword [ebp + 0x28], esi
cmp esi, 0x100
jle 0x524dd7
push 0x29d
push str.D:UsersphiliDropboxDevelopmentlibcodecsopuscelt_bands.c
push str.assertion_failed:_qn___256
call fcn.00504d50
add esp, 0xc
mov ecx, dword [ebp + 0x2c]
mov eax, 1
test ecx, ecx
je 0x524def
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0x24]
cmovge esi, eax
mov dword [ebp + 0x28], esi
cmp dword [ebp - 0x10], 0
je 0x524e0e
mov eax, dword [ebp + 8]
push dword [eax + 0x2c]
push edi
push ecx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.00537ef0
add esp, 0x14
mov dword [ebp - 0xc], eax
push dword [ebp - 4]
call fcn.005349a0
add esp, 4
mov dword [ebp - 0x14], eax
cmp esi, 1
je 0x5251e2
cmp dword [ebp - 0x10], 0
je 0x524f31
mov edx, dword [ebp + 0x2c]
mov eax, dword [ebp + 8]
test edx, edx
je 0x524e8f
mov ecx, dword [eax + 0x30]
mov dword [ebp + 8], ecx
test ecx, ecx
je 0x524e8f
mov ecx, dword [ebp - 0xc]
mov eax, 0x7fff
cmp ecx, 0x2000
jg 0x524e58
mov eax, 0xffff8001
cdq
lea edi, [esi - 1]
idiv esi
mov edx, esi
imul edx, ecx
add edx, eax
xor eax, eax
sar edx, 0xe
test edx, edx
cmovns eax, edx
cmp edi, eax
jl 0x524e7c
xor eax, eax
mov edi, edx
test edx, edx
cmovs edi, eax
cmp dword [ebp + 8], 0
mov eax, dword [ebp + 0x2c]
jl 0x524f48
inc edi
jmp 0x524f48
mov edi, esi
imul edi, dword [ebp - 0xc]
add edi, 0x2000
sar edi, 0xe
test edx, edx
jne 0x524f46
cmp dword [eax + 0x38], edx
je 0x525003
test edi, edi
jle 0x525003
cmp edi, esi
jge 0x525003
mov eax, edi
shl eax, 0xe
div esi
movzx esi, ax
push esi
call fcn.00524af0
add esp, 4
cwde
push eax
mov eax, 0x4000
sub eax, esi
push eax
call fcn.00524af0
add esp, 4
cwde
push eax
call fcn.00524b50
mov esi, dword [ebp + 0x28]
add esp, 8
movsx ecx, ax
mov eax, dword [ebp + 0x18]
shl eax, 7
add eax, 0xffffff80
cwde
imul ecx, eax
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
add ecx, 0x4000
sar ecx, 0xf
cmp ecx, eax
jle 0x524f1d
mov eax, dword [ebp + 0x2c]
mov edi, esi
jmp 0x525005
neg eax
cmp ecx, eax
mov eax, dword [ebp + 0x2c]
jge 0x525005
xor edi, edi
jmp 0x525005
mov eax, dword [ebp - 0xc]
mov edi, eax
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x525005
jmp 0x524f48
mov eax, edx
cmp dword [ebp + 0x18], 2
jle 0x525005
mov eax, esi
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
cmp dword [ebp - 0x10], 0
mov dword [ebp + 8], ecx
lea eax, [ecx + 1]
lea eax, [eax + eax*2]
lea edx, [eax + ecx]
mov dword [ebp + 0x28], edx
je 0x524fa8
sub eax, ecx
cmp edi, ecx
jg 0x524f8f
lea eax, [edi + edi*2]
push edx
lea ecx, [eax + 3]
push ecx
push eax
push dword [ebp - 4]
call fcn.00530420
add esp, 0x10
jmp 0x52511c
push edx
lea ecx, [eax + edi]
push ecx
lea eax, [ecx - 1]
push eax
push dword [ebp - 4]
call fcn.00530420
add esp, 0x10
jmp 0x52511c
push edx
push dword [ebp - 4]
call fcn.00537420
mov edx, eax
add esp, 8
mov eax, dword [ebp + 8]
lea ecx, [eax + 1]
lea ecx, [ecx + ecx*2]
cmp edx, ecx
jge 0x524fd4
mov eax, 0x55555556
imul edx
mov eax, dword [ebp + 8]
mov edi, edx
shr edi, 0x1f
jmp 0x524fd9
sub edx, ecx
lea edi, [eax + 1]
add edi, edx
sub ecx, eax
cmp edi, eax
jg 0x524fe9
lea eax, [edi + edi*2]
lea ecx, [eax + 3]
jmp 0x524fee
add ecx, edi
lea eax, [ecx - 1]
push dword [ebp + 0x28]
push ecx
push eax
push dword [ebp - 4]
call fcn.005373d0
add esp, 0x10
jmp 0x52511c
mov eax, edx
cmp dword [ebp + 0x24], 1
jg 0x5250f7
test eax, eax
jne 0x5250f7
mov eax, esi
sar eax, 1
mov dword [ebp + 0x28], eax
lea ecx, [eax + 1]
mov edx, ecx
mov dword [ebp - 0x24], ecx
imul edx, ecx
cmp dword [ebp - 0x10], 0
mov dword [ebp + 8], edx
je 0x525072
cmp edi, eax
jg 0x525043
lea edx, [edi + 1]
imul edx, edi
lea eax, [edi + 1]
sar edx, 1
jmp 0x52505b
mov eax, esi
sub eax, edi
lea ecx, [eax + 1]
mov dword [ebp + 0x28], ecx
lea ecx, [eax + 2]
inc eax
imul ecx, eax
mov eax, dword [ebp + 0x28]
sar ecx, 1
sub edx, ecx
push dword [ebp + 8]
add eax, edx
push eax
push edx
push dword [ebp - 4]
call fcn.00530420
add esp, 0x10
jmp 0x52511c
push edx
push dword [ebp - 4]
call fcn.00537420
mov ecx, dword [ebp + 0x28]
mov edx, eax
imul ecx, dword [ebp - 0x24]
add esp, 8
sar ecx, 1
cmp edx, ecx
jge 0x5250ae
lea eax, [edx*8 + 1]
push eax
call fcn.00524630
add esp, 4
lea edi, [eax - 1]
shr edi, 1
lea edx, [edi + 1]
mov ecx, edx
imul ecx, edi
sar ecx, 1
jmp 0x5250e2
mov eax, dword [ebp + 8]
sub eax, edx
lea eax, [eax*8 - 7]
push eax
call fcn.00524630
mov ecx, dword [ebp + 8]
lea edi, [esi*2 + 2]
sub edi, eax
add esp, 4
shr edi, 1
mov eax, esi
sub eax, edi
lea edx, [eax + 1]
add eax, 2
imul eax, edx
sar eax, 1
sub ecx, eax
push dword [ebp + 8]
lea eax, [ecx + edx]
push eax
push ecx
push dword [ebp - 4]
call fcn.005373d0
add esp, 0x10
jmp 0x52511c
cmp dword [ebp - 0x10], 0
lea eax, [esi + 1]
push eax
je 0x52510f
push edi
push dword [ebp - 4]
call fcn.005302d0
add esp, 0xc
jmp 0x52511c
push dword [ebp - 4]
call fcn.00537260
add esp, 8
mov edi, eax
test edi, edi
jns 0x525137
push 0x346
push str.D:UsersphiliDropboxDevelopmentlibcodecsopuscelt_bands.c
push str.assertion_failed:_itheta_0
call fcn.00504d50
add esp, 0xc
shl edi, 0xe
xor edx, edx
mov eax, edi
div esi
cmp dword [ebp - 0x10], 0
mov esi, eax
mov dword [ebp - 0xc], esi
je 0x5253a3
cmp dword [ebp + 0x2c], 0
je 0x5253a3
mov eax, dword [ebp + 0x10]
push dword [ebp + 0x18]
test esi, esi
jne 0x525192
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push dword [ebp + 0x14]
push eax
push dword [ebp - 0x20]
call fcn.005258e0
push dword [ebp - 4]
call fcn.005349a0
mov edx, eax
add esp, 0x1c
mov eax, dword [ebp + 0x1c]
sub edx, dword [ebp - 0x14]
mov dword [ebp + 0x2c], edx
sub dword [eax], edx
jmp 0x5253c1
push dword [ebp + 0x14]
push eax
call fcn.005284e0
push dword [ebp - 4]
call fcn.005349a0
mov edx, eax
add esp, 0x10
mov eax, dword [ebp + 0x1c]
sub edx, dword [ebp - 0x14]
mov dword [ebp + 0x2c], edx
sub dword [eax], edx
cmp esi, 0x4000
jne 0x5253e2
mov ecx, dword [ebp + 0x20]
mov edx, 1
mov eax, dword [ebp + 0x30]
xor esi, esi
shl edx, cl
mov edi, 0x7fff
dec edx
shl edx, cl
mov ecx, 0x4000
and dword [eax], edx
jmp 0x5254b3
cmp dword [ebp + 0x2c], 0
je 0x5253a0
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x525338
cmp dword [ebp - 0xc], 0x2000
jle 0x525314
mov eax, dword [ebp + 8]
cmp dword [eax + 0x34], 0
jne 0x525314
movaps xmm2, xmmword [0x560cb0]
xor ecx, ecx
mov dword [ebp - 8], 1
test edi, edi
jle 0x5252b7
mov dword [ebp - 8], 1
cmp edi, 2
jb 0x5252bb
mov edx, dword [ebp + 0x14]
mov dword [ebp - 8], 1
cmp edi, 0x10
jb 0x52529e
mov esi, edi
mov dword [ebp - 8], 1
and esi, 0xfffffff0
lea eax, [edx + 0x20]
nop word [eax + eax]
movups xmm0, xmmword [eax - 0x20]
add ecx, 0x10
lea eax, [eax + 0x40]
xorps xmm0, xmm2
movups xmmword [eax - 0x60], xmm0
movups xmm0, xmmword [eax - 0x50]
xorps xmm0, xmm2
movups xmmword [eax - 0x50], xmm0
movups xmm0, xmmword [eax - 0x40]
xorps xmm0, xmm2
movups xmmword [eax - 0x40], xmm0
movups xmm0, xmmword [eax - 0x30]
xorps xmm0, xmm2
movups xmmword [eax - 0x30], xmm0
cmp ecx, esi
jl 0x525260
mov eax, edi
and al, 0xf
cmp al, 2
jb 0x5252b7
mov eax, edi
and eax, 0xfffffffe
movsd xmm1, qword [edx + ecx*4]
xorps xmm1, xmm2
movsd qword [edx + ecx*4], xmm1
add ecx, 2
cmp ecx, eax
jl 0x5252a3
cmp ecx, edi
jge 0x52531b
mov esi, dword [ebp + 0x14]
mov eax, edi
sub eax, ecx
cmp eax, 4
jl 0x525300
mov edx, edi
lea eax, [esi + 8]
sub edx, ecx
lea eax, [eax + ecx*4]
sub edx, 4
shr edx, 2
inc edx
lea ecx, [ecx + edx*4]
nop dword [eax + eax]
lea eax, [eax + 0x10]
movups xmm0, xmmword [eax - 0x18]
xorps xmm0, xmm2
movups xmmword [eax - 0x18], xmm0
sub edx, 1
jne 0x5252e0
cmp ecx, edi
jge 0x52531e
nop word [eax + eax]
movss xmm0, dword [esi + ecx*4]
xorps xmm0, xmm2
movss dword [esi + ecx*4], xmm0
inc ecx
cmp ecx, edi
jl 0x525300
jmp 0x52531e
mov dword [ebp - 8], 0
mov esi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
push edi
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push esi
push eax
push dword [ebp - 0x20]
call fcn.005258e0
mov eax, dword [ebp - 0x10]
add esp, 0x18
mov edi, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
cmp dword [edi], 0x10
jle 0x52536f
cmp dword [esi + 0x20], 0x10
jle 0x52536f
push 2
test eax, eax
je 0x52535f
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.0052fd50
add esp, 0xc
jmp 0x525376
push dword [ebp - 4]
call fcn.00537120
add esp, 8
mov dword [ebp - 8], eax
jmp 0x525376
mov dword [ebp - 8], 0
push dword [ebp - 4]
xor eax, eax
mov dword [ebp - 0xc], 0
cmp dword [esi + 0x34], eax
cmove eax, dword [ebp - 8]
mov dword [ebp - 8], eax
call fcn.005349a0
mov edx, eax
add esp, 4
sub edx, dword [ebp - 0x14]
sub dword [edi], edx
mov dword [ebp + 0x2c], edx
jmp 0x5253c1
mov esi, dword [ebp - 0xc]
push dword [ebp - 4]
call fcn.005349a0
mov ecx, dword [ebp + 0x1c]
add esp, 4
sub eax, dword [ebp - 0x14]
mov dword [ebp + 0x2c], eax
sub dword [ecx], eax
test esi, esi
jne 0x5251b3
mov ecx, dword [ebp + 0x20]
mov edx, 1
mov eax, dword [ebp + 0x30]
xor edi, edi
shl edx, cl
mov esi, 0x7fff
dec edx
mov ecx, 0xffffc000
and dword [eax], edx
jmp 0x5254b3
movzx edi, si
mov ecx, 0x4000
movsx eax, di
imul eax, eax
add eax, 0x1000
sar eax, 0xd
movzx esi, ax
movsx edx, si
imul eax, edx, 0x272
sub ecx, eax
sar ecx, 0xf
add ecx, 0x2055
movsx eax, cx
imul eax, edx
add eax, 0x4000
sar eax, 0xf
sub eax, 0x1de3
cwde
imul eax, edx
add eax, 0x4000
sar eax, 0xf
sub eax, esi
sub eax, 0x8000
movsx esi, ax
mov eax, 0x4000
sub eax, edi
mov edi, 0x4000
cwde
imul eax, eax
push esi
add eax, 0x1000
sar eax, 0xd
movzx edx, ax
movsx ecx, dx
imul eax, ecx, 0x272
sub edi, eax
sar edi, 0xf
add edi, 0x2055
movsx eax, di
imul eax, ecx
add eax, 0x4000
sar eax, 0xf
sub eax, 0x1de3
cwde
imul eax, ecx
add eax, 0x4000
sar eax, 0xf
sub eax, edx
sub eax, 0x8000
movsx edi, ax
push edi
call fcn.00524b50
movsx ecx, ax
add esp, 8
mov eax, dword [ebp + 0x18]
shl eax, 7
add eax, 0xffffff80
cwde
imul ecx, eax
add ecx, 0x4000
sar ecx, 0xf
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
mov dword [eax + 0xc], ecx
mov ecx, dword [ebp - 0xc]
mov dword [eax + 8], edi
mov dword [eax + 0x10], ecx
mov ecx, dword [ebp + 0x2c]
pop edi
mov dword [eax + 4], esi
mov dword [eax], edx
mov dword [eax + 0x14], ecx
pop esi
mov esp, ebp
pop ebp
ret