Function at 0x487760
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ecx, dword [edi + 0x130]
mov ebx, ecx
xor esi, esi
and ebx, 0xf
test edx, edx
je 0x48796d
mov eax, dword [edi + 0x140]
test eax, eax
jl 0x48796f
cmp eax, 0xb
je 0x4877a7
mov eax, 0xfffffffb
mov dword [edi + 0x140], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add ecx, edx
cmp ecx, dword [edi + 0x12c]
jbe 0x4877c3
mov eax, 0xfffffffa
mov dword [edi + 0x140], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov eax, ecx
sub eax, ebx
sub eax, edi
test al, 7
jne 0x487881
test edx, edx
jbe 0x4877ee
test bl, 7
je 0x4877ee
mov al, byte [esi + ecx]
xor byte [ebx + edi + 0x20], al
add esi, 1
add ebx, 1
cmp esi, edx
jb 0x4877d8
lea eax, [esi + 8]
cmp eax, edx
ja 0x48781a
cmp ebx, 8
ja 0x48781a
mov edx, dword [ecx + eax - 8]
xor dword [ebx + edi + 0x20], edx
mov edx, dword [ecx + eax - 4]
xor dword [ebx + edi + 0x24], edx
mov edx, dword [ebp + 0xc]
add eax, 8
add esi, 8
add ebx, 8
cmp eax, edx
jbe 0x4877f5
lea eax, [esi + 0x10]
cmp eax, edx
ja 0x4878e2
mov eax, 0x10
lea edx, [esi + ecx]
sub eax, ecx
mov dword [ebp + 0x10], edx
mov dword [ebp - 4], eax
lea eax, [edi + 0x30]
push eax
lea eax, [edi + 0x20]
push eax
push eax
call fcn.00488e5d
mov eax, dword [ebp + 0x10]
mov ecx, dword [edi + 0x20]
xor ecx, dword [eax]
mov edx, dword [edi + 0x24]
xor edx, dword [eax + 4]
mov dword [edi + 0x20], ecx
mov dword [edi + 0x24], edx
mov ecx, dword [eax + 8]
xor ecx, dword [edi + 0x28]
mov edx, dword [eax + 0xc]
xor edx, dword [edi + 0x2c]
mov dword [edi + 0x28], ecx
mov ecx, dword [ebp - 4]
add eax, 0x10
add ecx, eax
add esp, 0xc
add esi, 0x10
cmp ecx, dword [ebp + 0xc]
mov dword [edi + 0x2c], edx
mov dword [ebp + 0x10], eax
jbe 0x487835
jmp 0x4878dc
test edx, edx
jbe 0x48789b
cmp ebx, 0x10
jae 0x48789b
mov al, byte [esi + ecx]
xor byte [ebx + edi + 0x20], al
add esi, 1
add ebx, 1
cmp esi, edx
jb 0x487885
lea eax, [esi + 0x10]
cmp eax, edx
ja 0x4878e2
mov dword [ebp + 0x10], eax
lea eax, [edi + 0x30]
push eax
lea eax, [edi + 0x20]
push eax
push eax
call fcn.00488e5d
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
lea eax, [edx + ecx - 0x10]
push eax
lea eax, [edi + 0x20]
push eax
push eax
call fcn.00487380
mov eax, dword [ebp + 0x10]
add eax, 0x10
add esp, 0x18
add esi, 0x10
cmp eax, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
jbe 0x4878a5
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
cmp esi, edx
jae 0x48791d
lea eax, [edi + 0x20]
lea esp, [esp]
cmp ebx, 0x10
jne 0x487908
lea ecx, [edi + 0x30]
push ecx
push eax
push eax
call fcn.00488e5d
mov ecx, dword [ebp + 8]
add esp, 0xc
xor ebx, ebx
mov dl, byte [esi + ecx]
xor byte [edi + ebx + 0x20], dl
lea eax, [edi + 0x20]
add esi, 1
add ebx, 1
cmp esi, dword [ebp + 0xc]
jb 0x4878f0
add dword [edi + 0x130], esi
cmp ebx, 0x10
mov eax, dword [edi + 0x130]
je 0x487936
cmp eax, dword [edi + 0x12c]
jne 0x487947
lea ecx, [edi + 0x30]
lea eax, [edi + 0x20]
push ecx
push eax
push eax
call fcn.00488e5d
add esp, 0xc
mov edx, dword [edi + 0x130]
cmp edx, dword [edi + 0x12c]
jne 0x48796d
xor eax, eax
mov dword [edi + 0x140], 0xc
mov dword [edi + 0x130], eax
mov dword [edi + 0x134], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret