Function at 0x417a30
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x54
push ebx
push esi
push edi
mov edi, dword [esp + 0x68]
imul edi, dword [esp + 0x64]
mov esi, edx
xor bl, bl
mov byte [esp + 0xf], bl
mov dword [esp + 0x28], edi
test esi, esi
je 0x417ffd
cmp dword [esp + 0x6c], 0
je 0x417ffd
cmp dword [esp + 0x70], 0
je 0x417ffd
test eax, eax
je 0x417a7b
mov eax, dword [eax]
test eax, eax
js 0x417a7b
mov edx, eax
mov dword [esp + 0x20], eax
jmp 0x417a84
mov edx, 0x64
mov dword [esp + 0x20], edx
test ecx, ecx
je 0x417a8e
mov eax, dword [ecx]
test eax, eax
jns 0x417a93
mov eax, 0x32
mov dword [esp + 0x14], eax
cmp edx, 0xff
jle 0x417aa8
mov edx, 0xff
mov dword [esp + 0x20], edx
cmp eax, 0xff
jle 0x417ab8
mov eax, 0xff
mov dword [esp + 0x14], eax
cmp eax, edx
jle 0x417ac0
mov dword [esp + 0x14], edx
push edi
call fcn.004c9c38
mov edx, eax
add esp, 4
mov dword [esp + 0x38], edx
test edx, edx
je 0x417ffd
xor eax, eax
test edi, edi
jle 0x417b20
lea ecx, [ecx]
cmp byte [esp + 0x74], 0
je 0x417aed
movzx ecx, byte [esi + eax*4]
jmp 0x417b18
movzx ecx, byte [esi + eax*4 + 2]
lea ebx, [ecx*8]
sub ebx, ecx
movzx ecx, byte [esi + eax*4 + 1]
imul ecx, ecx, 0x96
lea ecx, [ecx + ebx*4]
movzx ebx, byte [esi + eax*4]
imul ebx, ebx, 0x4d
add ecx, ebx
sar ecx, 8
movzx ecx, cl
mov byte [eax + edx], cl
inc eax
cmp eax, edi
jl 0x417ae0
xor ecx, ecx
mov eax, edi
mov edx, 4
mul edx
seto cl
push ebp
neg ecx
or ecx, eax
push ecx
call fcn.004caa52
mov ebx, eax
xor ecx, ecx
mov eax, edi
mov edx, 4
mul edx
seto cl
mov dword [esp + 0x4c], ebx
neg ecx
or ecx, eax
push ecx
call fcn.004caa52
mov dword [esp + 0x38], eax
xor ecx, ecx
mov eax, edi
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004caa52
mov dword [esp + 0x40], eax
xor ecx, ecx
mov eax, edi
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004caa52
mov ebp, eax
add esp, 0x10
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x60], ebp
test ebx, ebx
je 0x417fa8
cmp dword [esp + 0x30], 0
je 0x417fa8
cmp dword [esp + 0x34], 0
je 0x417fa8
test ebp, ebp
je 0x417fa8
mov ecx, edi
xor eax, eax
test ecx, ecx
jle 0x417be0
mov edx, dword [esp + 0x70]
mov edi, edi
mov dword [ebx + eax*4], 0
mov byte [eax + edx], 0
inc eax
cmp eax, ecx
jl 0x417bd0
mov edx, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
lea eax, [edx - 1]
mov dword [esp + 0x14], 1
cmp eax, 1
jle 0x417d26
lea eax, [esi - 1]
nop
mov ecx, dword [esp + 0x14]
imul ecx, esi
mov dword [esp + 0x1c], 1
cmp eax, 1
jle 0x417d0a
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x34]
lea edi, [ecx + 1]
lea ebp, [ebx + ecx*4 + 4]
mov dword [esp + 0x28], edi
lea edi, [ecx + edx + 1]
mov ecx, dword [esp + 0x30]
sub ecx, ebx
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x48]
sub ecx, ebx
mov dword [esp + 0x5c], ecx
lea eax, [edx + 1]
mov ecx, edx
sub ecx, eax
dec ecx
sub eax, edx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x28]
movzx eax, byte [edi + esi - 1]
sub edx, esi
add edx, dword [esp + 0x3c]
mov dword [esp + 0x44], eax
movzx ecx, byte [edx + 1]
movzx ebx, byte [edx - 1]
mov eax, dword [esp + 0x50]
movzx edx, byte [edx]
mov dword [esp + 0x20], ecx
movzx ecx, byte [edi + esi + 1]
add eax, edi
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x54]
movzx ecx, byte [eax + ecx]
movzx eax, byte [eax]
add eax, eax
add ecx, ecx
mov dword [esp + 0x58], ecx
mov ecx, eax
movzx eax, byte [edi + esi]
sub ecx, dword [esp + 0x58]
add eax, eax
sub ecx, dword [esp + 0x44]
add edx, edx
sub eax, edx
sub eax, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
sub eax, ebx
add eax, dword [esp + 0x40]
sub ecx, ebx
add eax, dword [esp + 0x44]
add ecx, dword [esp + 0x40]
inc dword [esp + 0x28]
add ecx, dword [esp + 0x20]
inc edi
mov dword [edx + ebp], ecx
mov dword [ebp], eax
cdq
mov esi, eax
xor esi, edx
sub esi, edx
mov eax, ecx
mov ecx, dword [esp + 0x1c]
cdq
xor eax, edx
sub eax, edx
add esi, eax
mov eax, dword [esp + 0x5c]
mov dword [eax + ebp], esi
mov esi, dword [esp + 0x68]
inc ecx
lea eax, [esi - 1]
add ebp, 4
mov dword [esp + 0x1c], ecx
cmp ecx, eax
jl 0x417c55
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x14]
inc ecx
lea edi, [edx - 1]
mov dword [esp + 0x14], ecx
cmp ecx, edi
jl 0x417c00
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x60]
lea ecx, [edx - 1]
mov dword [esp + 0x14], 1
cmp ecx, 1
jle 0x417f7a
lea ebx, [ebx]
mov eax, dword [esp + 0x14]
lea ecx, [esi - 1]
imul eax, esi
mov dword [esp + 0x1c], 1
cmp ecx, 1
jle 0x417e6e
mov edx, dword [esp + 0x34]
lea edi, [edx + eax*4 + 4]
lea ecx, [eax + 1]
lea eax, [ebx + eax*4 + 8]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x30]
sub eax, edx
mov dword [esp + 0x28], edi
mov dword [esp + 0x38], eax
lea esp, [esp]
mov edx, dword [esp + 0x20]
mov edi, dword [edx - 4]
cmp edi, dword [esp + 0x18]
jle 0x417e48
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x38]
mov eax, dword [eax + edx]
mov dword [esp + 0x60], eax
test eax, eax
je 0x417dc4
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
shl eax, 0xa
cdq
idiv dword [esp + 0x60]
test eax, eax
jle 0x417ddb
cmp eax, 0x1a8
jl 0x417deb
cmp eax, 0x9a8
jl 0x417dfc
lea edx, [ecx + esi]
cmp edi, dword [ebx + edx*4]
jl 0x417e48
mov eax, ecx
sub eax, esi
cmp edi, dword [ebx + eax*4]
jge 0x417e24
jmp 0x417e48
neg eax
cmp eax, 0x9a8
jg 0x417dc4
cmp eax, 0x1a8
jg 0x417e11
mov edx, dword [esp + 0x20]
cmp edi, dword [edx - 8]
jl 0x417e48
mov eax, edx
cmp edi, dword [eax]
jge 0x417e24
jmp 0x417e48
lea edx, [ecx + esi]
cmp edi, dword [ebx + edx*4 + 4]
jl 0x417e48
mov eax, ecx
sub eax, esi
cmp edi, dword [ebx + eax*4 - 4]
jge 0x417e24
jmp 0x417e48
lea edx, [ecx + esi]
cmp edi, dword [ebx + edx*4 - 4]
jl 0x417e48
mov eax, ecx
sub eax, esi
cmp edi, dword [ebx + eax*4 + 4]
jl 0x417e48
cmp edi, dword [esp + 0x24]
jle 0x417e40
mov edx, dword [esp + 0x70]
lea eax, [ecx + edx]
mov byte [eax], 0xff
mov dword [ebp], eax
mov esi, dword [esp + 0x68]
add ebp, 4
jmp 0x417e48
mov eax, dword [esp + 0x70]
mov byte [ecx + eax], 0x64
mov eax, dword [esp + 0x1c]
mov edx, 4
add dword [esp + 0x28], edx
add dword [esp + 0x20], edx
inc eax
lea edx, [esi - 1]
inc ecx
mov dword [esp + 0x1c], eax
cmp eax, edx
jl 0x417d80
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x14]
inc eax
lea ecx, [edx - 1]
mov dword [esp + 0x14], eax
cmp eax, ecx
jl 0x417d40
mov edx, dword [esp + 0x4c]
cmp ebp, edx
je 0x417f7a
mov edi, edi
mov eax, dword [ebp - 4]
sub ebp, 4
cmp byte [eax + 1], 0x64
lea ecx, [eax + 1]
jne 0x417eac
mov byte [ecx], 0xff
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
cmp byte [eax - 1], 0x64
lea ecx, [eax - 1]
jne 0x417ec2
mov byte [ecx], 0xff
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
cmp byte [eax + esi], 0x64
jne 0x417edc
mov byte [eax + esi], 0xff
mov ecx, dword [esp + 0x68]
add ecx, eax
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
mov ecx, eax
sub ecx, esi
cmp byte [ecx], 0x64
jne 0x417ef8
mov byte [ecx], 0xff
mov ecx, eax
sub ecx, dword [esp + 0x68]
add ebp, 4
mov dword [ebp - 4], ecx
mov esi, dword [esp + 0x68]
mov ecx, eax
sub ecx, esi
cmp byte [ecx - 1], 0x64
jne 0x417f17
mov byte [ecx - 1], 0xff
mov ecx, eax
sub ecx, dword [esp + 0x68]
dec ecx
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
mov ecx, eax
sub ecx, esi
cmp byte [ecx + 1], 0x64
jne 0x417f36
mov byte [ecx + 1], 0xff
mov ecx, eax
sub ecx, dword [esp + 0x68]
inc ecx
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
cmp byte [eax + esi - 1], 0x64
jne 0x417f54
mov byte [eax + esi - 1], 0xff
mov ecx, dword [esp + 0x68]
lea ecx, [eax + ecx - 1]
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
cmp byte [eax + esi + 1], 0x64
jne 0x417f72
mov byte [eax + esi + 1], 0xff
mov ecx, dword [esp + 0x68]
lea eax, [eax + ecx + 1]
mov dword [ebp], eax
mov esi, dword [esp + 0x68]
add ebp, 4
cmp ebp, edx
jne 0x417e90
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x70]
xor eax, eax
test edx, edx
jle 0x417f97
cmp byte [eax + ecx], 0xff
je 0x417f92
mov byte [eax + ecx], 0
inc eax
cmp eax, edx
jl 0x417f88
mov cl, byte [ecx]
mov edx, dword [esp + 0x74]
mov ebp, dword [esp + 0x4c]
mov byte [edx], cl
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x3c]
push eax
call fcn.004ca991
add esp, 4
test ebx, ebx
je 0x417fc2
push ebx
call fcn.004cad7b
add esp, 4
mov eax, dword [esp + 0x30]
test eax, eax
je 0x417fd3
push eax
call fcn.004cad7b
add esp, 4
mov eax, dword [esp + 0x34]
test eax, eax
je 0x417fe4
push eax
call fcn.004cad7b
add esp, 4
test ebp, ebp
je 0x417ff1
push ebp
call fcn.004cad7b
add esp, 4
mov al, byte [esp + 0x13]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x54
ret
pop edi
pop esi
mov al, bl
pop ebx
add esp, 0x54
ret