Function at 0x417220
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 0x4177ed
cmp dword [esp + 0x6c], 0
je 0x4177ed
cmp dword [esp + 0x70], 0
je 0x4177ed
test eax, eax
je 0x41726b
mov eax, dword [eax]
test eax, eax
js 0x41726b
mov edx, eax
mov dword [esp + 0x20], eax
jmp 0x417274
mov edx, 0x64
mov dword [esp + 0x20], edx
test ecx, ecx
je 0x41727e
mov eax, dword [ecx]
test eax, eax
jns 0x417283
mov eax, 0x32
mov dword [esp + 0x14], eax
cmp edx, 0xff
jle 0x417298
mov edx, 0xff
mov dword [esp + 0x20], edx
cmp eax, 0xff
jle 0x4172a8
mov eax, 0xff
mov dword [esp + 0x14], eax
cmp eax, edx
jle 0x4172b0
mov dword [esp + 0x14], edx
push edi
call fcn.004ba2ed
mov edx, eax
add esp, 4
mov dword [esp + 0x38], edx
test edx, edx
je 0x4177ed
xor eax, eax
test edi, edi
jle 0x417310
lea ecx, [ecx]
cmp byte [esp + 0x74], 0
je 0x4172dd
movzx ecx, byte [esi + eax*4]
jmp 0x417308
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 0x4172d0
xor ecx, ecx
mov eax, edi
mov edx, 4
mul edx
seto cl
push ebp
neg ecx
or ecx, eax
push ecx
call fcn.004bb279
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.004bb279
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.004bb279
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.004bb279
mov ebp, eax
add esp, 0x10
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x60], ebp
test ebx, ebx
je 0x417798
cmp dword [esp + 0x30], 0
je 0x417798
cmp dword [esp + 0x34], 0
je 0x417798
test ebp, ebp
je 0x417798
mov ecx, edi
xor eax, eax
test ecx, ecx
jle 0x4173d0
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 0x4173c0
mov edx, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
lea eax, [edx - 1]
mov dword [esp + 0x14], 1
cmp eax, 1
jle 0x417516
lea eax, [esi - 1]
nop
mov ecx, dword [esp + 0x14]
imul ecx, esi
mov dword [esp + 0x1c], 1
cmp eax, 1
jle 0x4174fa
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 0x417445
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 0x4173f0
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x60]
lea ecx, [edx - 1]
mov dword [esp + 0x14], 1
cmp ecx, 1
jle 0x41776a
lea ebx, [ebx]
mov eax, dword [esp + 0x14]
lea ecx, [esi - 1]
imul eax, esi
mov dword [esp + 0x1c], 1
cmp ecx, 1
jle 0x41765e
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 0x417638
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x38]
mov eax, dword [eax + edx]
mov dword [esp + 0x60], eax
test eax, eax
je 0x4175b4
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
shl eax, 0xa
cdq
idiv dword [esp + 0x60]
test eax, eax
jle 0x4175cb
cmp eax, 0x1a8
jl 0x4175db
cmp eax, 0x9a8
jl 0x4175ec
lea edx, [ecx + esi]
cmp edi, dword [ebx + edx*4]
jl 0x417638
mov eax, ecx
sub eax, esi
cmp edi, dword [ebx + eax*4]
jge 0x417614
jmp 0x417638
neg eax
cmp eax, 0x9a8
jg 0x4175b4
cmp eax, 0x1a8
jg 0x417601
mov edx, dword [esp + 0x20]
cmp edi, dword [edx - 8]
jl 0x417638
mov eax, edx
cmp edi, dword [eax]
jge 0x417614
jmp 0x417638
lea edx, [ecx + esi]
cmp edi, dword [ebx + edx*4 + 4]
jl 0x417638
mov eax, ecx
sub eax, esi
cmp edi, dword [ebx + eax*4 - 4]
jge 0x417614
jmp 0x417638
lea edx, [ecx + esi]
cmp edi, dword [ebx + edx*4 - 4]
jl 0x417638
mov eax, ecx
sub eax, esi
cmp edi, dword [ebx + eax*4 + 4]
jl 0x417638
cmp edi, dword [esp + 0x24]
jle 0x417630
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 0x417638
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 0x417570
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 0x417530
mov edx, dword [esp + 0x4c]
cmp ebp, edx
je 0x41776a
mov edi, edi
mov eax, dword [ebp - 4]
sub ebp, 4
cmp byte [eax + 1], 0x64
lea ecx, [eax + 1]
jne 0x41769c
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 0x4176b2
mov byte [ecx], 0xff
mov dword [ebp], ecx
mov esi, dword [esp + 0x68]
add ebp, 4
cmp byte [eax + esi], 0x64
jne 0x4176cc
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 0x4176e8
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 0x417707
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 0x417726
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 0x417744
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 0x417762
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 0x417680
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x70]
xor eax, eax
test edx, edx
jle 0x417787
cmp byte [eax + ecx], 0xff
je 0x417782
mov byte [eax + ecx], 0
inc eax
cmp eax, edx
jl 0x417778
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.004ba14c
add esp, 4
test ebx, ebx
je 0x4177b2
push ebx
call fcn.004bb5ab
add esp, 4
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4177c3
push eax
call fcn.004bb5ab
add esp, 4
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4177d4
push eax
call fcn.004bb5ab
add esp, 4
test ebp, ebp
je 0x4177e1
push ebp
call fcn.004bb5ab
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