Function at 0x5654af
Capabilities:
Encode data using xor

Disassembly:
push edi
mov edi, dword [esp + 0xc]
cmp edi, 0x10
je 0x5654cb
cmp edi, 0x18
je 0x5654cb
cmp edi, 0x20
je 0x5654cb
push 3
pop eax
jmp 0x565997
cmp dword [esp + 0x10], 0
je 0x5654ee
mov eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
lea eax, [eax*2 + 6]
cmp dword [esp + 0x10], eax
je 0x5654ee
push 4
jmp 0x5654c5
mov eax, edi
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 8]
sar eax, 3
push ebx
mov ebx, dword [esp + 0x18]
push ebp
lea eax, [eax*2 + 6]
push esi
mov dword [ebx + 0x1e0], eax
lea esi, [ebx + 4]
movzx ecx, byte [edx]
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
mov dword [ebx], ecx
movzx ecx, byte [edx + 4]
movzx eax, byte [edx + 5]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 6]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 7]
shl ecx, 8
or ecx, eax
mov dword [esi], ecx
movzx ecx, byte [edx + 8]
movzx eax, byte [edx + 9]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xa]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xb]
shl ecx, 8
or ecx, eax
mov dword [ebx + 8], ecx
movzx ecx, byte [edx + 0xc]
movzx eax, byte [edx + 0xd]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xf]
shl ecx, 8
or ecx, eax
mov dword [ebx + 0xc], ecx
cmp edi, 0x10
jne 0x56560e
push ecx
mov dword [esp + 0x20], 0x2c
call fcn.005665ba
xor eax, dword [ebx]
mov edi, 0x6d991c
mov ecx, dword [esi]
xor eax, 0x1000000
mov edx, dword [ebx + 8]
xor ecx, eax
mov dword [ebx + 0x10], eax
xor edx, ecx
mov eax, dword [ebx + 0xc]
xor eax, edx
mov dword [ebx + 0x14], ecx
push 4
mov dword [ebx + 0x18], edx
mov dword [ebx + 0x1c], eax
pop ebp
lea esi, [esi + 0x10]
push dword [esi + 8]
call fcn.005665ba
xor eax, dword [esi - 4]
xor eax, dword [edi]
add edi, ebp
mov dword [esi + 0xc], eax
mov ecx, dword [esi]
xor ecx, eax
mov dword [esi + 0x10], ecx
mov edx, dword [esi + 4]
xor edx, ecx
mov dword [esi + 0x14], edx
mov eax, dword [esi + 8]
xor eax, edx
mov dword [esi + 0x18], eax
cmp edi, 0x6d9940
jne 0x5655d5
jmp 0x56582f
cmp edi, 0x18
jne 0x5656f3
movzx ecx, byte [edx + 0x10]
movzx eax, byte [edx + 0x11]
shl ecx, 8
or ecx, eax
mov dword [esp + 0x1c], 0x34
movzx eax, byte [edx + 0x12]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x13]
shl ecx, 8
or ecx, eax
mov dword [ebx + 0x10], ecx
movzx ecx, byte [edx + 0x14]
movzx eax, byte [edx + 0x15]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x16]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x17]
shl ecx, 8
or ecx, eax
push ecx
mov dword [ebx + 0x14], ecx
call fcn.005665ba
xor eax, dword [ebx]
mov edi, 0x6d991c
mov ecx, dword [esi]
xor eax, 0x1000000
mov edx, dword [ebx + 8]
lea esi, [ebx + 0x28]
xor ecx, eax
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0xc]
xor edx, ecx
push 0xffffffffffffffd8
xor eax, edx
mov dword [ebx + 0x20], edx
pop edx
sub edx, ebx
mov dword [ebx + 0x1c], ecx
push 4
mov dword [ebx + 0x24], eax
mov dword [esp + 0x1c], edx
pop ebp
mov ecx, dword [esi - 0x18]
xor ecx, dword [esi - 4]
mov eax, dword [esi - 0x14]
xor eax, ecx
mov dword [esi], ecx
mov dword [esi + 4], eax
lea esi, [esi + 0x18]
lea eax, [edx + esi]
sar eax, 2
push dword [ebx + eax*4 + 0x14]
call fcn.005665ba
xor eax, dword [esi - 0x28]
xor eax, dword [edi]
add edi, ebp
mov dword [esi - 0x10], eax
mov ecx, dword [esi - 0x24]
xor ecx, eax
mov dword [esi - 0xc], ecx
mov edx, dword [esi - 0x20]
xor edx, ecx
mov dword [esi - 8], edx
mov eax, dword [esi - 0x1c]
xor eax, edx
mov edx, dword [esp + 0x18]
mov dword [esi - 4], eax
cmp edi, 0x6d9938
jne 0x56569e
jmp 0x56582f
cmp edi, 0x20
jne 0x565991
movzx ecx, byte [edx + 0x10]
movzx eax, byte [edx + 0x11]
shl ecx, 8
or ecx, eax
mov dword [esp + 0x1c], 0x3c
movzx eax, byte [edx + 0x12]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x13]
shl ecx, 8
or ecx, eax
mov dword [ebx + 0x10], ecx
movzx ecx, byte [edx + 0x14]
movzx eax, byte [edx + 0x15]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x16]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x17]
shl ecx, 8
or ecx, eax
mov dword [ebx + 0x14], ecx
movzx ecx, byte [edx + 0x18]
movzx eax, byte [edx + 0x19]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x1a]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x1b]
shl ecx, 8
or ecx, eax
mov dword [ebx + 0x18], ecx
movzx ecx, byte [edx + 0x1c]
movzx eax, byte [edx + 0x1d]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x1e]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x1f]
shl ecx, 8
or ecx, eax
push ecx
mov dword [ebx + 0x1c], ecx
call fcn.005665ba
xor eax, dword [ebx]
mov edi, 0x6d991c
mov ecx, dword [esi]
xor eax, 0x1000000
mov edx, dword [ebx + 8]
lea esi, [ebx + 0x30]
xor ecx, eax
mov dword [ebx + 0x20], eax
mov eax, dword [ebx + 0xc]
xor edx, ecx
xor eax, edx
mov dword [ebx + 0x24], ecx
push 0xffffffffffffffd0
mov dword [ebx + 0x2c], eax
pop eax
sub eax, ebx
mov dword [ebx + 0x28], edx
push 4
mov dword [esp + 0x1c], eax
pop ebp
mov eax, dword [esi - 4]
ror eax, 8
push eax
call fcn.005665ba
xor eax, dword [esi - 0x20]
mov ecx, dword [esi - 0x1c]
mov edx, dword [esi - 0x18]
xor ecx, eax
mov dword [esi], eax
xor edx, ecx
mov eax, dword [esi - 0x14]
xor eax, edx
mov dword [esi + 4], ecx
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x18]
mov dword [esi + 8], edx
add esi, 0x20
add eax, esi
sar eax, 2
push dword [ebx + eax*4 + 0x1c]
call fcn.005665ba
xor eax, dword [esi - 0x30]
xor eax, dword [edi]
add edi, ebp
mov dword [esi - 0x10], eax
mov ecx, dword [esi - 0x2c]
xor ecx, eax
mov dword [esi - 0xc], ecx
mov edx, dword [esi - 0x28]
xor edx, ecx
mov dword [esi - 8], edx
mov eax, dword [esi - 0x24]
xor eax, edx
mov dword [esi - 4], eax
cmp edi, 0x6d9934
jne 0x5657c7
mov eax, dword [esp + 0x1c]
lea esi, [ebx + 0xf0]
add eax, 0xfffffffc
lea edi, [ebx + eax*4]
mov eax, dword [edi]
add edi, ebp
mov dword [esi], eax
add esi, ebp
mov eax, dword [edi]
add edi, ebp
mov dword [esi], eax
add esi, ebp
mov eax, dword [edi]
add edi, ebp
mov dword [esi], eax
add esi, ebp
mov eax, dword [edi]
sub edi, 0xc
mov dword [esi], eax
sub esi, 0xc
cmp dword [ebx + 0x1e0], 1
jle 0x56596d
xor ebp, ebp
inc ebp
sub edi, 0x10
add esi, 0x10
mov edx, dword [edi]
mov ecx, edx
shr ecx, 0x18
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x6d8918]
xor ecx, dword [eax*4 + 0x6d8d18]
mov eax, edx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6d9118]
movzx eax, dl
xor ecx, dword [eax*4 + 0x6d9518]
mov dword [esi], ecx
mov edx, dword [edi + 4]
mov ecx, edx
shr ecx, 0x18
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x6d8918]
xor ecx, dword [eax*4 + 0x6d8d18]
mov eax, edx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6d9118]
movzx eax, dl
xor ecx, dword [eax*4 + 0x6d9518]
mov dword [esi + 4], ecx
mov edx, dword [edi + 8]
mov ecx, edx
shr ecx, 0x18
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x6d8918]
xor ecx, dword [eax*4 + 0x6d8d18]
mov eax, edx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6d9118]
movzx eax, dl
xor ecx, dword [eax*4 + 0x6d9518]
mov dword [esi + 8], ecx
mov edx, dword [edi + 0xc]
mov ecx, edx
shr ecx, 0x18
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x6d8918]
xor ecx, dword [eax*4 + 0x6d8d18]
mov eax, edx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6d9118]
movzx eax, dl
xor ecx, dword [eax*4 + 0x6d9518]
inc ebp
mov dword [esi + 0xc], ecx
cmp ebp, dword [ebx + 0x1e0]
jl 0x565871
push 4
pop ebp
sub edi, 0x10
add esi, 0x10
mov eax, dword [edi]
add edi, ebp
mov dword [esi], eax
add esi, ebp
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + ebp]
mov dword [esi + ebp], eax
mov eax, dword [edi + ebp + 4]
mov dword [esi + ebp + 4], eax
xor eax, eax
jmp 0x565994
xor eax, eax
inc eax
pop esi
pop ebp
pop ebx
pop edi
ret 0x10