Function at 0x416050
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15c0
call fcn.00416b90
mov ebp, 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 + 0x14], edx
je 0x41612e
test ebx, ebx
jle 0x41697c
xor eax, eax
cmp ebx, 1
je 0x416108
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + ebp]
add edx, 0x8f13
xor eax, eax
nop word cs:[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 0x4160f0
test bl, 1
je 0x41697c
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, ebp
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x3c]
jmp 0x41697c
lea edi, [edx + edx*8]
mov ecx, ebx
mov ebx, edi
shl ebx, 6
test ecx, ecx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x10], edi
jle 0x4161e4
cmp ecx, 1
jne 0x416acd
xor eax, eax
xor ebp, ebp
mov ecx, dword [esp + 0x15d4]
test cl, 1
mov esi, ebp
je 0x416189
mov ecx, dword [esp + 0x30]
add ecx, ebx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x416189
mov word [esp + esi*4 + 0x4c0], cx
mov word [esp + esi*4 + 0x4c2], ax
inc esi
lea eax, [esp + 0x940]
push 0x800
push 0
push eax
call fcn.00416ef0
add esp, 0xc
test esi, esi
sete byte [esp + 8]
je 0x4161fb
xor eax, eax
nop dword [eax + eax]
movzx ecx, word [esp + eax*4 + 0x4c0]
movzx edx, cl
inc dword [esp + edx*4 + 0x940]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd40]
mov ecx, eax
xor ecx, 1
and eax, 1
lea eax, [ecx + eax*2]
cmp eax, esi
jb 0x4161b0
mov eax, dword [esp + 0xd40]
jmp 0x416204
lea eax, [esp + 0x940]
push 0x800
push 0
push eax
call fcn.00416ef0
add esp, 0xc
xor esi, esi
mov byte [esp + 8], 1
xor eax, eax
mov dword [esp + 0x34], ebx
xor ecx, ecx
cmp eax, esi
sete cl
mov ebp, 2
sub ebp, ecx
lea eax, [esi - 1]
mov dword [esp + 0x18], eax
mov dword [esp + 4], esi
and esi, 0xfffffffe
mov dword [esp + 0xc], esi
lea eax, [esp + 0x4c0]
mov dword [esp], eax
lea eax, [esp + 0x1140]
xor ecx, ecx
lea esi, [esp + 0x944]
xor edx, edx
mov dword [esp + 0x38], ebp
jmp 0x416268
mov edx, dword [esp + 0x1c]
inc edx
add ecx, 8
add esi, 0x400
mov eax, ebx
cmp edx, ebp
je 0x416368
mov dword [esp + 0x1c], edx
mov edx, dword [esp]
mov dword [esp + 0x20], edx
mov dword [esp], eax
xor eax, eax
xor edx, edx
nop word [eax + eax]
mov dword [esp + edx*4 + 0xc0], eax
mov edi, dword [esi + edx*4 - 4]
mov ebx, edi
and ebx, eax
xor edi, eax
lea eax, [edi + ebx*2]
mov dword [esp + edx*4 + 0xc4], eax
mov edi, dword [esi + edx*4]
mov ebx, edi
and ebx, eax
xor edi, eax
lea eax, [edi + ebx*2]
add edx, 2
cmp edx, 0x100
jne 0x416280
cmp byte [esp + 8], 0
mov ebx, dword [esp + 0x20]
jne 0x416250
cmp dword [esp + 0x18], 0
je 0x41632b
xor edx, edx
mov ebp, dword [esp]
nop dword [eax]
movzx eax, word [ebx + edx*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xc0]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xc0], ebx
mov eax, dword [esp + 0x20]
mov eax, dword [eax + edx*4]
mov dword [ebp + edi*4], eax
mov eax, dword [esp + 0x20]
movzx eax, word [eax + edx*4 + 4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xc0]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xc0], ebx
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx + edx*4 + 4]
mov dword [ebp + edi*4], eax
add edx, 2
cmp dword [esp + 0xc], edx
jne 0x4162d0
jmp 0x41632d
xor edx, edx
test byte [esp + 4], 1
mov ebp, dword [esp + 0x38]
je 0x416250
movzx eax, word [ebx + edx*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xc0]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xc0], ebx
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx + edx*4]
mov edx, dword [esp]
mov dword [edx + edi*4], eax
jmp 0x416250
cmp dword [esp + 4], 0
je 0x416855
cmp dword [esp + 4], 1
jne 0x416387
mov eax, dword [esp]
mov word [eax], 1
jmp 0x41660d
mov ecx, dword [esp]
movzx eax, word [ecx + 4]
add word [ecx], ax
cmp dword [esp + 0x18], 2
jl 0x41644e
mov eax, 2
mov ecx, 2
sub ecx, dword [esp + 4]
xor esi, esi
mov ebp, 1
jmp 0x4163da
mov ebx, dword [esp]
movzx edi, word [ebx + esi*4]
add word [ebx + ebp*4], di
mov word [ebx + esi*4], bp
inc esi
lea edx, [ecx + ebp]
inc edx
inc ebp
cmp edx, 1
je 0x41644e
mov ebx, dword [esp]
movzx edx, word [ebx + esi*4]
cmp eax, dword [esp + 4]
jge 0x4163f0
movzx edi, word [ebx + eax*4]
cmp dx, di
jae 0x416410
mov word [ebx + ebp*4], dx
mov word [ebx + esi*4], bp
inc esi
cmp eax, dword [esp + 4]
jge 0x4163c0
jmp 0x41641b
inc eax
mov word [ebx + ebp*4], di
cmp eax, dword [esp + 4]
jge 0x4163c0
cmp esi, ebp
jge 0x416440
mov ebx, dword [esp]
movzx edi, word [ebx + esi*4]
movzx edx, word [ebx + eax*4]
cmp di, dx
jb 0x4163c7
jmp 0x416447
mov ebx, dword [esp]
movzx edx, word [ebx + eax*4]
inc eax
add word [ebx + ebp*4], dx
jmp 0x4163d0
mov ecx, dword [esp + 4]
mov edi, dword [esp]
mov word [edi + ecx*4 - 8], 0
add ecx, 0xfffffffd
js 0x4164e1
mov eax, dword [esp + 4]
lea edx, [eax + 2]
mov eax, ecx
and edx, 3
je 0x416491
mov eax, ecx
nop word cs:[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 0x416480
cmp ecx, 3
jb 0x4164e1
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 0x4164a0
mov ecx, dword [esp + 4]
lea eax, [ecx - 2]
xor ecx, 0xfffffffe
mov edx, dword [esp + 0xc]
lea ecx, [ecx + edx*2]
inc ecx
mov esi, 1
xor edx, edx
jmp 0x41650c
lea esi, [ebx + ebx]
inc edx
test ebx, ebx
jle 0x416602
test eax, eax
js 0x416540
lea edi, [eax + 1]
mov dword [esp + 0x20], edi
mov ebx, eax
not ebx
xor ebp, ebp
nop dword [eax]
mov edi, dword [esp]
movzx edi, word [edi + eax*4]
cmp edx, edi
jne 0x416550
inc ebp
dec eax
mov edi, ebx
add edi, ebp
jne 0x416520
mov eax, 0xffffffff
mov ebx, dword [esp + 0x20]
jmp 0x416552
xor ebx, ebx
jmp 0x416552
mov ebx, ebp
mov edi, esi
sub edi, ebx
jle 0x416500
cmp edi, 8
jae 0x416570
mov edi, dword [esp]
jmp 0x4165e4
mov dword [esp + 0x20], ebx
mov dword [esp + 0xc], edi
mov ebx, edi
and ebx, 0xfffffff8
sub esi, ebx
mov edi, ebx
neg edi
mov dword [esp + 8], edi
mov edi, dword [esp]
lea ebp, [edi + ecx*4]
mov dword [esp + 0x1c], ebx
sub ecx, ebx
mov ebx, dword [esp + 8]
xor edi, edi
nop dword [eax]
mov word [ebp + edi*4], dx
mov word [ebp + edi*4 - 4], dx
mov word [ebp + edi*4 - 8], dx
mov word [ebp + edi*4 - 0xc], dx
mov word [ebp + edi*4 - 0x10], dx
mov word [ebp + edi*4 - 0x14], dx
mov word [ebp + edi*4 - 0x18], dx
mov word [ebp + edi*4 - 0x1c], dx
add edi, 0xfffffff8
cmp ebx, edi
jne 0x4165a0
mov edi, dword [esp + 0x1c]
cmp dword [esp + 0xc], edi
mov edi, dword [esp]
mov ebx, dword [esp + 0x20]
je 0x416500
lea ebp, [ecx + ecx]
nop word [eax + eax]
mov word [edi + ebp*2], dx
dec esi
add ebp, 0xfffffffe
dec ecx
cmp esi, ebx
jg 0x4165f0
jmp 0x416500
cmp dword [esp + 4], 0
jle 0x416855
mov eax, dword [esp + 4]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x18], 3
mov edi, dword [esp]
jb 0x41665a
mov edx, dword [esp + 4]
and edx, 0xfffffffc
xor ecx, ecx
nop dword [eax]
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x3c]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x3c]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x3c]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x3c]
add ecx, 4
cmp edx, ecx
jne 0x416630
test eax, eax
je 0x41667d
lea ecx, [edi + 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 0x416670
cmp dword [esp + 4], 2
jl 0x416855
mov ecx, dword [esp + 0x15d8]
lea eax, [ecx + 1]
cmp eax, 0x20
jg 0x416700
mov esi, dword [esp + ecx*4 + 0x3c]
mov edx, ecx
neg edx
and edx, 3
je 0x4166bc
nop word cs:[eax + eax]
add esi, dword [esp + eax*4 + 0x3c]
mov dword [esp + ecx*4 + 0x3c], esi
inc eax
dec edx
jne 0x4166b0
lea edx, [ecx - 0x1d]
cmp edx, 3
jb 0x4166f8
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 0x4166d0
test ecx, ecx
jle 0x416b25
cmp ecx, 1
mov edi, ecx
adc edi, 0xffffffff
inc edi
mov eax, ecx
xor edx, edx
cmp edi, 8
jb 0x41681f
mov ebx, edi
and ebx, 0xfffffff8
mov ecx, dword [esp + 0x15d8]
mov eax, ecx
sub eax, ebx
movd xmm0, ecx
pshufd xmm0, xmm0, 0
movdqa xmm1, xmmword [0x4638e0]
movdqu xmmword [esp + 0x20], xmm0
paddd xmm1, xmm0
mov edx, ebx
neg edx
lea ebp, [esp + ecx*4]
add ebp, 0x30
pxor xmm2, xmm2
xor esi, esi
movdqa xmm5, xmmword [0x463900]
pxor xmm3, xmm3
nop dword [eax]
movdqu xmm6, xmmword [ebp + esi*4]
pshufd xmm4, xmm6, 0x1b
movdqu xmm0, xmmword [esp + 0x20]
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 [ebp + esi*4 - 0x10]
paddd xmm2, xmm4
pshufd xmm4, xmm0, 0x1b
psubd xmm7, xmmword [0x4638f0]
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 [0x463910]
add esi, 0xfffffff8
cmp edx, esi
jne 0x416760
paddd xmm3, xmm2
pshufd xmm0, xmm3, 0xee
paddd xmm0, xmm3
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd edx, xmm1
cmp edi, ebx
je 0x41683f
mov ecx, dword [esp + 0x15d8]
sub ecx, eax
inc eax
nop dword [eax]
mov esi, dword [esp + eax*4 + 0x38]
shl esi, cl
add edx, esi
dec eax
inc ecx
cmp eax, 1
ja 0x416830
mov eax, 1
mov ecx, dword [esp + 0x15d8]
shl eax, cl
cmp edx, eax
jne 0x416b2e
mov edi, dword [esp + 0x10]
shl edi, 5
mov ebp, dword [esp + 0x30]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00416ef0
add esp, 0xc
mov eax, dword [esp + 0x34]
add eax, ebp
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00416ef0
add esp, 0xc
cmp dword [esp + 0x15d8], 0
jle 0x416975
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0x10], edi
jmp 0x4168ca
mov ebx, dword [esp + 4]
mov dword [esp + 4], ebx
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15d8]
mov eax, ecx
je 0x416975
mov ebx, dword [esp + eax*4 + 0x3c]
test ebx, ebx
jle 0x4168b0
mov edx, ebx
and edx, 3
je 0x416920
mov dword [esp + 0x20], ebx
mov ecx, ebp
mov esi, dword [esp + 4]
mov edi, dword [esp]
lea ebp, [edi + esi*4]
xor esi, esi
nop dword [eax + eax]
movzx edi, word [ebp]
mov ebx, dword [esp + 0x10]
add ebx, ecx
mov byte [edi + ebx + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x4168f0
sub dword [esp + 4], esi
mov ebx, dword [esp + 0x20]
mov edx, ebx
sub edx, esi
mov ebp, ecx
jmp 0x416922
mov edx, ebx
cmp ebx, 4
mov ebx, dword [esp + 4]
mov edi, dword [esp]
jb 0x4168b4
dec edx
nop
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 0x416930
jmp 0x4168b4
mov ebx, dword [esp + 0x15d4]
mov dword [esp + 0x944], 0
mov eax, dword [esp + 0x15d8]
cmp eax, 2
jl 0x4169fd
lea ecx, [eax - 1]
cmp eax, 2
jne 0x4169a9
xor eax, eax
mov edx, 2
test cl, 1
jne 0x4169f0
jmp 0x4169fd
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop word cs:[eax + eax]
add eax, dword [esp + edx*4 + 0x40]
add eax, eax
mov dword [esp + edx*4 + 0x948], eax
add eax, dword [esp + edx*4 + 0x44]
add eax, eax
mov dword [esp + edx*4 + 0x94c], eax
add edx, 2
cmp ebx, edx
jne 0x4169c0
add edx, 2
mov ebx, dword [esp + 0x15d4]
test cl, 1
je 0x4169fd
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
test ebx, ebx
jle 0x416ac2
xor eax, eax
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, ebp
shl ecx, 6
add ecx, ebp
mov dword [esp + 0x20], ecx
jmp 0x416a3c
mov ecx, dword [esp + 0x20]
mov word [ecx + eax*2 + 0x8852], bx
mov ebx, dword [esp + 0x15d4]
inc eax
cmp eax, ebx
je 0x416ac2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x416a33
mov ebp, dword [esp + ecx*4 + 0x940]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x940], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x416a9f
and ecx, 0xfffffffc
xor ebx, ebx
nop word [eax + 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 0x416a70
test edi, edi
je 0x416a20
nop word [eax + eax]
mov ecx, ebp
and ecx, 1
lea ebx, [ecx + ebx*2]
shr ebp, 1
dec edi
jne 0x416ab0
jmp 0x416a20
add esp, 0x15c0
pop esi
pop edi
pop ebx
pop ebp
ret
and ecx, 0xfffffffe
lea edx, [ebx + ebp]
add edx, 0x8194
xor eax, eax
xor ebp, ebp
jmp 0x416aeb
add eax, 2
cmp ecx, eax
je 0x416155
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x416b06
mov word [esp + ebp*4 + 0x4c0], si
mov word [esp + ebp*4 + 0x4c2], ax
inc ebp
movzx esi, word [edx + eax*2]
test si, si
je 0x416ae0
mov word [esp + ebp*4 + 0x4c0], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0x4c2], si
inc ebp
jmp 0x416ae0
mov eax, 1
shl eax, cl
xor edx, edx
mov edi, dword [esp + 0x15d8]
mov esi, edi
xor esi, 0xfffffffe
and edi, 0xfffffffe
lea ecx, [esi + edi*2]
inc ecx
lea esi, [esi + edi*2]
add esi, 2
jmp 0x416b63
dec edi
mov dword [esp + ebp*4 + 0x38], edi
add dword [esp + ebp*4 + 0x3c], 2
dec edx
cmp edx, eax
je 0x416855
mov edi, dword [esp + 0x15d8]
dec dword [esp + edi*4 + 0x3c]
test ecx, ecx
jle 0x416b5a
mov ebp, esi
nop word cs:[eax + eax]
mov edi, dword [esp + ebp*4 + 0x38]
test edi, edi
jne 0x416b50
dec ebp
cmp ebp, 1
jg 0x416b80
jmp 0x416b5a