Function at 0x416640
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b8
call fcn.004171a0
mov edi, ecx
mov ecx, dword [esp + 0x15cc]
pxor xmm0, xmm0
movdqu xmmword [esp + 0x34], xmm0
movdqu xmmword [esp + 0x44], xmm0
movdqu xmmword [esp + 0x54], xmm0
movdqu xmmword [esp + 0x64], xmm0
movdqu xmmword [esp + 0x74], xmm0
movdqu xmmword [esp + 0x84], xmm0
movdqu xmmword [esp + 0x94], xmm0
movdqu xmmword [esp + 0xa4], xmm0
mov dword [esp + 0xb4], 0
cmp dword [esp + 0x15d4], 0
mov dword [esp + 0x1c], edx
je 0x41672c
test ecx, ecx
jle 0x416fce
xor eax, eax
cmp ecx, 1
je 0x4166f8
and ecx, 0xfffffffe
mov eax, dword [esp + 0x1c]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop word cs:[eax + eax]
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x34]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x34]
add eax, 2
cmp ecx, eax
jne 0x4166e0
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x416fce
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15cc]
inc dword [esp + eax*4 + 0x34]
jmp 0x416fce
lea ebp, [edx + edx*8]
mov eax, ebp
shl eax, 6
mov dword [esp + 0x18], eax
test ecx, ecx
mov dword [esp + 0x10], edi
jle 0x416829
cmp ecx, 1
jne 0x416a7b
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x416787
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x416787
mov word [esp + ebx*4 + 0x4b8], cx
mov word [esp + ebx*4 + 0x4ba], ax
inc ebx
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.00417350
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x416840
xor eax, eax
cmp ebx, 1
je 0x4167ff
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop dword [eax]
movzx edx, word [esp + eax*4 + 0x4b8]
movzx esi, dl
inc dword [esp + esi*4 + 0x938]
shr edx, 8
inc dword [esp + edx*4 + 0xd38]
movzx edx, word [esp + eax*4 + 0x4bc]
movzx esi, dl
inc dword [esp + esi*4 + 0x938]
shr edx, 8
inc dword [esp + edx*4 + 0xd38]
add eax, 2
cmp ecx, eax
jne 0x4167c0
test bl, 1
je 0x416820
movzx eax, word [esp + eax*4 + 0x4b8]
movzx ecx, al
inc dword [esp + ecx*4 + 0x938]
shr eax, 8
inc dword [esp + eax*4 + 0xd38]
mov eax, dword [esp + 0xd38]
jmp 0x416849
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.00417350
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x30], eax
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x20], eax
xor ecx, ecx
lea eax, [esp + 0x4b8]
mov dword [esp], eax
lea eax, [esp + 0x1138]
lea esi, [esp + 0x938]
xor edx, edx
mov dword [esp + 0xc], ebp
mov dword [esp + 8], ebx
jmp 0x4168aa
add ecx, 8
mov edx, dword [esp + 0x14]
inc edx
add esi, 0x400
mov eax, edi
cmp edx, dword [esp + 0x30]
je 0x4169ac
mov dword [esp + 0x14], edx
mov edi, dword [esp]
mov dword [esp], eax
mov edx, 3
xor eax, eax
nop dword [eax + eax]
mov dword [esp + edx*4 + 0xac], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xb0], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xb4], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xb8], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x4168c0
cmp byte [esp + 7], 0
jne 0x416890
xor edx, edx
cmp ebx, 1
mov ebp, edi
je 0x416969
xor edx, edx
nop dword [eax + eax]
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xb8]
mov edi, ebp
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xb8], ebp
mov eax, dword [edi + edx*4]
mov ebp, dword [esp]
mov dword [ebp + ebx*4], eax
movzx eax, word [edi + edx*4 + 4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xb8]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xb8], ebp
mov ebp, edi
mov eax, dword [edi + edx*4 + 4]
mov edi, dword [esp]
mov dword [edi + ebx*4], eax
mov edi, dword [esp + 0x20]
add edx, 2
cmp edi, edx
jne 0x416910
mov ebx, dword [esp + 8]
test bl, 1
mov edi, ebp
mov ebp, dword [esp + 0xc]
je 0x416890
movzx eax, word [edi + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xb8]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xb8], ebp
mov ebp, dword [esp + 0xc]
mov eax, dword [edi + edx*4]
mov edx, dword [esp]
mov dword [edx + ebx*4], eax
mov ebx, dword [esp + 8]
jmp 0x416890
test ebx, ebx
je 0x416e89
cmp ebx, 1
jne 0x4169c6
mov eax, dword [esp]
mov word [eax], 1
jmp 0x416c8e
mov edi, dword [esp]
movzx eax, word [edi + 4]
add word [edi], ax
cmp ebx, 3
jl 0x416ae5
mov eax, 2
mov ecx, 2
sub ecx, ebx
mov dword [esp + 0x20], ecx
mov edx, 1
xor esi, esi
jmp 0x416a26
movzx ebx, word [ecx + esi*4]
add word [ecx + edx*4], bx
mov word [ecx + esi*4], dx
inc esi
mov ecx, dword [esp + 0x20]
lea edi, [ecx + edx]
inc edi
inc edx
cmp edi, 1
mov ebx, dword [esp + 8]
mov edi, dword [esp]
je 0x416b03
movzx ecx, word [edi + esi*4]
cmp eax, ebx
jge 0x416a37
movzx ebx, word [edi + eax*4]
cmp cx, bx
jae 0x416a50
mov word [edi + edx*4], cx
mov word [edi + esi*4], dx
inc esi
jmp 0x416a55
inc eax
mov word [edi + edx*4], bx
mov ecx, edi
cmp eax, dword [esp + 8]
jge 0x416a00
cmp esi, edx
jge 0x416a70
movzx ebx, word [ecx + esi*4]
movzx edi, word [ecx + eax*4]
cmp bx, di
jb 0x416a04
jmp 0x416a74
movzx edi, word [ecx + eax*4]
inc eax
add word [ecx + edx*4], di
jmp 0x416a0d
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x416aab
add eax, 2
cmp ecx, eax
je 0x416751
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x416ac6
mov word [esp + ebx*4 + 0x4b8], si
mov word [esp + ebx*4 + 0x4ba], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x416aa0
mov word [esp + ebx*4 + 0x4b8], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4ba], si
inc ebx
jmp 0x416aa0
mov eax, ebx
xor eax, 0x3ffffffd
mov ecx, ebx
and ecx, 0x1ffffffd
lea eax, [eax + ecx*2]
mov word [edi + eax*4 + 4], 0
jmp 0x416b91
mov eax, ebx
xor eax, 0x3ffffffd
mov ecx, ebx
and ecx, 0x1ffffffd
lea eax, [eax + ecx*2]
mov word [edi + eax*4 + 4], 0
lea ecx, [ebx - 3]
lea edx, [ebx + 2]
mov eax, ecx
and edx, 3
je 0x416b41
mov eax, ecx
nop dword [eax + eax]
movzx esi, word [edi + eax*4]
movzx esi, word [edi + esi*4]
inc esi
mov word [edi + eax*4], si
dec eax
dec edx
jne 0x416b30
cmp ecx, 3
jb 0x416b91
inc eax
nop word [eax + eax]
movzx ecx, word [edi + eax*4 - 4]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 4], cx
movzx ecx, word [edi + eax*4 - 8]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 8], cx
movzx ecx, word [edi + eax*4 - 0xc]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 0xc], cx
movzx ecx, word [edi + eax*4 - 0x10]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x416b50
lea eax, [ebx - 1]
lea ecx, [ebx - 2]
mov esi, 1
xor edx, edx
jmp 0x416bc3
mov esi, ebp
and esi, 2
mov edi, ebp
or ebp, 2
imul ebp, esi
xor esi, 2
and edi, 0xfffffffd
imul edi, esi
add ebp, edi
inc edx
mov esi, ebp
test ebp, ebp
jle 0x416c82
test ecx, ecx
js 0x416bf0
lea ebp, [ecx + 1]
xor edi, edi
nop dword [eax]
mov ebx, dword [esp]
movzx ebx, word [ebx + ecx*4]
cmp edx, ebx
jne 0x416c00
inc edi
add ecx, 0xffffffff
jb 0x416bd0
mov ecx, 0xffffffff
jmp 0x416c02
xor ebp, ebp
jmp 0x416c06
mov ebp, edi
mov ebx, dword [esp + 8]
mov edi, esi
sub edi, ebp
jle 0x416ba0
mov dword [esp + 0x20], ebp
not ebp
add ebp, esi
and edi, 3
je 0x416c48
mov dword [esp + 0x14], ebp
mov ebx, dword [esp]
lea ebp, [ebx + eax*4]
xor ebx, ebx
nop word cs:[eax + eax]
mov word [ebp], dx
inc ebx
add ebp, 0xfffffffc
cmp edi, ebx
jne 0x416c30
sub esi, ebx
sub eax, ebx
mov ebx, dword [esp + 8]
mov ebp, dword [esp + 0x14]
cmp ebp, 3
mov edi, dword [esp]
mov ebp, dword [esp + 0x20]
jb 0x416ba0
nop dword [eax + eax]
mov word [edi + eax*4], dx
mov word [edi + eax*4 - 4], dx
mov word [edi + eax*4 - 8], dx
mov word [edi + eax*4 - 0xc], dx
add eax, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ebp
jg 0x416c60
jmp 0x416ba0
test ebx, ebx
mov ebp, dword [esp + 0xc]
jle 0x416e89
xor eax, eax
mov edx, dword [esp]
nop word cs:[eax + eax]
movzx ecx, word [edx + eax*4]
inc dword [esp + ecx*4 + 0x34]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, ebx
jl 0x416ca0
cmp ebx, 2
jl 0x416e89
mov ecx, dword [esp + 0x15d0]
lea eax, [ecx + 1]
cmp eax, 0x20
jg 0x416d30
mov esi, dword [esp + ecx*4 + 0x34]
mov edx, ecx
neg edx
and edx, 3
je 0x416cec
nop dword [eax]
add esi, dword [esp + eax*4 + 0x34]
mov dword [esp + ecx*4 + 0x34], esi
inc eax
dec edx
jne 0x416ce0
lea edx, [ecx - 0x1d]
cmp edx, 3
jb 0x416d28
add eax, 3
nop word [eax + eax]
add esi, dword [esp + eax*4 + 0x28]
mov dword [esp + ecx*4 + 0x34], esi
add esi, dword [esp + eax*4 + 0x2c]
mov dword [esp + ecx*4 + 0x34], esi
add esi, dword [esp + eax*4 + 0x30]
mov dword [esp + ecx*4 + 0x34], esi
add esi, dword [esp + eax*4 + 0x34]
mov dword [esp + ecx*4 + 0x34], esi
add eax, 4
cmp eax, 0x24
jne 0x416d00
test ecx, ecx
jle 0x417136
cmp ecx, 1
mov ebx, ecx
adc ebx, 0xffffffff
inc ebx
mov eax, ecx
xor edx, edx
cmp ebx, 8
jb 0x416e50
mov edx, ebx
and edx, 0xfffffff8
mov ecx, dword [esp + 0x15d0]
mov eax, ecx
sub eax, edx
movd xmm0, ecx
pshufd xmm0, xmm0, 0
movdqa xmm1, xmmword [0x445870]
movdqu xmmword [esp + 0x20], xmm0
paddd xmm1, xmm0
mov dword [esp + 0x14], edx
neg edx
lea edi, [esp + ecx*4]
add edi, 0x28
pxor xmm2, xmm2
xor esi, esi
movdqa xmm5, xmmword [0x445890]
pxor xmm4, xmm4
nop
movdqu xmm6, xmmword [edi + esi*4]
pshufd xmm3, xmm6, 0x1b
movdqu xmm0, xmmword [esp + 0x20]
psubd xmm0, xmm1
movdqa xmm7, xmm0
pslld xmm0, 0x17
paddd xmm0, xmm5
cvttps2dq xmm0, xmm0
pmuludq xmm3, xmm0
pshufd xmm6, xmm6, 0x4e
pshufd xmm0, xmm0, 0xf5
pmuludq xmm0, xmm6
pshufd xmm3, xmm3, 0xe8
pshufd xmm0, xmm0, 0xe8
punpckldq xmm3, xmm0
movdqu xmm0, xmmword [edi + esi*4 - 0x10]
paddd xmm2, xmm3
pshufd xmm3, xmm0, 0x1b
psubd xmm7, xmmword [0x445880]
pslld xmm7, 0x17
paddd xmm7, xmm5
cvttps2dq xmm6, xmm7
pmuludq xmm3, xmm6
pshufd xmm0, xmm0, 0x4e
pshufd xmm6, xmm6, 0xf5
pmuludq xmm6, xmm0
pshufd xmm0, xmm3, 0xe8
pshufd xmm3, xmm6, 0xe8
punpckldq xmm0, xmm3
paddd xmm4, xmm0
paddd xmm1, xmmword [0x4458a0]
add esi, 0xfffffff8
cmp edx, esi
jne 0x416d90
paddd xmm4, xmm2
pshufd xmm0, xmm4, 0xee
paddd xmm0, xmm4
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd edx, xmm1
cmp ebx, dword [esp + 0x14]
je 0x416e6f
mov ecx, dword [esp + 0x15d0]
sub ecx, eax
inc eax
nop word [eax + eax]
mov esi, dword [esp + eax*4 + 0x30]
shl esi, cl
add edx, esi
dec eax
inc ecx
cmp eax, 1
ja 0x416e60
mov eax, 1
mov ecx, dword [esp + 0x15d0]
shl eax, cl
cmp edx, eax
mov ebx, dword [esp + 8]
jne 0x41713f
shl ebp, 5
mov edi, dword [esp + 0x10]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00417350
add esp, 0xc
mov eax, dword [esp + 0x18]
mov esi, edi
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00417350
add esp, 0xc
cmp dword [esp + 0x15d0], 0
jle 0x416fc5
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0xc], ebp
jmp 0x416f0a
mov ebp, esi
mov esi, ebp
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15d0]
mov eax, ecx
mov ebp, dword [esp + 0xc]
je 0x416fc5
mov edi, dword [esp + eax*4 + 0x34]
test edi, edi
jle 0x416ef0
mov edx, edi
and edx, 3
je 0x416f60
mov dword [esp + 0x20], edi
mov dword [esp + 8], ebx
mov ecx, dword [esp]
lea edi, [ecx + ebx*4]
xor esi, esi
nop dword [eax]
movzx ebx, word [edi]
mov ecx, ebp
mov ebp, dword [esp + 0x10]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
mov ebp, ecx
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x416f30
mov edi, dword [esp + 0x20]
mov edx, edi
sub edx, esi
mov ecx, dword [esp + 8]
sub ecx, esi
mov esi, dword [esp + 0x10]
jmp 0x416f64
mov ecx, ebx
mov edx, edi
cmp edi, 4
mov edi, dword [esp]
mov ebp, esi
mov ebx, ecx
jb 0x416ef2
dec edx
nop word cs:[eax + eax]
movzx ecx, word [edi + ebx*4]
mov esi, dword [esp + 0xc]
add esi, ebp
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x416f80
jmp 0x416ef2
mov ecx, dword [esp + 0x15cc]
mov edi, esi
mov dword [esp + 0x93c], 0
mov eax, dword [esp + 0x15d0]
cmp eax, 2
jl 0x41703d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x416ff6
xor eax, eax
mov edx, 2
jmp 0x417024
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
add eax, dword [esp + edx*4 + 0x3c]
add eax, eax
mov dword [esp + edx*4 + 0x944], eax
add edx, 2
cmp ebx, edx
jne 0x417000
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15cc]
je 0x41703d
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x938], eax
test ecx, ecx
jle 0x41712b
xor eax, eax
mov edx, dword [esp + 0x1c]
lea edx, [edx + edx*8]
mov esi, edx
shl esi, 5
add esi, edi
mov dword [esp + 0x20], esi
shl edx, 6
add edx, edi
mov dword [esp + 0x10], edx
jmp 0x41708c
mov ecx, dword [esp + 0x10]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15cc]
inc eax
cmp eax, ecx
je 0x41712b
mov edx, dword [esp + 0x20]
movzx edx, byte [eax + edx + 0x8f12]
test edx, edx
je 0x417083
mov ebx, dword [esp + edx*4 + 0x938]
lea esi, [ebx + 1]
mov dword [esp + edx*4 + 0x938], esi
xor edi, edi
cmp dl, 1
mov dword [esp], edx
je 0x417102
mov ebp, edx
and ebp, 0xfffffffe
xor edi, edi
nop
lea esi, [edi + edi]
mov ecx, ebx
xor ecx, 0xfffffffe
mov edx, ebx
or edx, 1
and edx, ecx
mov ecx, edx
not ecx
and ecx, esi
xor edx, esi
lea edi, [edx + edi*2]
sub edi, ecx
mov esi, ebx
shr esi, 1
lea ecx, [edi + edi]
mov edx, esi
xor edx, 0xfffffffe
or esi, 1
and esi, edx
mov edx, esi
not edx
and edx, ecx
xor esi, ecx
lea edi, [esi + edi*2]
sub edi, edx
shr ebx, 2
add ebp, 0xfffffffe
jne 0x4170c0
test byte [esp], 1
je 0x417070
lea ecx, [edi + edi]
mov edx, ebx
xor edx, 0xfffffffe
or ebx, 1
and ebx, edx
mov edx, ebx
not edx
and edx, ecx
xor ebx, ecx
lea edi, [ebx + edi*2]
sub edi, edx
jmp 0x417070
add esp, 0x15b8
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 1
shl eax, cl
xor edx, edx
mov ecx, dword [esp + 0x15d0]
dec ecx
jmp 0x417169
dec edi
mov dword [esp + esi*4 + 0x34], edi
add dword [esp + esi*4 + 0x38], 2
mov esi, edx
not esi
lea edx, [esi + edx*2]
cmp edx, eax
je 0x416e89
mov esi, dword [esp + 0x15d0]
dec dword [esp + esi*4 + 0x34]
cmp esi, 2
jl 0x41715a
mov esi, ecx
nop dword [eax + eax]
mov edi, dword [esp + esi*4 + 0x34]
test edi, edi
jne 0x417150
mov edi, esi
not edi
lea esi, [edi + esi*2]
test esi, esi
jg 0x417180
jmp 0x41715a