Function at 0x416720
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.00417200
mov dword [esp + 0xc], ecx
mov ebx, dword [esp + 0x15c0]
pxor xmm0, xmm0
movdqu xmmword [esp + 0x28], xmm0
movdqu xmmword [esp + 0x38], xmm0
movdqu xmmword [esp + 0x48], xmm0
movdqu xmmword [esp + 0x58], xmm0
movdqu xmmword [esp + 0x68], xmm0
movdqu xmmword [esp + 0x78], xmm0
movdqu xmmword [esp + 0x88], xmm0
movdqu xmmword [esp + 0x98], xmm0
mov dword [esp + 0xa8], 0
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0x18], edx
je 0x416800
test ebx, ebx
jle 0x41703c
xor eax, eax
cmp ebx, 1
je 0x4167d8
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0xc]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop dword [eax + eax]
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x28]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x28]
add eax, 2
cmp ecx, eax
jne 0x4167c0
test bl, 1
je 0x41703c
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0xc]
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x28]
jmp 0x41703c
lea eax, [edx + edx*8]
mov dword [esp + 0x1c], eax
shl eax, 6
mov dword [esp + 0x14], eax
test ebx, ebx
jle 0x4168f9
cmp ebx, 1
jne 0x416adb
xor eax, eax
xor edi, edi
test bl, 1
mov ebx, edi
je 0x416854
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x416854
mov word [esp + ebx*4 + 0xac], cx
mov word [esp + ebx*4 + 0xae], ax
inc ebx
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.004173d0
add esp, 0xc
test ebx, ebx
sete byte [esp + 0x10]
je 0x416910
xor eax, eax
cmp ebx, 1
je 0x4168cf
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop word cs:[eax + eax]
movzx edx, word [esp + eax*4 + 0xac]
movzx esi, dl
inc dword [esp + esi*4 + 0x52c]
shr edx, 8
inc dword [esp + edx*4 + 0x92c]
movzx edx, word [esp + eax*4 + 0xb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x52c]
shr edx, 8
inc dword [esp + edx*4 + 0x92c]
add eax, 2
cmp ecx, eax
jne 0x416890
test bl, 1
je 0x4168f0
movzx eax, word [esp + eax*4 + 0xac]
movzx ecx, al
inc dword [esp + ecx*4 + 0x52c]
shr eax, 8
inc dword [esp + eax*4 + 0x92c]
mov eax, dword [esp + 0x92c]
jmp 0x416919
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.004173d0
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0x10], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x24], eax
lea eax, [esp + 0xac]
mov dword [esp + 4], eax
lea edx, [esp + 0x112c]
xor ecx, ecx
lea esi, [esp + 0x52c]
xor eax, eax
mov dword [esp], ebx
jmp 0x41696e
mov eax, dword [esp + 8]
inc eax
add ecx, 8
mov esi, dword [esp + 0x20]
add esi, 0x400
mov edx, ebp
cmp eax, dword [esp + 0x24]
je 0x416a21
mov dword [esp + 8], eax
mov ebp, dword [esp + 4]
mov dword [esp + 4], edx
mov edx, 3
xor edi, edi
nop word cs:[eax + eax]
mov dword [esp + edx*4 + 0xd20], edi
add edi, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xd24], edi
add edi, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xd28], edi
add edi, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xd2c], edi
add edi, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x416990
mov dword [esp + 0x20], esi
cmp byte [esp + 0x10], 0
mov edi, dword [esp + 4]
jne 0x416950
xor edx, edx
nop dword [eax + eax]
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov esi, ebp
mov ebp, edi
mov edi, dword [esp + eax*4 + 0xd2c]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xd2c], ebx
mov ebx, dword [esp]
mov eax, dword [esi + edx*4]
mov dword [ebp + edi*4], eax
mov edi, ebp
mov ebp, esi
mov eax, edx
and eax, 1
xor edx, 1
lea edx, [edx + eax*2]
cmp edx, ebx
jb 0x4169e0
jmp 0x416950
test ebx, ebx
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 4]
je 0x416f1a
mov edx, dword [esp]
cmp edx, 1
jne 0x416a43
mov word [ebx], 1
jmp 0x416cfc
movzx eax, word [ebx + 4]
add word [ebx], ax
cmp edx, 3
jl 0x416b45
mov eax, 2
mov ecx, 2
sub ecx, edx
xor edx, edx
mov esi, 1
jmp 0x416a8b
movzx ebp, word [ebx + edx*4]
add word [ebx + esi*4], bp
mov word [ebx + edx*4], si
inc edx
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
je 0x416b54
movzx edi, word [ebx + edx*4]
cmp eax, dword [esp]
jge 0x416a9d
movzx ebp, word [ebx + eax*4]
cmp di, bp
jae 0x416ab0
mov word [ebx + esi*4], di
mov word [ebx + edx*4], si
inc edx
cmp eax, dword [esp]
jge 0x416a70
jmp 0x416aba
inc eax
mov word [ebx + esi*4], bp
cmp eax, dword [esp]
jge 0x416a70
cmp edx, esi
jge 0x416ad0
movzx ebp, word [ebx + edx*4]
movzx edi, word [ebx + eax*4]
cmp bp, di
jb 0x416a74
jmp 0x416ad4
movzx edi, word [ebx + eax*4]
inc eax
add word [ebx + esi*4], di
jmp 0x416a7d
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
add edx, eax
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x416b0b
add eax, 2
cmp ecx, eax
je 0x416823
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x416b26
mov word [esp + edi*4 + 0xac], si
mov word [esp + edi*4 + 0xae], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x416b00
mov word [esp + edi*4 + 0xac], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0xae], si
inc edi
jmp 0x416b00
lea eax, [edx - 2]
mov word [ebx + edx*4 - 8], 0
jmp 0x416be4
mov eax, ebx
mov ebx, dword [esp]
mov word [eax + ebx*4 - 8], 0
lea edx, [ebx - 3]
mov ecx, edx
test bl, 1
je 0x416b8a
mov esi, dword [esp + 4]
movzx eax, word [esi + ebx*4 - 0xc]
movzx eax, word [esi + eax*4]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
mov word [esi + ebx*4 - 0xc], ax
lea ecx, [ebx - 4]
lea eax, [ebx - 2]
test edx, edx
je 0x416bdd
mov ebx, dword [esp + 4]
nop word cs:[eax + eax]
movzx edx, word [ebx + ecx*4]
movzx edx, word [ebx + edx*4]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov word [ebx + ecx*4], dx
movzx edx, word [ebx + ecx*4 - 4]
movzx edx, word [ebx + edx*4]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov word [ebx + ecx*4 - 4], dx
add ecx, 0xfffffffe
cmp ecx, 0xffffffff
jne 0x416ba0
mov edx, dword [esp]
jmp 0x416be4
mov edx, dword [esp]
mov ebx, dword [esp + 4]
lea ecx, [edx - 1]
mov esi, 1
xor edx, edx
jmp 0x416c17
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
mov ebp, dword [esp + 0x1c]
jle 0x416cf2
test eax, eax
js 0x416c40
lea ebp, [eax + 1]
xor edi, edi
movzx ebx, word [ebx + eax*4]
cmp edx, ebx
jne 0x416c50
inc edi
dec eax
cmp ebp, edi
mov ebx, dword [esp + 4]
jne 0x416c20
mov eax, 0xffffffff
jmp 0x416c56
xor ebp, ebp
jmp 0x416c56
mov ebp, edi
mov ebx, dword [esp + 4]
mov edi, esi
sub edi, ebp
jle 0x416bf0
mov dword [esp + 8], ebp
cmp edi, 8
jae 0x416c70
mov ebp, dword [esp + 8]
jmp 0x416cd4
mov dword [esp + 0x20], edi
mov ebp, edi
and ebp, 0xfffffff8
sub esi, ebp
mov edi, ebp
neg edi
mov ebx, edi
mov edi, dword [esp + 4]
lea edi, [edi + ecx*4]
mov dword [esp + 0x10], ebp
sub ecx, ebp
xor ebp, ebp
mov word [edi + ebp*4], dx
mov word [edi + ebp*4 - 4], dx
mov word [edi + ebp*4 - 8], dx
mov word [edi + ebp*4 - 0xc], dx
mov word [edi + ebp*4 - 0x10], dx
mov word [edi + ebp*4 - 0x14], dx
mov word [edi + ebp*4 - 0x18], dx
mov word [edi + ebp*4 - 0x1c], dx
add ebp, 0xfffffff8
cmp ebx, ebp
jne 0x416c90
mov edi, dword [esp + 0x10]
cmp dword [esp + 0x20], edi
mov ebp, dword [esp + 8]
mov ebx, dword [esp + 4]
je 0x416bf0
lea edi, [ecx + ecx]
nop word [eax + eax]
mov word [ebx + edi*2], dx
dec esi
add edi, 0xfffffffe
dec ecx
cmp esi, ebp
jg 0x416ce0
jmp 0x416bf0
cmp dword [esp], 0
jle 0x416f1a
mov eax, dword [esp]
lea edx, [eax - 1]
and eax, 3
xor ecx, ecx
cmp edx, 3
jb 0x416d4a
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop word cs:[eax + eax]
movzx esi, word [ebx + ecx*4]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [ebx + ecx*4 + 4]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [ebx + ecx*4 + 8]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [ebx + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x28]
add ecx, 4
cmp edx, ecx
jne 0x416d20
test eax, eax
je 0x416d6d
lea ecx, [ebx + ecx*4]
xor edx, edx
nop word cs:[eax + eax]
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x28]
inc edx
cmp eax, edx
jne 0x416d60
cmp dword [esp], 2
jl 0x416f1a
mov ecx, dword [esp + 0x15c4]
lea eax, [ecx + 1]
cmp eax, 0x20
jg 0x416df0
mov esi, dword [esp + ecx*4 + 0x28]
mov edx, ecx
neg edx
and edx, 3
je 0x416dac
nop word cs:[eax + eax]
add esi, dword [esp + eax*4 + 0x28]
mov dword [esp + ecx*4 + 0x28], esi
inc eax
dec edx
jne 0x416da0
lea edx, [ecx - 0x1d]
cmp edx, 3
jb 0x416de8
add eax, 3
nop word [eax + eax]
add esi, dword [esp + eax*4 + 0x1c]
mov dword [esp + ecx*4 + 0x28], esi
add esi, dword [esp + eax*4 + 0x20]
mov dword [esp + ecx*4 + 0x28], esi
add esi, dword [esp + eax*4 + 0x24]
mov dword [esp + ecx*4 + 0x28], esi
add esi, dword [esp + eax*4 + 0x28]
mov dword [esp + ecx*4 + 0x28], esi
add eax, 4
cmp eax, 0x24
jne 0x416dc0
test ecx, ecx
jle 0x4171ad
mov eax, ecx
not eax
cmp ecx, 1
mov edi, ecx
adc edi, 0xffffffff
inc edi
xor esi, esi
mov edx, ecx
cmp edi, 4
jb 0x416edb
mov esi, edi
and esi, 0xfffffffc
mov ecx, dword [esp + 0x15c4]
mov edx, ecx
sub edx, esi
movd xmm0, ecx
pshufd xmm0, xmm0, 0
movdqa xmm4, xmmword [0x45c950]
paddd xmm4, xmm0
movd xmm2, eax
pshufd xmm2, xmm2, 0
mov dword [esp + 8], esi
neg esi
lea ebp, [esp + ecx*4]
add ebp, 0x1c
pxor xmm3, xmm3
xor ecx, ecx
movdqa xmm5, xmmword [0x45c970]
nop word cs:[eax + eax]
movdqu xmm6, xmmword [ebp + ecx*4]
movdqa xmm7, xmm4
pand xmm7, xmm2
movdqa xmm1, xmm4
pandn xmm1, xmm0
psubd xmm1, xmm7
pshufd xmm7, xmm6, 0x1b
pslld xmm1, 0x17
paddd xmm1, xmmword [0x45c960]
cvttps2dq xmm1, xmm1
pmuludq xmm7, xmm1
pshufd xmm1, xmm1, 0xf5
pshufd xmm6, xmm6, 0x4e
pmuludq xmm6, xmm1
pshufd xmm1, xmm7, 0xe8
pshufd xmm6, xmm6, 0xe8
punpckldq xmm1, xmm6
paddd xmm3, xmm1
paddd xmm4, xmm5
add ecx, 0xfffffffc
cmp esi, ecx
jne 0x416e60
pshufd xmm0, xmm3, 0xee
paddd xmm0, xmm3
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd esi, xmm1
cmp edi, dword [esp + 8]
je 0x416f00
mov ebp, edx
not ebp
nop
mov edi, edx
and edi, eax
mov ecx, ebp
and ecx, dword [esp + 0x15c4]
sub ecx, edi
mov edi, dword [esp + edx*4 + 0x28]
shl edi, cl
add esi, edi
inc ebp
cmp edx, 1
lea edx, [edx - 1]
ja 0x416ee0
mov eax, 1
mov ecx, dword [esp + 0x15c4]
shl eax, cl
cmp esi, eax
mov ebp, dword [esp + 0x1c]
jne 0x4171c9
shl ebp, 5
mov edi, dword [esp + 0xc]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.004173d0
add esp, 0xc
mov eax, dword [esp + 0x14]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.004173d0
add esp, 0xc
cmp dword [esp + 0x15c4], 0
jle 0x417035
add ebx, 0xfffffffe
mov eax, 1
mov dword [esp + 4], ebx
jmp 0x416f88
mov edi, ebx
mov ebx, dword [esp]
mov dword [esp], ebx
inc eax
cmp eax, dword [esp + 0x15c4]
mov ebx, edi
jg 0x417035
mov edi, dword [esp + eax*4 + 0x28]
test edi, edi
jle 0x416f70
mov edx, edi
and edx, 3
je 0x416fe0
mov dword [esp + 8], edi
mov ecx, ebp
mov esi, dword [esp]
lea edi, [ebx + esi*4]
xor esi, esi
nop word cs:[eax + eax]
movzx ebx, word [edi]
mov ebp, dword [esp + 0xc]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x416fb0
sub dword [esp], esi
mov edi, dword [esp + 8]
mov edx, edi
sub edx, esi
mov ebp, ecx
jmp 0x416fe2
mov edx, edi
cmp edi, 4
mov ebx, dword [esp]
mov edi, dword [esp + 4]
jb 0x416f75
dec edx
nop
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 0x416ff0
jmp 0x416f75
mov ebx, dword [esp + 0x15c0]
mov dword [esp + 0x530], 0
mov eax, dword [esp + 0x15c4]
cmp eax, 2
jl 0x4170d8
lea ecx, [eax - 1]
cmp eax, 2
jne 0x41706d
xor edx, edx
mov eax, 2
test cl, 1
jne 0x4170c2
jmp 0x4170d8
mov ebx, ecx
and ebx, 0xfffffffe
xor edx, edx
xor eax, eax
nop word cs:[eax + eax]
mov esi, dword [esp + eax*4 + 0x2c]
mov edi, dword [esp + eax*4 + 0x30]
mov ebp, esi
and ebp, edx
xor esi, edx
lea edx, [esi + ebp*2]
add edx, edx
mov dword [esp + eax*4 + 0x534], edx
mov esi, edi
and esi, edx
xor edx, edi
lea edx, [edx + esi*2]
add edx, edx
mov dword [esp + eax*4 + 0x538], edx
add eax, 2
cmp ebx, eax
jne 0x417080
add eax, 2
mov ebx, dword [esp + 0x15c0]
test cl, 1
je 0x4170d8
mov ecx, dword [esp + eax*4 + 0x24]
mov esi, ecx
and esi, edx
xor ecx, edx
lea ecx, [ecx + esi*2]
add ecx, ecx
mov dword [esp + eax*4 + 0x52c], ecx
test ebx, ebx
jle 0x4171a2
xor eax, eax
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
mov ebp, dword [esp + 0xc]
add edx, ebp
shl ecx, 6
add ecx, ebp
mov dword [esp], ecx
jmp 0x41711b
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], bx
mov ebx, dword [esp + 0x15c0]
inc eax
cmp eax, ebx
je 0x4171a2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x417112
mov ebp, dword [esp + ecx*4 + 0x52c]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x52c], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x41717f
and ecx, 0xfffffffc
xor ebx, ebx
nop dword [eax]
mov esi, ebp
and esi, 1
shl esi, 2
lea esi, [esi + ebx*8]
mov ebx, ebp
and ebx, 2
or ebx, esi
mov esi, ebp
shr esi, 2
and esi, 1
or esi, ebx
mov ebx, ebp
shr ebx, 3
and ebx, 1
lea ebx, [ebx + esi*2]
shr ebp, 4
add ecx, 0xfffffffc
jne 0x417150
test edi, edi
je 0x417100
nop word [eax + eax]
mov ecx, ebp
and ecx, 1
lea ebx, [ecx + ebx*2]
shr ebp, 1
dec edi
jne 0x417190
jmp 0x417100
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 1
shl eax, cl
xor esi, esi
jmp 0x4171c9
dec esi
cmp esi, eax
je 0x416f1a
mov ecx, dword [esp + 0x15c4]
dec dword [esp + ecx*4 + 0x28]
nop word cs:[eax + eax]
cmp ecx, 2
jl 0x4171c0
mov edx, dword [esp + ecx*4 + 0x24]
dec ecx
test edx, edx
je 0x4171e0
dec edx
mov dword [esp + ecx*4 + 0x28], edx
add dword [esp + ecx*4 + 0x2c], 2
jmp 0x4171c0