Function at 0x54dee0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x14]
mov ebx, ecx
shl eax, 4
sub eax, dword [ebp + 8]
mov dword [ebp - 0x30], ebx
push edi
mov edi, edx
mov dword [ebp - 0x24], edi
cmp esi, eax
jl 0x54e39a
cmp dword [ebp + 0x24], 0
jne 0x54e39a
cmp esi, 0x28
jge 0x54df1f
mov dword [ebp - 0x14], 0xc
jmp 0x54df3d
cmp esi, 0x3c
jge 0x54df2d
mov dword [ebp - 0x14], 6
jmp 0x54df3d
xor ebx, ebx
cmp esi, 0x64
setl bl
add ebx, 3
mov dword [ebp - 0x14], ebx
mov ebx, ecx
lea eax, [edi*4]
mov dword [ebp - 0x38], eax
call fcn.00584260
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0x20]
mov dword [ebp - 0x20], esp
movsx ecx, word [eax + edi*2 - 2]
movsx eax, word [eax + edi*2]
sub eax, ecx
mov ecx, esi
shl eax, cl
shl eax, 2
call fcn.00584260
lea eax, [edi*4]
mov dword [ebp + 0x14], esp
call fcn.00584260
lea eax, [edi*4]
mov dword [ebp - 0xc], esp
call fcn.00584260
mov eax, dword [ebp + 0x28]
mov ecx, esp
mov dword [ebp - 0x28], ecx
mov dword [eax], 0
xor eax, eax
test edi, edi
mov dword [ebp - 8], eax
mov edi, dword [ebp + 0xc]
jle 0x54e29b
xor ecx, ecx
test edi, edi
cmovne ecx, esi
mov dword [ebp - 0x34], ecx
mov edi, dword [ebx + 0x20]
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
xor edx, edx
mov ecx, esi
movsx ebx, word [edi + eax*2 + 2]
movsx eax, word [edi + eax*2]
sub ebx, eax
mov eax, dword [ebp + 0x14]
shl ebx, cl
add eax, 8
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 4], eax
lea ecx, [ebx - 3]
mov dword [ebp - 0x18], ecx
cmp ebx, 4
jl 0x54e059
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x10], eax
movsx eax, word [edi + ebx*2]
mov ecx, esi
shl eax, cl
mov ecx, dword [ebp + 0x18]
add eax, edx
fld dword [ecx + eax*4]
mov ecx, esi
mov eax, dword [ebp - 0x10]
fstp dword [eax - 8]
movsx eax, word [edi + ebx*2]
shl eax, cl
mov ecx, dword [ebp + 0x18]
add eax, edx
fld dword [ecx + eax*4 + 4]
mov ecx, esi
mov eax, dword [ebp - 0x10]
fstp dword [eax - 4]
movsx eax, word [edi + ebx*2]
shl eax, cl
mov ecx, dword [ebp + 0x18]
add eax, edx
fld dword [ecx + eax*4 + 8]
mov ecx, esi
mov eax, dword [ebp - 0x10]
fstp dword [eax]
movsx eax, word [edi + ebx*2]
shl eax, cl
mov ecx, dword [ebp + 0x18]
add eax, edx
add edx, 4
fld dword [ecx + eax*4 + 0xc]
mov eax, dword [ebp - 0x10]
fstp dword [eax + 4]
add eax, 0x10
mov dword [ebp - 0x10], eax
cmp edx, dword [ebp - 0x18]
jl 0x54dfe8
mov ebx, dword [ebp - 0x2c]
cmp edx, ebx
jl 0x54e064
jmp 0x54e08e
xor eax, eax
mov dword [ebp - 0x18], ecx
cmp eax, ebx
jge 0x54e08e
xor edx, edx
mov eax, dword [ebp - 8]
mov ecx, esi
movsx eax, word [edi + eax*2]
shl eax, cl
mov ecx, dword [ebp + 0x18]
add eax, edx
fld dword [ecx + eax*4]
mov eax, dword [ebp + 0x14]
fstp dword [eax + edx*4]
inc edx
cmp edx, ebx
jl 0x54e064
lea ecx, [ebx - 3]
add eax, 8
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 2
jne 0x54e17a
xor edx, edx
cmp ebx, 4
jl 0x54e146
mov ebx, dword [ebp - 8]
movsx eax, word [edi + ebx*2]
mov ecx, esi
shl eax, cl
mov ecx, dword [ebp + 0x18]
add eax, edx
add eax, dword [ebp + 0x1c]
movss xmm0, dword [ecx + eax*4]
mov ecx, esi
mov eax, dword [ebp - 4]
addss xmm0, dword [eax - 8]
movss dword [eax - 8], xmm0
movsx eax, word [edi + ebx*2]
shl eax, cl
mov ecx, dword [ebp + 0x18]
add eax, edx
add eax, dword [ebp + 0x1c]
movss xmm0, dword [ecx + eax*4 + 4]
mov ecx, esi
mov eax, dword [ebp - 4]
addss xmm0, dword [eax - 4]
movss dword [eax - 4], xmm0
movsx eax, word [edi + ebx*2]
shl eax, cl
mov ecx, dword [ebp + 0x18]
add eax, edx
add eax, dword [ebp + 0x1c]
movss xmm0, dword [ecx + eax*4 + 8]
mov ecx, esi
mov eax, dword [ebp - 4]
addss xmm0, dword [eax]
movss dword [eax], xmm0
movsx eax, word [edi + ebx*2]
shl eax, cl
mov ecx, dword [ebp + 0x18]
add eax, edx
add eax, dword [ebp + 0x1c]
add edx, 4
movss xmm0, dword [ecx + eax*4 + 0xc]
mov eax, dword [ebp - 4]
addss xmm0, dword [eax + 4]
movss dword [eax + 4], xmm0
add eax, 0x10
mov dword [ebp - 4], eax
cmp edx, dword [ebp - 0x18]
jl 0x54e0a6
mov ebx, dword [ebp - 0x2c]
jmp 0x54e176
test ebx, ebx
jle 0x54e17a
lea ebx, [ebx]
mov eax, dword [ebp - 8]
mov ecx, esi
movsx eax, word [edi + eax*2]
shl eax, cl
mov ecx, dword [ebp + 0x18]
add eax, edx
add eax, dword [ebp + 0x1c]
movss xmm0, dword [ecx + eax*4]
mov ecx, dword [ebp + 0x14]
addss xmm0, dword [ecx + edx*4]
movss dword [ecx + edx*4], xmm0
inc edx
cmp edx, ebx
jl 0x54e150
mov ecx, esi
mov eax, ebx
sar eax, cl
mov edx, ebx
mov ecx, dword [ebp + 0x14]
push eax
push dword [ebp - 0x34]
mov dword [ebp - 0x2c], eax
call fcn.0054dd90
add esp, 8
xor edi, edi
fstp dword [ebp - 0x18]
test esi, esi
jle 0x54e1fa
cmp dword [ebp + 0xc], edi
je 0x54e20c
mov ecx, esi
mov dword [ebp - 0x10], ecx
mov eax, 1
mov edx, ebx
shl eax, cl
sar edx, cl
mov ecx, dword [ebp + 0x14]
push eax
call fcn.005590b0
mov eax, dword [ebp - 0x10]
mov edx, ebx
push dword [ebp - 0x2c]
mov ecx, dword [ebp + 0x14]
dec eax
push eax
mov dword [ebp - 0x10], eax
call fcn.0054dd90
fst dword [ebp - 4]
fld dword [ebp - 0x18]
add esp, 0xc
inc edi
fcompi st(1)
fstp st(0)
jbe 0x54e1f3
movss xmm0, dword [ebp - 4]
movss dword [ebp - 0x18], xmm0
fld dword [ebp - 0x18]
fstp dword [ebp - 0x18]
mov dword [ebp - 0x1c], edi
mov ecx, dword [ebp - 0x10]
cmp edi, esi
jl 0x54e1a7
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x1c]
test edi, edi
je 0x54e26f
mov eax, ecx
mov edx, ecx
neg eax
jmp 0x54e275
xor eax, eax
mov edi, 1
mov dword [ebp - 0x10], eax
mov ecx, eax
mov edx, ebx
sar edx, cl
mov ecx, dword [ebp + 0x14]
push edi
call fcn.005590b0
mov eax, dword [ebp - 0x10]
mov edx, ebx
push dword [ebp - 0x2c]
mov ecx, dword [ebp + 0x14]
inc eax
push eax
mov dword [ebp - 0x10], eax
call fcn.0054dd90
mov eax, dword [ebp - 0x10]
add esp, 0xc
fst dword [ebp - 4]
fld dword [ebp - 0x18]
fcompi st(1)
fstp st(0)
jbe 0x54e263
movss xmm0, dword [ebp - 4]
mov ecx, eax
movss dword [ebp - 0x18], xmm0
fld dword [ebp - 0x18]
fstp dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
jmp 0x54e266
mov ecx, dword [ebp - 0x1c]
rol edi, 1
cmp eax, esi
jl 0x54e216
mov edi, dword [ebp + 0xc]
mov edx, ecx
neg edx
mov eax, edx
mov ebx, dword [ebp - 0x20]
test edi, edi
cmove ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebx + eax*4], ecx
inc eax
mov ecx, dword [ebp + 0x28]
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 8], eax
add dword [ecx], edx
cmp eax, dword [ebp - 0x24]
jl 0x54dfb2
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x14]
xor eax, eax
xor edx, edx
test edi, edi
cmovne ebx, eax
cmp dword [ebp - 0x24], 1
jle 0x54e34b
lea eax, [esi*8 + 0x5e3890]
movsx ecx, byte [eax + edi*4]
movsx eax, byte [eax + edi*4 + 1]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x28]
sub dword [ebp - 0xc], eax
sub dword [ebp - 0x20], eax
mov dword [ebp - 0x34], ecx
lea esi, [eax + 4]
mov eax, dword [ebp - 0x24]
dec eax
mov dword [ebp + 8], esi
mov dword [ebp + 0x14], eax
lea ecx, [ecx]
mov ecx, dword [ebp - 0x14]
mov edi, edx
add ecx, ebx
cmp edx, ecx
cmovge edi, ecx
xor eax, eax
cmp edx, ecx
mov ecx, dword [ebp - 0xc]
setge al
mov dword [ecx + esi], eax
mov esi, ebx
mov ecx, dword [ebp - 0x14]
add ecx, edx
cmp ecx, ebx
cmovl esi, ecx
xor eax, eax
cmp ecx, ebx
mov ecx, dword [ebp + 8]
setge al
mov dword [ecx], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + ecx]
mov eax, ecx
sub eax, dword [ebp - 0x34]
sub ecx, dword [ebp - 0x2c]
cdq
xor eax, edx
sub eax, edx
add eax, edi
mov dword [ebp - 0x30], eax
mov eax, ecx
cdq
mov ebx, eax
xor ebx, edx
sub ebx, edx
mov edx, dword [ebp - 0x30]
add ebx, esi
mov esi, dword [ebp + 8]
add esi, 4
sub dword [ebp + 0x14], 1
mov dword [ebp + 8], esi
jne 0x54e2e0
mov ecx, dword [ebp - 0x28]
jmp 0x54e34e
sub dword [ebp - 0xc], ecx
mov edi, dword [ebp + 0x10]
xor eax, eax
cmp edx, ebx
mov edx, dword [ebp - 0x38]
setge al
mov dword [edx + edi - 4], eax
mov edx, dword [ebp - 0x24]
add edx, 0xfffffffe
js 0x54e3b1
lea ecx, [ecx + edx*4]
mov esi, edi
add ecx, 4
sub esi, dword [ebp - 0x28]
cmp dword [esi + ecx], 1
jne 0x54e37c
mov eax, ecx
jmp 0x54e381
mov eax, dword [ebp - 0xc]
add eax, ecx
mov eax, dword [eax]
sub ecx, 4
mov dword [edi + edx*4], eax
sub edx, 1
jns 0x54e372
xor eax, eax
lea esp, [ebp - 0x44]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x28]
mov dword [eax], 0
test edi, edi
jle 0x54e3b1
mov eax, dword [ebp + 0xc]
mov ecx, edi
mov edi, dword [ebp + 0x10]
rep stosd dword es:[edi], eax
xor eax, eax
lea esp, [ebp - 0x44]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret