Function at 0x4f99f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov bl, byte [esi]
mov edi, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
mov byte [ebp - 1], bl
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], eax
test bl, 0x40
jne 0x4f9a1d
push eax
lea eax, [esi + 0x10]
push eax
push esi
call edi
add esp, 0xc
movzx eax, bl
mov edx, 0xf
and eax, 7
xor ecx, ecx
sub edx, eax
mov byte [esi], al
mov dword [ebp - 0x18], edx
cmp edx, 0xf
jae 0x4f9a49
movzx eax, byte [edx + esi]
or ecx, eax
mov byte [edx + esi], 0
inc edx
shl ecx, 8
cmp edx, 0xf
jb 0x4f9a36
movzx eax, byte [esi + 0xf]
mov edx, dword [ebp + 0x14]
or ecx, eax
mov byte [esi + 0xf], 1
cmp ecx, edx
je 0x4f9a64
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 8], eax
cmp edx, 0x10
jb 0x4f9afc
mov edi, 0xfffffff8
sub edi, esi
shr edx, 4
mov dword [ebp - 0x14], edx
push dword [ebp - 0xc]
lea eax, [ebp - 0x28]
push eax
push esi
call dword [ebp - 0x10]
add esp, 0xc
lea eax, [esi + 0x10]
add byte [eax - 1], 1
lea eax, [eax - 1]
jne 0x4f9aa4
lea ecx, [edi + eax]
test ecx, ecx
jne 0x4f9a94
mov edx, dword [ebp - 8]
push dword [ebp - 0xc]
mov ecx, dword [edx]
mov eax, dword [edx + 4]
xor eax, dword [ebp - 0x24]
xor ecx, dword [ebp - 0x28]
mov dword [ebx + 4], eax
mov dword [ebx], ecx
xor dword [esi + 0x14], eax
xor dword [esi + 0x10], ecx
mov ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
xor eax, dword [ebp - 0x1c]
xor ecx, dword [ebp - 0x20]
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], ecx
xor dword [esi + 0x1c], eax
lea eax, [esi + 0x10]
xor dword [esi + 0x18], ecx
push eax
push eax
call dword [ebp - 0x10]
mov edx, dword [ebp + 0x14]
add esp, 0xc
add dword [ebp - 8], 0x10
sub edx, 0x10
add ebx, 0x10
mov dword [ebp + 0x14], edx
sub dword [ebp - 0x14], 1
jne 0x4f9a83
mov edi, dword [ebp - 0x10]
test edx, edx
je 0x4f9b58
push dword [ebp - 0xc]
lea eax, [ebp - 0x28]
push eax
push esi
call edi
xor edi, edi
add esp, 0xc
cmp dword [ebp + 0x14], edi
jbe 0x4f9b45
lea eax, [ebp - 0x28]
sub dword [ebp - 8], eax
sub ebx, eax
lea eax, [esi + 0x10]
mov esi, dword [ebp - 8]
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x28]
add ecx, edi
movzx edx, byte [esi + ecx]
movzx eax, byte [ecx]
xor edx, eax
mov eax, dword [ebp - 0x14]
mov byte [ebx + ecx], dl
xor byte [eax + edi], dl
inc edi
cmp edi, dword [ebp + 0x14]
jb 0x4f9b25
mov esi, dword [ebp + 8]
mov ebx, dword [ebp - 0xc]
lea eax, [esi + 0x10]
mov edi, dword [ebp - 0x10]
push ebx
push eax
push eax
call edi
add esp, 0xc
jmp 0x4f9b5b
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x18]
cmp edx, 0x10
jae 0x4f9b80
mov ecx, 0x10
lea edi, [edx + esi]
sub ecx, edx
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp - 0x10]
push ebx
lea eax, [ebp - 0x28]
push eax
push esi
call edi
mov eax, dword [ebp - 0x28]
add esp, 0xc
xor dword [esi + 0x10], eax
mov eax, dword [ebp - 0x24]
xor dword [esi + 0x14], eax
mov eax, dword [ebp - 0x20]
xor dword [esi + 0x18], eax
mov eax, dword [ebp - 0x1c]
xor dword [esi + 0x1c], eax
mov al, byte [ebp - 1]
pop edi
mov byte [esi], al
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret