Function at 0x4f1b70
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
test bl, 7
jne 0x4f1fc7
cmp ebx, 0x10
jb 0x4f1fc7
cmp ebx, 0x20
ja 0x4f1fc7
mov esi, dword [esp + 0x18]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0x1f
push ecx
call fcn.004b6a20
mov edx, eax
add esp, 4
test edx, edx
mov dword [esp + 0x18], edx
je 0x4f1fc7
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [esp + 0x18]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
cmp ebx, 0x10
rep movsb byte es:[edi], byte [esi]
mov dword [ebp], ebx
mov ecx, dword [edx]
mov dword [ebp + 4], ecx
mov eax, dword [edx + 4]
mov dword [ebp + 8], eax
mov ecx, dword [edx + 8]
mov dword [ebp + 0xc], ecx
mov eax, dword [edx + 0xc]
mov dword [ebp + 0x10], eax
je 0x4f1e29
cmp ebx, 0x18
je 0x4f1d5d
cmp ebx, 0x20
jne 0x4f1ede
mov eax, dword [edx + 0x10]
mov dword [esp + 0x10], 0x718dfc
mov dword [ebp + 0x14], eax
mov ecx, dword [edx + 0x14]
mov dword [ebp + 0x18], ecx
mov eax, dword [edx + 0x18]
mov dword [ebp + 0x1c], eax
mov eax, dword [edx + 0x1c]
mov dword [ebp + 0x20], eax
lea edi, [ebp + 0x24]
push 8
push eax
call fcn.004f1ff0
mov ebp, eax
push 3
push ebp
call fcn.004f1fd0
mov bl, al
push 2
push ebp
and ebx, 0xff
call fcn.004f1fd0
mov esi, dword [ebx*4 + 0x719a24]
and eax, 0xff
push 1
push ebp
xor esi, dword [eax*4 + 0x719624]
call fcn.004f1fd0
and eax, 0xff
push 0
push ebp
xor esi, dword [eax*4 + 0x719224]
call fcn.004f1fd0
mov ebp, dword [esp + 0x38]
mov ecx, dword [edi - 0x20]
and eax, 0xff
push 3
mov edx, dword [ebp]
xor esi, dword [eax*4 + 0x718e24]
xor esi, edx
xor esi, ecx
mov dword [edi], esi
mov eax, dword [edi - 0x1c]
xor esi, eax
mov dword [edi + 4], esi
mov ebx, dword [edi - 0x18]
xor esi, ebx
mov dword [edi + 8], esi
mov edx, dword [edi - 0x14]
xor esi, edx
push esi
mov dword [edi + 0xc], esi
call fcn.004f1fd0
mov bl, al
push 2
push esi
and ebx, 0xff
call fcn.004f1fd0
mov ebx, dword [ebx*4 + 0x719a24]
and eax, 0xff
push 1
push esi
xor ebx, dword [eax*4 + 0x719624]
call fcn.004f1fd0
add esp, 0x40
and eax, 0xff
mov edx, dword [eax*4 + 0x719224]
push 0
push esi
xor ebx, edx
call fcn.004f1fd0
mov esi, dword [edi - 0x10]
and eax, 0xff
add esp, 8
xor ebx, dword [eax*4 + 0x718e24]
xor ebx, esi
mov eax, ebx
mov dword [edi + 0x10], eax
mov edx, dword [edi - 0xc]
xor eax, edx
mov dword [edi + 0x14], eax
mov ecx, dword [edi - 8]
xor eax, ecx
mov dword [edi + 0x18], eax
mov ebx, dword [edi - 4]
xor eax, ebx
mov dword [edi + 0x1c], eax
add ebp, 4
add edi, 0x20
cmp ebp, 0x718e18
mov dword [esp + 0x10], ebp
jl 0x4f1c38
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
jmp 0x4f1eda
mov ecx, dword [edx + 0x10]
mov dword [esp + 0x18], 0x718dfc
mov dword [ebp + 0x14], ecx
mov eax, dword [edx + 0x14]
mov dword [ebp + 0x18], eax
lea esi, [ebp + 0x1c]
push 8
push eax
call fcn.004f1ff0
mov edi, eax
push 3
push edi
call fcn.004f1fd0
mov bl, al
push 2
push edi
and ebx, 0xff
call fcn.004f1fd0
mov ebx, dword [ebx*4 + 0x719a24]
and eax, 0xff
push 1
push edi
xor ebx, dword [eax*4 + 0x719624]
call fcn.004f1fd0
and eax, 0xff
push 0
push edi
xor ebx, dword [eax*4 + 0x719224]
call fcn.004f1fd0
and eax, 0xff
add esp, 0x28
add esi, 0x18
mov ecx, dword [eax*4 + 0x718e24]
xor ebx, ecx
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
add ecx, 4
xor eax, ebx
mov ebx, dword [esi - 0x30]
xor eax, ebx
mov dword [esp + 0x18], ecx
mov dword [esi - 0x18], eax
mov edi, dword [esi - 0x2c]
xor eax, edi
mov dword [esi - 0x14], eax
mov edx, dword [esi - 0x28]
xor eax, edx
mov dword [esi - 0x10], eax
mov ebx, dword [esi - 0x24]
xor eax, ebx
mov dword [esi - 0xc], eax
mov edi, dword [esi - 0x20]
xor eax, edi
mov dword [esi - 8], eax
mov edx, dword [esi - 0x1c]
xor eax, edx
cmp ecx, 0x718e1c
mov dword [esi - 4], eax
jl 0x4f1d74
jmp 0x4f1ed6
mov dword [esp + 0x18], 0x718dfc
lea esi, [ebp + 0x14]
push 8
push eax
call fcn.004f1ff0
mov edi, eax
push 3
push edi
call fcn.004f1fd0
mov bl, al
push 2
push edi
and ebx, 0xff
call fcn.004f1fd0
mov ebx, dword [ebx*4 + 0x719a24]
and eax, 0xff
push 1
push edi
xor ebx, dword [eax*4 + 0x719624]
call fcn.004f1fd0
and eax, 0xff
push 0
push edi
xor ebx, dword [eax*4 + 0x719224]
call fcn.004f1fd0
and eax, 0xff
mov edx, dword [esi - 0x10]
add esp, 0x28
add esi, 0x10
mov ecx, dword [eax*4 + 0x718e24]
xor ebx, ecx
mov ecx, dword [esp + 0x18]
mov edi, dword [ecx]
add ecx, 4
xor ebx, edi
mov dword [esp + 0x18], ecx
mov eax, ebx
xor eax, edx
mov dword [esi - 0x10], eax
mov ebx, dword [esi - 0x1c]
xor eax, ebx
mov dword [esi - 0xc], eax
mov edi, dword [esi - 0x18]
xor eax, edi
mov dword [esi - 8], eax
mov edx, dword [esi - 0x14]
xor eax, edx
cmp ecx, 0x718e24
mov dword [esi - 4], eax
jl 0x4f1e34
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
mov dword [ebp + 0xf4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0xfc], eax
mov dword [ebp + 0xf8], ecx
mov ecx, dword [ebp + 0x10]
lea eax, [ebx + 0x18]
cmp eax, 4
mov dword [ebp + 0x100], ecx
jbe 0x4f1fb6
lea edi, [ebp + 0x104]
lea ebp, [eax - 4]
mov edx, dword [edi - 0xf0]
push 0x10
mov eax, edx
shr eax, 7
and eax, 0x1010101
lea eax, [eax + eax*2]
lea esi, [eax + eax*8]
mov eax, edx
and eax, 0xff7f7f7f
shl eax, 1
xor esi, eax
mov eax, esi
mov ecx, esi
shr eax, 7
and eax, 0x1010101
and ecx, 0xff7f7f7f
shl ecx, 1
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
xor eax, ecx
mov ecx, eax
mov ebx, eax
shr ecx, 7
and ecx, 0x1010101
and ebx, 0xff7f7f7f
shl ebx, 1
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*8]
xor ecx, ebx
xor edx, ecx
xor ecx, eax
mov ebx, edx
xor ecx, esi
xor eax, ebx
mov dword [edi], ecx
push eax
call fcn.004f1ff0
xor esi, ebx
mov edx, eax
push 8
push esi
mov esi, edx
call fcn.004f1ff0
push 0x18
push ebx
xor esi, eax
call fcn.004f1ff0
mov edx, dword [edi]
xor esi, eax
xor edx, esi
add esp, 0x18
mov dword [edi], edx
add edi, 4
dec ebp
jne 0x4f1f17
mov edx, dword [esp + 0x1c]
push edx
call fcn.004b6a50
add esp, 4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ecx
ret