Function at 0x416b50
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15c0
call fcn.00417650
mov edi, ecx
mov ebx, dword [esp + 0x15d4]
pxor xmm0, xmm0
movdqu xmmword [esp + 0x3c], xmm0
movdqu xmmword [esp + 0x4c], xmm0
movdqu xmmword [esp + 0x5c], xmm0
movdqu xmmword [esp + 0x6c], xmm0
movdqu xmmword [esp + 0x7c], xmm0
movdqu xmmword [esp + 0x8c], xmm0
movdqu xmmword [esp + 0x9c], xmm0
movdqu xmmword [esp + 0xac], xmm0
mov dword [esp + 0xbc], 0
cmp dword [esp + 0x15dc], 0
mov dword [esp + 0x30], edx
je 0x416c35
test ebx, ebx
jle 0x41748e
xor eax, eax
cmp ebx, 1
je 0x416c08
mov ecx, dword [esp + 0x15d4]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x30]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop dword [eax + eax]
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x3c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x3c]
add eax, 2
cmp ecx, eax
jne 0x416bf0
mov ebx, dword [esp + 0x15d4]
test bl, 1
je 0x41748e
mov ecx, dword [esp + 0x30]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x3c]
jmp 0x41748e
mov ecx, edi
lea ebp, [edx + edx*8]
mov eax, ebp
shl eax, 6
mov dword [esp + 0x2c], eax
test ebx, ebx
mov dword [esp + 0x18], edi
jle 0x416cec
cmp ebx, 1
jne 0x417580
xor ebx, ebx
xor eax, eax
mov ecx, dword [esp + 0x15d4]
test cl, 1
je 0x416c8e
mov ecx, dword [esp + 0x2c]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x416c8e
mov word [esp + ebx*4 + 0x4c0], cx
mov word [esp + ebx*4 + 0x4c2], ax
inc ebx
lea eax, [esp + 0x940]
push 0x800
push 0
push eax
call fcn.004179c0
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x416d03
xor eax, eax
movzx ecx, word [esp + eax*4 + 0x4c0]
movzx edx, cl
inc dword [esp + edx*4 + 0x940]
shr ecx, 8
mov edx, dword [esp + ecx*4 + 0xd40]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov dword [esp + ecx*4 + 0xd40], edx
inc eax
cmp ebx, eax
jne 0x416cb0
mov eax, dword [esp + 0xd40]
jmp 0x416d0c
lea eax, [esp + 0x940]
push 0x800
push 0
push eax
call fcn.004179c0
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov edi, 2
sub edi, ecx
lea eax, [ebx - 1]
mov dword [esp + 0x34], eax
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0xc], eax
xor esi, esi
lea eax, [esp + 0x4c0]
mov dword [esp], eax
lea eax, [esp + 0x1140]
lea edx, [esp + 0x940]
xor ecx, ecx
mov dword [esp + 0x10], ebp
mov dword [esp + 8], ebx
mov dword [esp + 0x38], edi
jmp 0x416d7a
mov esi, dword [esp + 0x14]
inc esi
add ecx, 8
add edx, 0x400
mov eax, dword [esp + 0x1c]
cmp esi, edi
je 0x416e89
mov dword [esp + 0x14], esi
mov esi, dword [esp]
mov dword [esp + 0x1c], esi
mov dword [esp], eax
mov eax, 3
xor esi, esi
nop
mov dword [esp + eax*4 + 0xb4], esi
add esi, dword [edx + eax*4 - 0xc]
mov dword [esp + eax*4 + 0xb8], esi
add esi, dword [edx + eax*4 - 8]
mov dword [esp + eax*4 + 0xbc], esi
add esi, dword [edx + eax*4 - 4]
mov dword [esp + eax*4 + 0xc0], esi
add esi, dword [edx + eax*4]
add eax, 4
cmp eax, 0x103
jne 0x416d90
cmp byte [esp + 7], 0
jne 0x416d60
cmp dword [esp + 0x34], 0
je 0x416e3a
xor eax, eax
mov edi, dword [esp]
mov ebp, dword [esp + 0x1c]
nop dword [eax]
movzx ebx, word [ebp + eax*4]
shr ebx, cl
movzx esi, bl
mov ebx, dword [esp + esi*4 + 0xc0]
lea ebp, [ebx + 1]
mov dword [esp + esi*4 + 0xc0], ebp
mov esi, dword [esp + 0x1c]
mov esi, dword [esi + eax*4]
mov dword [edi + ebx*4], esi
mov esi, dword [esp + 0x1c]
movzx ebx, word [esi + eax*4 + 4]
shr ebx, cl
movzx esi, bl
mov ebx, dword [esp + esi*4 + 0xc0]
lea ebp, [ebx + 1]
mov dword [esp + esi*4 + 0xc0], ebp
mov ebp, dword [esp + 0x1c]
mov esi, dword [ebp + eax*4 + 4]
mov dword [edi + ebx*4], esi
add eax, 2
cmp dword [esp + 0xc], eax
jne 0x416de0
jmp 0x416e3c
xor eax, eax
mov ebx, dword [esp + 8]
test bl, 1
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x38]
je 0x416d60
mov edi, dword [esp + 0x1c]
movzx ebx, word [edi + eax*4]
shr ebx, cl
movzx esi, bl
mov ebx, dword [esp + esi*4 + 0xc0]
lea ebp, [ebx + 1]
mov dword [esp + esi*4 + 0xc0], ebp
mov ebp, dword [esp + 0x10]
mov eax, dword [edi + eax*4]
mov edi, dword [esp + 0x38]
mov esi, dword [esp]
mov dword [esi + ebx*4], eax
mov ebx, dword [esp + 8]
jmp 0x416d60
test ebx, ebx
je 0x417359
mov ecx, dword [esp + 8]
cmp ecx, 1
jne 0x416ea7
mov eax, dword [esp]
mov word [eax], 1
jmp 0x41710d
mov edx, dword [esp]
movzx eax, word [edx + 4]
add word [edx], ax
mov eax, ecx
xor eax, 0xfffffffe
add ecx, ecx
mov dword [esp + 0x14], ecx
and ecx, 0xfffffffc
mov edx, eax
add eax, ecx
inc eax
mov dword [esp + 0x1c], eax
cmp eax, 2
jl 0x416f7e
add edx, ecx
neg edx
mov dword [esp + 0xc], edx
xor edi, edi
mov esi, 2
mov ebx, 1
jmp 0x416f18
mov eax, dword [esp]
movzx edx, word [eax + edi*4]
add word [eax + ebx*4], dx
mov ecx, edi
mov word [eax + edi*4], bx
xor edi, 1
and ecx, 1
lea edi, [edi + ecx*2]
mov eax, dword [esp + 0xc]
lea ecx, [eax + ebx]
inc ecx
inc ebx
cmp ecx, 1
je 0x416f7e
mov eax, dword [esp]
movzx ecx, word [eax + edi*4]
cmp esi, dword [esp + 8]
jge 0x416f2e
movzx edx, word [eax + esi*4]
cmp cx, dx
jae 0x416f40
mov word [eax + ebx*4], cx
mov word [eax + edi*4], bx
inc edi
cmp esi, dword [esp + 8]
jge 0x416ef0
jmp 0x416f4b
inc esi
mov word [eax + ebx*4], dx
cmp esi, dword [esp + 8]
jge 0x416ef0
cmp edi, ebx
jge 0x416f70
mov eax, dword [esp]
movzx edx, word [eax + edi*4]
movzx ecx, word [eax + esi*4]
cmp dx, cx
jb 0x416ef7
jmp 0x416f77
mov eax, dword [esp]
movzx ecx, word [eax + esi*4]
inc esi
add word [eax + ebx*4], cx
jmp 0x416f0a
mov esi, dword [esp + 8]
mov edx, dword [esp]
mov word [edx + esi*4 - 8], 0
mov eax, esi
xor eax, 0xfffffffc
mov edi, dword [esp + 0x14]
and edi, 0xfffffff8
add edi, eax
inc edi
js 0x417011
add esi, 2
mov eax, edi
and esi, 3
je 0x416fc1
mov eax, edi
nop dword [eax]
movzx ecx, word [edx + eax*4]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4], cx
dec eax
dec esi
jne 0x416fb0
cmp edi, 3
mov esi, dword [esp + 8]
jb 0x417011
inc eax
nop dword [eax + eax]
movzx ecx, word [edx + eax*4 - 4]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 4], cx
movzx ecx, word [edx + eax*4 - 8]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 8], cx
movzx ecx, word [edx + eax*4 - 0xc]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0xc], cx
movzx ecx, word [edx + eax*4 - 0x10]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x416fd0
lea edx, [esi - 2]
mov esi, 1
xor eax, eax
mov edi, dword [esp + 0x1c]
jmp 0x417042
mov edi, dword [esp + 0x1c]
mov ebx, ecx
lea esi, [ebx + ebx]
inc eax
test ebx, ebx
jle 0x417102
test edx, edx
mov dword [esp + 0x1c], edi
js 0x417070
lea ecx, [edx + 1]
xor edi, edi
nop
mov ebx, ecx
mov ecx, dword [esp]
movzx ecx, word [ecx + edx*4]
cmp eax, ecx
jne 0x417080
inc edi
dec edx
mov ecx, ebx
cmp ebx, edi
jne 0x417050
mov edx, 0xffffffff
jmp 0x417082
xor ecx, ecx
jmp 0x417082
mov ecx, edi
mov edi, esi
sub edi, ecx
jle 0x417030
mov ebx, ecx
not ebx
add ebx, esi
and edi, 3
mov dword [esp + 0xc], ecx
je 0x4170cc
mov dword [esp + 0x14], ebx
mov ecx, dword [esp]
mov ebx, dword [esp + 0x1c]
lea ecx, [ecx + ebx*4]
xor ebx, ebx
nop word [eax + eax]
mov word [ecx], ax
inc ebx
add ecx, 0xfffffffc
cmp edi, ebx
jne 0x4170b0
sub esi, ebx
mov edi, dword [esp + 0x1c]
sub edi, ebx
mov ecx, dword [esp]
mov ebx, dword [esp + 0x14]
jmp 0x4170d3
mov ecx, dword [esp]
mov edi, dword [esp + 0x1c]
cmp ebx, 3
mov ebx, dword [esp + 0xc]
jb 0x417036
mov word [ecx + edi*4], ax
mov word [ecx + edi*4 - 4], ax
mov word [ecx + edi*4 - 8], ax
mov word [ecx + edi*4 - 0xc], ax
add edi, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ebx
jg 0x4170e0
jmp 0x417036
cmp dword [esp + 8], 0
jle 0x417359
mov edi, dword [esp + 8]
mov eax, edi
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x34], 3
mov ebx, dword [esp]
jb 0x41715a
mov edx, edi
and edx, 0xfffffffc
xor ecx, ecx
nop dword [eax]
movzx esi, word [ebx + ecx*4]
inc dword [esp + esi*4 + 0x3c]
movzx esi, word [ebx + ecx*4 + 4]
inc dword [esp + esi*4 + 0x3c]
movzx esi, word [ebx + ecx*4 + 8]
inc dword [esp + esi*4 + 0x3c]
movzx esi, word [ebx + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x3c]
add ecx, 4
cmp edx, ecx
jne 0x417130
test eax, eax
je 0x41717d
mov edx, dword [esp]
lea ecx, [edx + ecx*4]
xor edx, edx
nop word cs:[eax + eax]
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x3c]
inc edx
cmp eax, edx
jne 0x417170
cmp edi, 2
jl 0x417359
mov ecx, dword [esp + 0x15d8]
lea eax, [ecx + 1]
cmp eax, 0x20
jg 0x417200
mov esi, dword [esp + ecx*4 + 0x3c]
mov edx, ecx
neg edx
and edx, 3
je 0x4171bc
nop word cs:[eax + eax]
add esi, dword [esp + eax*4 + 0x3c]
mov dword [esp + ecx*4 + 0x3c], esi
inc eax
dec edx
jne 0x4171b0
lea edx, [ecx - 0x1d]
cmp edx, 3
jb 0x4171f8
add eax, 3
nop word [eax + eax]
add esi, dword [esp + eax*4 + 0x30]
mov dword [esp + ecx*4 + 0x3c], esi
add esi, dword [esp + eax*4 + 0x34]
mov dword [esp + ecx*4 + 0x3c], esi
add esi, dword [esp + eax*4 + 0x38]
mov dword [esp + ecx*4 + 0x3c], esi
add esi, dword [esp + eax*4 + 0x3c]
mov dword [esp + ecx*4 + 0x3c], esi
add eax, 4
cmp eax, 0x24
jne 0x4171d0
test ecx, ecx
jle 0x4175e5
cmp ecx, 1
mov ebp, ecx
adc ebp, 0xffffffff
inc ebp
mov eax, ecx
xor edx, edx
cmp ebp, 8
jb 0x41731e
mov esi, ebp
and esi, 0xfffffff8
mov ecx, dword [esp + 0x15d8]
mov eax, ecx
sub eax, esi
movd xmm0, ecx
pshufd xmm0, xmm0, 0
movdqa xmm1, xmmword [0x45c720]
movdqu xmmword [esp + 0x1c], xmm0
paddd xmm1, xmm0
mov edx, esi
neg edx
lea edi, [esp + ecx*4]
add edi, 0x30
pxor xmm2, xmm2
xor ebx, ebx
movdqa xmm5, xmmword [0x45c740]
pxor xmm3, xmm3
nop dword [eax]
movdqu xmm6, xmmword [edi + ebx*4]
pshufd xmm4, xmm6, 0x1b
movdqu xmm0, xmmword [esp + 0x1c]
psubd xmm0, xmm1
movdqa xmm7, xmm0
pslld xmm0, 0x17
paddd xmm0, xmm5
cvttps2dq xmm0, xmm0
pmuludq xmm4, xmm0
pshufd xmm6, xmm6, 0x4e
pshufd xmm0, xmm0, 0xf5
pmuludq xmm0, xmm6
pshufd xmm4, xmm4, 0xe8
pshufd xmm0, xmm0, 0xe8
punpckldq xmm4, xmm0
movdqu xmm0, xmmword [edi + ebx*4 - 0x10]
paddd xmm2, xmm4
pshufd xmm4, xmm0, 0x1b
psubd xmm7, xmmword [0x45c730]
pslld xmm7, 0x17
paddd xmm7, xmm5
cvttps2dq xmm6, xmm7
pmuludq xmm4, xmm6
pshufd xmm0, xmm0, 0x4e
pshufd xmm6, xmm6, 0xf5
pmuludq xmm6, xmm0
pshufd xmm0, xmm4, 0xe8
pshufd xmm4, xmm6, 0xe8
punpckldq xmm0, xmm4
paddd xmm3, xmm0
paddd xmm1, xmmword [0x45c750]
add ebx, 0xfffffff8
cmp edx, ebx
jne 0x417260
paddd xmm3, xmm2
pshufd xmm0, xmm3, 0xee
paddd xmm0, xmm3
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd edx, xmm1
cmp ebp, esi
je 0x41733f
mov ecx, dword [esp + 0x15d8]
sub ecx, eax
inc eax
nop dword [eax + eax]
mov esi, dword [esp + eax*4 + 0x38]
shl esi, cl
add edx, esi
dec eax
inc ecx
cmp eax, 1
ja 0x417330
mov eax, 1
mov ecx, dword [esp + 0x15d8]
shl eax, cl
cmp edx, eax
mov ebp, dword [esp + 0x10]
jne 0x4175ee
shl ebp, 5
mov edi, dword [esp + 0x18]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.004179c0
add esp, 0xc
mov eax, dword [esp + 0x2c]
mov esi, edi
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.004179c0
add esp, 0xc
cmp dword [esp + 0x15d8], 0
mov ebx, dword [esp + 8]
jle 0x417485
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0x10], ebp
jmp 0x4173da
mov ebp, esi
mov esi, ebp
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15d8]
mov eax, ecx
mov ebp, dword [esp + 0x10]
je 0x417485
mov edi, dword [esp + eax*4 + 0x3c]
test edi, edi
jle 0x4173c0
mov edx, edi
and edx, 3
je 0x417430
mov dword [esp + 0x1c], 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 + 0x18]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
mov ebp, ecx
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x417400
mov edi, dword [esp + 0x1c]
mov edx, edi
sub edx, esi
mov ebx, dword [esp + 8]
sub ebx, esi
mov esi, dword [esp + 0x18]
jmp 0x417432
mov edx, edi
cmp edi, 4
mov edi, dword [esp]
mov ebp, esi
jb 0x4173c2
dec edx
nop dword [eax]
movzx ecx, word [edi + ebx*4]
mov esi, dword [esp + 0x10]
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 0x417440
jmp 0x4173c2
mov ebx, dword [esp + 0x15d4]
mov edi, esi
mov dword [esp + 0x944], 0
mov edx, dword [esp + 0x15d8]
cmp edx, 2
jl 0x4174c2
mov eax, 2
xor ecx, ecx
nop dword [eax]
add ecx, dword [esp + eax*4 + 0x38]
add ecx, ecx
mov dword [esp + eax*4 + 0x940], ecx
inc eax
cmp eax, edx
jle 0x4174b0
test ebx, ebx
jle 0x417575
xor eax, eax
mov ecx, dword [esp + 0x30]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, edi
mov dword [esp + 0xc], edx
shl ecx, 6
add ecx, edi
mov dword [esp + 0x18], ecx
jmp 0x417516
and ebx, 1
test byte [esp + 0x1c], 1
lea ecx, [ebx + edi*2]
cmove ecx, edi
mov edx, dword [esp + 0x18]
mov word [edx + eax*2 + 0x8852], cx
mov ebx, dword [esp + 0x15d4]
inc eax
cmp eax, ebx
je 0x417575
mov ecx, dword [esp + 0xc]
movzx edx, byte [eax + ecx + 0x8f12]
test edx, edx
je 0x417511
mov ebx, dword [esp + edx*4 + 0x940]
lea ecx, [ebx + 1]
mov dword [esp + edx*4 + 0x940], ecx
xor edi, edi
cmp dl, 1
mov dword [esp + 0x1c], edx
je 0x4174f0
mov ebp, edx
and ebp, 0xfffffffe
lea ecx, [edx + edx]
add ecx, 0xfffffffe
xor edx, edx
nop
mov edi, ebx
shr edi, 1
mov esi, ebx
and esi, 1
add esi, esi
lea edx, [esi + edx*4]
and edi, 1
or edi, edx
shr ebx, 2
add ecx, 0xfffffffc
mov edx, edi
add ebp, 0xfffffffe
jne 0x417550
jmp 0x4174f0
add esp, 0x15c0
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x2c]
lea edx, [eax + edi]
add edx, 0x8194
xor ebx, ebx
xor eax, eax
jmp 0x4175ab
add eax, 2
cmp ecx, eax
je 0x416c5c
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x4175c6
mov word [esp + ebx*4 + 0x4c0], si
mov word [esp + ebx*4 + 0x4c2], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x4175a0
mov word [esp + ebx*4 + 0x4c0], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4c2], si
inc ebx
jmp 0x4175a0
mov eax, 1
shl eax, cl
xor edx, edx
mov edi, dword [esp + 0x15d8]
mov esi, edi
or esi, 0xfffffffe
and edi, 0xfffffffe
lea ecx, [esi + edi]
inc ecx
add esi, edi
add esi, 2
jmp 0x417623
dec ebx
mov dword [esp + edi*4 + 0x38], ebx
add dword [esp + edi*4 + 0x3c], 2
dec edx
cmp edx, eax
je 0x417359
mov edi, dword [esp + 0x15d8]
dec dword [esp + edi*4 + 0x3c]
test ecx, ecx
jle 0x41761a
mov edi, esi
nop word cs:[eax + eax]
mov ebx, dword [esp + edi*4 + 0x38]
test ebx, ebx
jne 0x417610
dec edi
cmp edi, 1
jg 0x417640
jmp 0x41761a