Function at 0x416c60
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15c0
call fcn.004177b0
mov edi, ecx
mov ebx, dword [esp + 0x15d8]
mov ecx, 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 0x416d45
test ecx, ecx
jle 0x41763b
xor eax, eax
cmp ecx, 1
je 0x416d18
and ecx, 0xfffffffe
mov eax, dword [esp + 0x14]
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 0x416d00
mov ecx, dword [esp + 0x15d4]
test cl, 1
je 0x41763b
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x3c]
jmp 0x41763b
lea ebp, [edx + edx*8]
mov eax, ebp
shl eax, 6
mov dword [esp + 0x10], eax
test ecx, ecx
mov dword [esp + 0x1c], edi
jle 0x416e3b
cmp ecx, 1
jne 0x4170ab
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15d4]
test cl, 1
je 0x416d9c
mov ecx, dword [esp + 0x10]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x416d9c
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.00417980
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x416e52
mov ecx, ebx
xor eax, eax
cmp ebx, 1
je 0x416e0f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
movzx edx, word [esp + eax*4 + 0x4c0]
movzx esi, dl
inc dword [esp + esi*4 + 0x940]
shr edx, 8
inc dword [esp + edx*4 + 0xd40]
movzx edx, word [esp + eax*4 + 0x4c4]
movzx esi, dl
inc dword [esp + esi*4 + 0x940]
shr edx, 8
inc dword [esp + edx*4 + 0xd40]
add eax, 2
cmp ecx, eax
jne 0x416dd0
mov ecx, ebx
test cl, 1
je 0x416e32
movzx eax, word [esp + eax*4 + 0x4c0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x940]
shr eax, 8
inc dword [esp + eax*4 + 0xd40]
mov eax, dword [esp + 0xd40]
jmp 0x416e5b
lea eax, [esp + 0x940]
push 0x800
push 0
push eax
call fcn.00417980
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 + 0x38], eax
lea eax, [ebx - 1]
mov dword [esp + 0x18], eax
mov dword [esp + 8], ebx
mov edx, ebx
and edx, 0xfffffffe
lea eax, [esp + 0x4c0]
mov dword [esp], eax
lea eax, [esp + 0x1140]
xor ecx, ecx
lea edi, [esp + 0x940]
mov dword [esp + 0x34], 0
mov dword [esp + 0xc], ebp
mov ebx, dword [esp + 0x15d8]
mov dword [esp + 0x20], edx
jmp 0x416ed4
mov esi, ebx
mov ebx, dword [esp + 0x34]
inc ebx
add ecx, 8
add edi, 0x400
mov eax, dword [esp + 0x24]
mov dword [esp + 0x34], ebx
cmp ebx, dword [esp + 0x38]
mov ebx, esi
je 0x416fe8
mov esi, dword [esp]
mov dword [esp], eax
mov eax, 3
xor edx, edx
nop word cs:[eax + eax]
mov dword [esp + eax*4 + 0xb4], edx
add edx, dword [edi + eax*4 - 0xc]
mov dword [esp + eax*4 + 0xb8], edx
add edx, dword [edi + eax*4 - 8]
mov dword [esp + eax*4 + 0xbc], edx
add edx, dword [edi + eax*4 - 4]
mov dword [esp + eax*4 + 0xc0], edx
add edx, dword [edi + eax*4]
add eax, 4
cmp eax, 0x103
jne 0x416ef0
mov dword [esp + 0x24], esi
cmp byte [esp + 7], 0
jne 0x416eb0
cmp dword [esp + 0x18], 0
je 0x416f99
xor eax, eax
nop dword [eax]
mov esi, dword [esp + 0x24]
movzx edx, word [esi + eax*4]
shr edx, cl
movzx edx, dl
mov ebp, dword [esp + edx*4 + 0xc0]
lea ebx, [ebp + 1]
mov dword [esp + edx*4 + 0xc0], ebx
mov edx, dword [esi + eax*4]
mov ebx, dword [esp]
mov dword [ebx + ebp*4], edx
movzx edx, word [esi + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xc0]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xc0], ebp
mov edx, dword [esi + eax*4 + 4]
mov esi, dword [esp]
mov dword [esi + ebx*4], edx
mov edx, dword [esp + 0x20]
add eax, 2
cmp edx, eax
jne 0x416f40
jmp 0x416f9b
xor eax, eax
test byte [esp + 8], 1
mov ebx, dword [esp + 0x15d8]
mov ebp, dword [esp + 0xc]
je 0x416eb0
mov esi, dword [esp + 0x24]
movzx edx, word [esi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xc0]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xc0], ebp
mov ebp, dword [esp + 0xc]
mov eax, dword [esi + eax*4]
mov edx, dword [esp]
mov dword [edx + ebx*4], eax
mov ebx, dword [esp + 0x15d8]
jmp 0x416eb0
cmp dword [esp + 8], 0
je 0x417510
mov ecx, dword [esp + 8]
cmp ecx, 1
jne 0x417009
mov eax, dword [esp]
mov word [eax], 1
jmp 0x4172d8
mov edi, dword [esp]
movzx eax, word [edi + 4]
add word [edi], ax
cmp ecx, 3
jl 0x417115
mov eax, 2
mov edx, ecx
mov ecx, 2
sub ecx, edx
mov dword [esp + 0x24], ecx
xor edx, edx
mov esi, 1
jmp 0x417062
movzx ebx, word [ecx + edx*4]
add word [ecx + esi*4], bx
mov word [ecx + edx*4], si
inc edx
mov ecx, dword [esp + 0x24]
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
mov edi, dword [esp]
je 0x417131
movzx ecx, word [edi + edx*4]
cmp eax, dword [esp + 8]
jge 0x417075
movzx ebx, word [edi + eax*4]
cmp cx, bx
jae 0x417080
mov word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
jmp 0x417085
inc eax
mov word [edi + esi*4], bx
mov ecx, edi
cmp eax, dword [esp + 8]
jge 0x417040
cmp edx, esi
jge 0x4170a0
movzx ebx, word [ecx + edx*4]
movzx edi, word [ecx + eax*4]
cmp bx, di
jb 0x417044
jmp 0x4170a4
movzx edi, word [ecx + eax*4]
inc eax
add word [ecx + esi*4], di
jmp 0x41704d
and ecx, 0xfffffffe
mov eax, dword [esp + 0x10]
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x4170db
add eax, 2
cmp ecx, eax
je 0x416d6a
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x4170f6
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 0x4170d0
mov word [esp + ebx*4 + 0x4c0], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4c2], si
inc ebx
jmp 0x4170d0
mov eax, ecx
xor eax, 0x3ffffffd
and ecx, 0x1ffffffd
lea eax, [eax + ecx*2]
mov word [edi + eax*4 + 4], 0
jmp 0x4171c1
mov edx, dword [esp + 8]
mov eax, edx
xor eax, 0x3ffffffd
mov ecx, edx
and ecx, 0x1ffffffd
lea eax, [eax + ecx*2]
mov word [edi + eax*4 + 4], 0
lea ecx, [edx - 3]
add edx, 2
mov eax, ecx
and edx, 3
je 0x417171
mov eax, ecx
nop dword [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 0x417160
cmp ecx, 3
jb 0x4171c1
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 0x417180
mov eax, dword [esp + 8]
lea ecx, [eax - 2]
mov ebx, 1
xor edx, edx
mov eax, dword [esp + 0x18]
jmp 0x417206
mov esi, ebp
and esi, 0x7ffffffd
mov edi, ebp
and edi, 2
or ebp, 2
imul ebp, edi
xor edi, 2
imul edi, esi
add ebp, edi
inc edx
mov ebx, ebp
test ebp, ebp
jle 0x4172c2
test ecx, ecx
js 0x417230
lea ebp, [ecx + 1]
xor edi, edi
nop
mov esi, dword [esp]
movzx esi, word [esi + ecx*4]
cmp edx, esi
jne 0x417240
inc edi
dec ecx
cmp ebp, edi
jne 0x417210
mov ecx, 0xffffffff
jmp 0x417242
xor ebp, ebp
jmp 0x417242
mov ebp, edi
mov edi, ebx
sub edi, ebp
jle 0x4171e0
mov dword [esp + 0x24], ebp
not ebp
add ebp, ebx
and edi, 3
je 0x417284
mov dword [esp + 0x20], ebp
mov esi, dword [esp]
lea ebp, [esi + eax*4]
xor esi, esi
nop word cs:[eax + eax]
mov word [ebp], dx
inc esi
add ebp, 0xfffffffc
cmp edi, esi
jne 0x417270
sub ebx, esi
sub eax, esi
mov ebp, dword [esp + 0x20]
cmp ebp, 3
mov esi, dword [esp]
mov ebp, dword [esp + 0x24]
jb 0x4171e0
nop word cs:[eax + eax]
mov word [esi + eax*4], dx
mov word [esi + eax*4 - 4], dx
mov word [esi + eax*4 - 8], dx
mov word [esi + eax*4 - 0xc], dx
add eax, 0xfffffffc
add ebx, 0xfffffffc
cmp ebx, ebp
jg 0x4172a0
jmp 0x4171e0
cmp dword [esp + 8], 0
mov ebx, dword [esp + 0x15d8]
mov ebp, dword [esp + 0xc]
jle 0x417510
mov eax, dword [esp + 8]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x18], 3
mov edi, dword [esp]
jb 0x41732a
mov edx, dword [esp + 8]
and edx, 0xfffffffc
xor ecx, ecx
nop word cs:[eax + 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 0x417300
test eax, eax
je 0x41734d
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 0x417340
cmp dword [esp + 8], 2
jl 0x417510
cmp ebx, 0x1f
jg 0x4173c0
mov eax, dword [esp + ebx*4 + 0x3c]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x41737c
nop dword [eax]
add eax, dword [esp + ecx*4 + 0x40]
inc ecx
mov dword [esp + ebx*4 + 0x3c], eax
dec edx
jne 0x417370
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x4173b8
nop word cs:[eax + eax]
add eax, dword [esp + ecx*4 + 0x40]
mov dword [esp + ebx*4 + 0x3c], eax
add eax, dword [esp + ecx*4 + 0x44]
mov dword [esp + ebx*4 + 0x3c], eax
add eax, dword [esp + ecx*4 + 0x48]
mov dword [esp + ebx*4 + 0x3c], eax
add eax, dword [esp + ecx*4 + 0x4c]
add ecx, 4
mov dword [esp + ebx*4 + 0x3c], eax
cmp ecx, 0x20
jne 0x417390
test ebx, ebx
jle 0x417767
cmp ebx, 1
mov ecx, ebx
adc ecx, 0xffffffff
inc ecx
xor edx, edx
mov eax, ebx
cmp ecx, 8
jb 0x4174e5
mov esi, ecx
and esi, 0xfffffff8
mov eax, ebx
sub eax, esi
movd xmm0, ebx
pshufd xmm0, xmm0, 0
movdqa xmm1, xmmword [0x45d870]
movdqu xmmword [esp + 0x24], xmm0
paddd xmm1, xmm0
mov edx, esi
neg edx
lea edi, [esp + ebx*4]
add edi, 0x30
pxor xmm2, xmm2
xor ebx, ebx
movdqa xmm5, xmmword [0x45d890]
pxor xmm3, xmm3
nop word cs:[eax + eax]
movdqu xmm6, xmmword [edi + ebx*4]
pshufd xmm4, xmm6, 0x1b
movdqu xmm0, xmmword [esp + 0x24]
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 [0x45d880]
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 [0x45d8a0]
add ebx, 0xfffffff8
cmp edx, ebx
jne 0x417420
paddd xmm3, xmm2
pshufd xmm0, xmm3, 0xee
paddd xmm0, xmm3
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd edx, xmm1
cmp ecx, esi
mov ebx, dword [esp + 0x15d8]
je 0x4174ff
mov ecx, ebx
sub ecx, eax
inc eax
nop word [eax + eax]
mov esi, dword [esp + eax*4 + 0x38]
shl esi, cl
add edx, esi
dec eax
inc ecx
cmp eax, 1
ja 0x4174f0
mov eax, 1
mov ecx, ebx
shl eax, cl
cmp edx, eax
jne 0x417772
shl ebp, 5
mov edi, dword [esp + 0x1c]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00417980
add esp, 0xc
mov eax, dword [esp + 0x10]
mov esi, edi
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00417980
add esp, 0xc
test ebx, ebx
mov ecx, dword [esp + 8]
jle 0x417639
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0xc], ebp
jmp 0x417588
mov ebp, esi
mov esi, ebp
inc eax
mov ebx, dword [esp + 0x15d8]
cmp eax, ebx
mov ebp, dword [esp + 0xc]
jg 0x417639
mov edi, dword [esp + eax*4 + 0x3c]
test edi, edi
jle 0x417570
mov edx, edi
and edx, 3
je 0x4175e0
mov dword [esp + 0x24], edi
mov dword [esp + 8], ecx
mov esi, dword [esp]
lea edi, [esi + ecx*4]
xor esi, esi
nop word [eax + eax]
movzx ebx, word [edi]
mov ecx, ebp
mov ebp, dword [esp + 0x1c]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
mov ebp, ecx
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x4175b0
mov ecx, dword [esp + 8]
sub ecx, esi
mov edi, dword [esp + 0x24]
mov edx, edi
sub edx, esi
mov esi, dword [esp + 0x1c]
jmp 0x4175e2
mov edx, edi
cmp edi, 4
mov edi, dword [esp]
mov ebp, esi
jb 0x417572
dec edx
nop dword [eax]
mov ebx, ecx
movzx ecx, word [edi + ecx*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
mov ecx, ebx
add ecx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x4175f0
jmp 0x417572
mov edi, esi
mov dword [esp + 0x944], 0
cmp ebx, 2
jl 0x417685
xor eax, eax
mov ecx, 2
nop word cs:[eax + eax]
mov edx, ecx
xor edx, 0x3ffffffe
mov esi, ecx
and esi, 0x1ffffffe
lea edx, [edx + esi*2]
add eax, dword [esp + edx*4 + 0x40]
add eax, eax
mov dword [esp + ecx*4 + 0x940], eax
inc ecx
cmp ecx, ebx
jle 0x417660
mov ecx, dword [esp + 0x15d4]
test ecx, ecx
jle 0x41775c
xor eax, eax
mov edx, dword [esp + 0x14]
lea edx, [edx + edx*8]
mov esi, edx
shl esi, 5
add esi, edi
mov dword [esp], esi
shl edx, 6
add edx, edi
mov dword [esp + 0x24], edx
jmp 0x4176dc
mov ecx, dword [esp + 0x24]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15d4]
inc eax
cmp eax, ecx
je 0x41775c
mov edx, dword [esp]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x4176d3
mov edx, dword [esp + ebx*4 + 0x940]
lea ecx, [edx + 1]
mov dword [esp + ebx*4 + 0x940], ecx
xor edi, edi
cmp bl, 1
je 0x417740
mov ebp, ebx
and ebp, 0xfffffffe
xor ecx, ecx
nop word [eax + eax]
mov edi, edx
xor edi, 0x7ffffffe
mov esi, edx
or esi, 1
and esi, edi
mov edi, edx
shr edi, 1
shl ecx, 2
add esi, esi
or esi, ecx
mov ecx, edi
xor ecx, 0xfffffffe
or edi, 1
and edi, ecx
or edi, esi
shr edx, 2
mov ecx, edi
add ebp, 0xfffffffe
jne 0x417710
test bl, 1
je 0x4176c0
add edi, edi
mov ecx, edx
xor ecx, 0xfffffffe
or edx, 1
and edx, ecx
or edi, edx
jmp 0x4176c0
add esp, 0x15c0
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 1
mov ecx, ebx
shl eax, cl
xor edx, edx
lea ecx, [ebx - 1]
jmp 0x417789
dec edx
cmp edx, eax
je 0x417510
dec dword [esp + ebx*4 + 0x3c]
mov esi, ecx
nop
test esi, esi
jle 0x417780
mov edi, dword [esp + esi*4 + 0x3c]
dec esi
test edi, edi
je 0x417790
dec edi
mov dword [esp + esi*4 + 0x40], edi
add dword [esp + esi*4 + 0x44], 2
jmp 0x417780