Function at 0x40f180
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ecx + 0xc], 0
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x4c], edi
mov esi, 1
je 0x40f1a9
mov esi, dword [ecx + 0x6c]
mov al, byte [ecx + 0x808d]
mov bl, byte [ecx + 0x808c]
mov byte [ebp - 0x61], al
mov eax, dword [ecx + 0x85b8]
mov ecx, dword [ecx + 0x8614]
shl ecx, 6
mov byte [ebp - 0x5c], bl
mov edx, dword [eax + 0x28]
mov eax, dword [eax + 0x2c]
add eax, 0xffffffc0
mov dword [ebp - 0x68], edx
add eax, ecx
mov dword [ebp - 0x6c], eax
cmp esi, 0x10
jbe 0x40f1f7
push 0x26c
push str.....libjxrlib_strdec.c
push str.cChannel___16
call fcn.005bb431
add esp, 0xc
xor edx, edx
test esi, esi
je 0x40f21c
mov edi, dword [ebp - 0x60]
add edi, 0x86dc
mov eax, dword [edi]
lea edi, [edi + 4]
mov ecx, edx
inc edx
and ecx, 0xf
mov dword [ebp + ecx*4 - 0x44], eax
cmp edx, esi
jb 0x40f206
mov edi, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x60]
cmp dword [ecx + 0x85c0], 0
je 0x40f23a
mov eax, dword [ecx + 0x87dc]
mov dword [ebp - 0x40], eax
mov eax, dword [ecx + 0x87e0]
mov dword [ebp - 0x3c], eax
mov eax, dword [ecx + 0x10]
dec eax
cmp eax, 6
ja case.default.0x40f247
jmp dword [eax*4 + 0x40f880]
cmp edi, dword [ebp + 0x10]
jae 0x40f86d
mov eax, dword [ebp + 0xc]
mov ebx, edi
mov edi, dword [ebp + 8]
shl ebx, 4
add ebx, 0x629b70
mov dword [ebp - 0x58], 0xff
mov dword [ebp - 0x48], ebx
mov ebx, dword [ebp - 0x6c]
mov ecx, edi
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebx + edx*4]
mov ebx, dword [ebp - 0x48]
mov dword [ebp - 0x54], edx
cmp edi, eax
jae 0x40f301
lea ebx, [ebx]
mov edi, dword [ebp - 0x68]
mov edi, dword [edi + ecx*4]
add edi, edx
mov edx, dword [ebp - 0x60]
add edi, dword [edx + 0x80a8]
xor edx, edx
test esi, esi
je 0x40f2f3
mov eax, ecx
and eax, 0xf
movzx ebx, byte [eax + ebx]
mov eax, ecx
mov ecx, dword [ebp + 0x14]
and eax, 0xfffffff0
shl eax, 4
add ebx, eax
lea ecx, [ecx]
mov eax, edx
and eax, 0xf
mov eax, dword [ebp + eax*4 - 0x44]
mov eax, dword [eax + ebx*4]
add eax, dword [ebp + 0x18]
sar eax, cl
test eax, eax
jns 0x40f2d9
xor eax, eax
jmp 0x40f2e2
cmp eax, 0xff
cmovg eax, dword [ebp - 0x58]
mov byte [edi + edx], al
inc edx
cmp edx, esi
jb 0x40f2c0
mov ecx, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x48]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x54]
inc ecx
mov dword [ebp - 0x50], ecx
cmp ecx, eax
jb 0x40f290
mov edi, dword [ebp + 8]
mov ecx, dword [ebp - 0x4c]
add ebx, 0x10
inc ecx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x4c], ecx
cmp ecx, dword [ebp + 0x10]
jb 0x40f272
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae 0x40f86d
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x4c]
movzx eax, bl
shl edi, 4
add edi, 0x629b70
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], edi
lea esp, [esp]
mov edi, dword [ebp - 0x6c]
mov ebx, ecx
mov dword [ebp - 0x50], ecx
mov edx, dword [edi + edx*4]
mov edi, dword [ebp - 0x48]
mov dword [ebp - 0x5c], edx
cmp ecx, eax
jae 0x40f3f1
lea esp, [esp]
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax + ebx*4]
mov eax, dword [ebp - 0x60]
add ecx, edx
xor edx, edx
mov eax, dword [eax + 0x80a8]
lea eax, [eax + ecx*2]
mov dword [ebp - 0x54], eax
test esi, esi
je 0x40f3e0
mov eax, ebx
and eax, 0xf
movzx edi, byte [eax + edi]
mov eax, ebx
mov ebx, dword [ebp - 0x54]
and eax, 0xfffffff0
shl eax, 4
add edi, eax
mov ecx, dword [ebp + 0x14]
mov eax, edx
and eax, 0xf
mov eax, dword [ebp + eax*4 - 0x44]
mov eax, dword [eax + edi*4]
add eax, dword [ebp + 0x18]
sar eax, cl
mov ecx, dword [ebp - 0x58]
shl eax, cl
test eax, eax
jns 0x40f3c4
xor eax, eax
jmp 0x40f3d1
cmp eax, 0xffff
mov ecx, 0xffff
cmovg eax, ecx
mov word [ebx + edx*2], ax
inc edx
cmp edx, esi
jb 0x40f3a3
mov ebx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x48]
mov eax, dword [ebp + 0xc]
inc ebx
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 0x50], ebx
cmp ebx, eax
jb 0x40f370
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x4c]
add edi, 0x10
inc edx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x4c], edx
cmp edx, dword [ebp + 0x10]
jb 0x40f350
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae 0x40f86d
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x4c]
movzx eax, bl
shl edi, 4
add edi, 0x629b70
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], edi
lea esp, [esp]
mov edi, dword [ebp - 0x6c]
mov ebx, ecx
mov dword [ebp - 0x50], ecx
mov edx, dword [edi + edx*4]
mov edi, dword [ebp - 0x48]
mov dword [ebp - 0x58], edx
cmp ecx, eax
jae 0x40f4eb
lea esp, [esp]
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax + ebx*4]
mov eax, dword [ebp - 0x60]
add ecx, edx
xor edx, edx
mov eax, dword [eax + 0x80a8]
lea eax, [eax + ecx*2]
mov dword [ebp - 0x5c], eax
test esi, esi
je 0x40f4d6
mov eax, ebx
and eax, 0xf
movzx edi, byte [eax + edi]
mov eax, ebx
mov ebx, dword [ebp - 0x5c]
and eax, 0xfffffff0
shl eax, 4
add edi, eax
mov ecx, dword [ebp + 0x14]
mov eax, edx
and eax, 0xf
mov eax, dword [ebp + eax*4 - 0x44]
mov eax, dword [eax + edi*4]
add eax, dword [ebp + 0x18]
sar eax, cl
mov ecx, dword [ebp - 0x54]
shl eax, cl
cmp eax, 0xffff8000
jge 0x40f4ba
mov eax, 0xffff8000
jmp 0x40f4c7
cmp eax, 0x7fff
mov ecx, 0x7fff
cmovg eax, ecx
mov word [ebx + edx*2], ax
inc edx
cmp edx, esi
jb 0x40f493
mov ebx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x48]
mov eax, dword [ebp + 0xc]
inc ebx
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x50], ebx
cmp ebx, eax
jb 0x40f460
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x4c]
add edi, 0x10
inc edx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x4c], edx
cmp edx, dword [ebp + 0x10]
jb 0x40f440
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae 0x40f86d
mov eax, dword [ebp + 0xc]
mov ebx, edi
mov ecx, dword [ebp + 8]
shl ebx, 4
add ebx, 0x629b70
mov dword [ebp - 0x48], ebx
nop
mov ebx, dword [ebp - 0x6c]
mov edx, ecx
mov dword [ebp - 0x50], ecx
mov edi, dword [ebx + edi*4]
mov ebx, dword [ebp - 0x48]
mov dword [ebp - 0x54], edi
cmp ecx, eax
jae 0x40f5bb
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax + edx*4]
mov eax, dword [ebp - 0x60]
add ecx, edi
xor edi, edi
mov eax, dword [eax + 0x80a8]
lea eax, [eax + ecx*2]
mov dword [ebp - 0x5c], eax
test esi, esi
je 0x40f5aa
mov eax, edx
and eax, 0xf
movzx ebx, byte [eax + ebx]
mov eax, edx
and eax, 0xfffffff0
shl eax, 4
add ebx, eax
mov ecx, dword [ebp + 0x14]
mov eax, edi
and eax, 0xf
mov eax, dword [ebp + eax*4 - 0x44]
mov edx, dword [eax + ebx*4]
add edx, dword [ebp + 0x18]
sar edx, cl
mov eax, edx
and edx, 0x7fff
sar eax, 0x1f
xor edx, eax
sub edx, eax
mov eax, dword [ebp - 0x5c]
mov word [eax + edi*2], dx
inc edi
cmp edi, esi
jb 0x40f575
mov edx, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x48]
mov eax, dword [ebp + 0xc]
inc edx
mov edi, dword [ebp - 0x54]
mov dword [ebp - 0x50], edx
cmp edx, eax
jb 0x40f545
mov ecx, dword [ebp + 8]
mov edi, dword [ebp - 0x4c]
add ebx, 0x10
inc edi
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x4c], edi
cmp edi, dword [ebp + 0x10]
jb 0x40f530
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae 0x40f86d
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x4c]
movzx eax, bl
shl edi, 4
add edi, 0x629b70
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], edi
mov edi, dword [ebp - 0x6c]
mov ebx, ecx
mov dword [ebp - 0x50], ecx
mov edx, dword [edi + edx*4]
mov edi, dword [ebp - 0x48]
mov dword [ebp - 0x58], edx
cmp ecx, eax
jae 0x40f68b
jmp 0x40f620
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax + ebx*4]
mov eax, dword [ebp - 0x60]
add ecx, edx
xor edx, edx
mov eax, dword [eax + 0x80a8]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x5c], eax
test esi, esi
je 0x40f67a
mov eax, ebx
and eax, 0xf
movzx edi, byte [eax + edi]
mov eax, ebx
mov ebx, dword [ebp - 0x5c]
and eax, 0xfffffff0
shl eax, 4
add edi, eax
mov ecx, dword [ebp + 0x14]
mov eax, edx
and eax, 0xf
mov eax, dword [ebp + eax*4 - 0x44]
mov eax, dword [eax + edi*4]
add eax, dword [ebp + 0x18]
sar eax, cl
mov ecx, dword [ebp - 0x54]
shl eax, cl
mov dword [ebx + edx*4], eax
inc edx
cmp edx, esi
jb 0x40f653
mov ebx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x48]
mov eax, dword [ebp + 0xc]
inc ebx
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x50], ebx
cmp ebx, eax
jb 0x40f620
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x4c]
add edi, 0x10
inc edx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x4c], edx
cmp edx, dword [ebp + 0x10]
jb 0x40f606
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae 0x40f86d
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x4c]
movzx eax, bl
shl edi, 4
add edi, 0x629b70
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], edi
mov edi, dword [ebp - 0x6c]
mov ebx, ecx
mov dword [ebp - 0x50], ecx
mov edx, dword [edi + edx*4]
mov edi, dword [ebp - 0x48]
mov dword [ebp - 0x58], edx
cmp ecx, eax
jae 0x40f75b
jmp 0x40f6f0
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax + ebx*4]
mov eax, dword [ebp - 0x60]
add ecx, edx
xor edx, edx
mov eax, dword [eax + 0x80a8]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x5c], eax
test esi, esi
je 0x40f74a
mov eax, ebx
and eax, 0xf
movzx edi, byte [eax + edi]
mov eax, ebx
mov ebx, dword [ebp - 0x5c]
and eax, 0xfffffff0
shl eax, 4
add edi, eax
mov ecx, dword [ebp + 0x14]
mov eax, edx
and eax, 0xf
mov eax, dword [ebp + eax*4 - 0x44]
mov eax, dword [eax + edi*4]
add eax, dword [ebp + 0x18]
sar eax, cl
mov ecx, dword [ebp - 0x54]
shl eax, cl
mov dword [ebx + edx*4], eax
inc edx
cmp edx, esi
jb 0x40f723
mov ebx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x48]
mov eax, dword [ebp + 0xc]
inc ebx
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x50], ebx
cmp ebx, eax
jb 0x40f6f0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x4c]
add edi, 0x10
inc edx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x4c], edx
cmp edx, dword [ebp + 0x10]
jb 0x40f6d6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae 0x40f86d
mov ecx, dword [ebp + 0xc]
mov ebx, edi
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x4c]
shl ebx, 4
add ebx, 0x629b70
mov dword [ebp - 0x48], ebx
mov ebx, dword [ebp - 0x6c]
mov edx, edi
mov dword [ebp - 0x50], edi
mov eax, dword [ebx + eax*4]
mov ebx, dword [ebp - 0x48]
mov dword [ebp - 0x58], eax
cmp edi, ecx
jae 0x40f82f
mov ecx, dword [ebp - 0x68]
xor edi, edi
mov ecx, dword [ecx + edx*4]
add ecx, eax
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 0x80a8]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x54], eax
test esi, esi
je 0x40f81e
mov eax, edx
and eax, 0xf
movzx ebx, byte [eax + ebx]
mov eax, edx
and eax, 0xfffffff0
shl eax, 4
add ebx, eax
mov ecx, dword [ebp + 0x14]
mov eax, edi
push dword [ebp - 0x5c]
mov dl, byte [ebp - 0x61]
and eax, 0xf
mov eax, dword [ebp + eax*4 - 0x44]
mov eax, dword [eax + ebx*4]
add eax, dword [ebp + 0x18]
sar eax, cl
mov ecx, eax
call fcn.0040ecc0
mov eax, dword [ebp - 0x54]
add esp, 4
movss dword [eax + edi*4], xmm0
inc edi
cmp edi, esi
jb 0x40f7e7
mov edx, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x48]
mov ecx, dword [ebp + 0xc]
inc edx
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x50], edx
cmp edx, ecx
jb 0x40f7b7
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x4c]
add ebx, 0x10
inc eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x4c], eax
cmp eax, dword [ebp + 0x10]
jb 0x40f7a2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push 0x2dc
push str.....libjxrlib_strdec.c
push 0x62c9d0
call fcn.005bb431
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret