Function at 0x407d80
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15c0
call fcn.004088c0
mov edi, ecx
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 + 0x20], edx
je 0x407e6c
test ecx, ecx
jle 0x4086ae
xor eax, eax
cmp ecx, 1
je 0x407e38
and ecx, 0xfffffffe
mov eax, dword [esp + 0x20]
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 + 0x3c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x3c]
add eax, 2
cmp ecx, eax
jne 0x407e20
mov ecx, dword [esp + 0x15d4]
test cl, 1
je 0x4086ae
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15d4]
inc dword [esp + eax*4 + 0x3c]
jmp 0x4086ae
lea ebp, [edx + edx*8]
mov eax, ebp
shl eax, 6
mov dword [esp + 0x1c], eax
test ecx, ecx
mov dword [esp + 0x18], edi
jle 0x407f23
cmp ecx, 1
jne 0x4087ed
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15d4]
test cl, 1
je 0x407ec7
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x407ec7
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.00408970
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x407f3a
xor eax, eax
nop dword [eax]
movzx ecx, word [esp + eax*4 + 0x4c0]
mov edx, ecx
not edx
or edx, 0xff
add edx, ecx
inc dword [esp + edx*4 + 0x944]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd40]
inc eax
cmp ebx, eax
jne 0x407ef0
mov eax, dword [esp + 0xd40]
jmp 0x407f43
lea eax, [esp + 0x940]
push 0x800
push 0
push eax
call fcn.00408970
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 + 0x34], eax
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 + 0x10], 0
mov dword [esp + 0xc], ebp
mov dword [esp + 8], ebx
mov dword [esp + 0x14], edx
jmp 0x407fc4
mov esi, ebx
mov ebx, dword [esp + 0x10]
inc ebx
add ecx, 8
add edi, 0x400
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], ebx
cmp ebx, dword [esp + 0x38]
mov ebx, esi
je 0x4080d0
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 0x407fe0
mov dword [esp + 0x24], esi
cmp byte [esp + 7], 0
jne 0x407fa0
cmp dword [esp + 0x34], 0
je 0x408089
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 + 0x14]
add eax, 2
cmp edx, eax
jne 0x408030
jmp 0x40808b
xor eax, eax
mov ebx, dword [esp + 8]
test bl, 1
mov ebp, dword [esp + 0xc]
je 0x407fa0
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 + 8]
jmp 0x407fa0
test ebx, ebx
je 0x408579
mov ebx, dword [esp + 8]
cmp ebx, 1
jne 0x4080ee
mov eax, dword [esp]
mov word [eax], 1
jmp 0x40836d
mov ecx, dword [esp]
movzx eax, word [ecx + 4]
add word [ecx], ax
mov eax, ebx
xor eax, 0xfffffffe
lea ecx, [ebx + ebx]
and ecx, 0xfffffffc
mov edx, eax
add eax, ecx
inc eax
mov dword [esp + 0x24], eax
cmp eax, 2
jl 0x4081be
add edx, ecx
neg edx
mov dword [esp + 0x14], edx
xor edx, edx
mov esi, 2
mov edi, 1
jmp 0x408152
mov eax, dword [esp]
movzx ebx, word [eax + edx*4]
add word [eax + edi*4], bx
mov word [eax + edx*4], di
inc edx
mov eax, dword [esp + 0x14]
lea ecx, [eax + edi]
inc ecx
inc edi
cmp ecx, 1
mov ebx, dword [esp + 8]
je 0x4081be
cmp esi, ebx
jge 0x408180
mov eax, dword [esp]
movzx ebx, word [eax + esi*4]
movzx ecx, word [eax + edx*4]
cmp cx, bx
jb 0x408187
inc esi
mov word [eax + edi*4], bx
cmp esi, dword [esp + 8]
jge 0x408130
jmp 0x408196
mov eax, dword [esp]
movzx ecx, word [eax + edx*4]
mov word [eax + edi*4], cx
mov word [eax + edx*4], di
inc edx
cmp esi, dword [esp + 8]
jge 0x408130
cmp edx, edi
jge 0x4081b0
mov eax, dword [esp]
movzx ebx, word [eax + edx*4]
movzx ecx, word [eax + esi*4]
cmp bx, cx
jb 0x408137
jmp 0x4081b7
mov eax, dword [esp]
movzx ecx, word [eax + esi*4]
inc esi
add word [eax + edi*4], cx
jmp 0x408140
mov eax, ebx
or eax, 0x3ffffffd
mov ecx, ebx
and ecx, 0x3ffffffd
add ecx, eax
mov edi, dword [esp]
mov word [edi + ecx*4 + 4], 0
mov edx, ebx
add edx, 0xfffffffd
js 0x408251
lea esi, [ebx + 2]
mov eax, edx
and esi, 3
je 0x408201
mov eax, edx
nop dword [eax]
movzx ecx, word [edi + eax*4]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4], cx
dec eax
dec esi
jne 0x4081f0
cmp edx, 3
jb 0x408251
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 0x408210
lea eax, [ebx - 2]
xor edx, edx
mov esi, 1
mov ebx, dword [esp + 0x24]
jmp 0x408286
mov ecx, ebp
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0xc]
lea esi, [ecx + ecx]
inc edx
test ecx, ecx
jle 0x408362
test eax, eax
mov dword [esp + 0x24], ebx
js 0x4082c0
lea ebp, [eax + 1]
xor ebx, ebx
nop word cs:[eax + eax]
movzx ecx, word [edi + eax*4]
cmp edx, ecx
jne 0x4082d0
inc ebx
dec eax
cmp ebp, ebx
jne 0x4082a0
mov eax, 0xffffffff
jmp 0x4082d2
xor ebp, ebp
jmp 0x4082d2
mov ebp, ebx
mov ebx, esi
sub ebx, ebp
jle 0x408270
mov ecx, ebp
not ecx
add ecx, esi
mov dword [esp + 0x10], ecx
and ebx, 3
mov dword [esp + 0x14], ebp
je 0x408318
mov ecx, dword [esp + 0x24]
lea ecx, [edi + ecx*4]
xor edi, edi
nop word cs:[eax + eax]
mov word [ecx], dx
inc edi
add ecx, 0xfffffffc
cmp ebx, edi
jne 0x408300
sub esi, edi
mov ebx, dword [esp + 0x24]
sub ebx, edi
mov edi, dword [esp]
jmp 0x40831c
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0xc]
cmp ecx, 3
mov ecx, dword [esp + 0x14]
jb 0x40827a
nop word cs:[eax + eax]
mov word [edi + ebx*4], dx
mov word [edi + ebx*4 - 4], dx
mov word [edi + ebx*4 - 8], dx
mov word [edi + ebx*4 - 0xc], dx
add ebx, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ecx
jg 0x408340
jmp 0x40827a
cmp dword [esp + 8], 0
jle 0x408579
mov edi, dword [esp + 8]
mov eax, edi
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x34], 3
mov ebx, dword [esp]
jb 0x4083ba
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 0x408390
test eax, eax
je 0x4083dd
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 0x4083d0
cmp edi, 2
jl 0x408579
mov ecx, dword [esp + 0x15d8]
cmp ecx, 0x1f
jg 0x408427
lea eax, [ecx + 1]
mov esi, dword [esp + ecx*4 + 0x3c]
nop dword [eax]
add esi, dword [esp + eax*4 + 0x3c]
mov dword [esp + ecx*4 + 0x3c], esi
mov edx, eax
and edx, 1
xor eax, 1
lea eax, [eax + edx*2]
mov ecx, dword [esp + 0x15d8]
cmp eax, 0x21
jl 0x408400
test ecx, ecx
jle 0x408855
cmp ecx, 1
mov ebp, ecx
adc ebp, 0xffffffff
inc ebp
mov eax, ecx
xor edx, edx
cmp ebp, 8
jb 0x40853e
mov esi, ebp
and esi, 0xfffffff8
mov eax, ecx
sub eax, esi
movd xmm0, ecx
pshufd xmm0, xmm0, 0
movdqa xmm1, xmmword [0x43a3e0]
movdqu xmmword [esp + 0x24], 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 [0x43a400]
pxor xmm4, xmm4
nop dword [eax]
movdqu xmm6, xmmword [edi + ebx*4]
pshufd xmm3, xmm6, 0x1b
movdqu xmm0, xmmword [esp + 0x24]
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 + ebx*4 - 0x10]
paddd xmm2, xmm3
pshufd xmm3, xmm0, 0x1b
psubd xmm7, xmmword [0x43a3f0]
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 [0x43a410]
add ebx, 0xfffffff8
cmp edx, ebx
jne 0x408480
paddd xmm4, xmm2
pshufd xmm0, xmm4, 0xee
paddd xmm0, xmm4
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd edx, xmm1
cmp ebp, esi
je 0x40855f
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 0x408550
mov eax, 1
mov ecx, dword [esp + 0x15d8]
shl eax, cl
cmp edx, eax
mov ebp, dword [esp + 0xc]
jne 0x40885e
shl ebp, 5
mov edi, dword [esp + 0x18]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408970
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov esi, edi
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408970
add esp, 0xc
cmp dword [esp + 0x15d8], 0
mov ebx, dword [esp + 8]
jle 0x4086a5
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0xc], ebp
jmp 0x4085fa
mov ebp, esi
mov esi, ebp
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15d8]
mov eax, ecx
mov ebp, dword [esp + 0xc]
je 0x4086a5
mov edi, dword [esp + eax*4 + 0x3c]
test edi, edi
jle 0x4085e0
mov edx, edi
and edx, 3
je 0x408650
mov dword [esp + 0x24], 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 0x408620
mov edi, dword [esp + 0x24]
mov edx, edi
sub edx, esi
mov ebx, dword [esp + 8]
sub ebx, esi
mov esi, dword [esp + 0x18]
jmp 0x408652
mov edx, edi
cmp edi, 4
mov edi, dword [esp]
mov ebp, esi
jb 0x4085e2
dec edx
nop dword [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 0x408660
jmp 0x4085e2
mov ecx, dword [esp + 0x15d4]
mov edi, esi
mov dword [esp + 0x944], 0
mov eax, dword [esp + 0x15d8]
cmp eax, 2
jl 0x40871d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x4086d6
xor eax, eax
mov edx, 2
jmp 0x408704
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
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 0x4086e0
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15d4]
je 0x40871d
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
test ecx, ecx
jle 0x4087e2
xor eax, eax
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, edi
shl ecx, 6
add ecx, edi
mov dword [esp], ecx
jmp 0x408759
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], bx
inc eax
cmp eax, dword [esp + 0x15d4]
je 0x4087e2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x40874b
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 0x4087bf
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 0x408790
test edi, edi
je 0x408740
nop word [eax + eax]
mov ecx, ebp
and ecx, 1
lea ebx, [ecx + ebx*2]
shr ebp, 1
dec edi
jne 0x4087d0
jmp 0x408740
add esp, 0x15c0
pop esi
pop edi
pop ebx
pop ebp
ret
and ecx, 0xfffffffe
mov eax, dword [esp + 0x1c]
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x40881b
add eax, 2
cmp ecx, eax
je 0x407e91
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408836
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 0x408810
mov word [esp + ebx*4 + 0x4c0], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4c2], si
inc ebx
jmp 0x408810
mov eax, 1
shl eax, cl
xor edx, edx
mov ecx, dword [esp + 0x15d8]
add ecx, ecx
jmp 0x408879
dec edx
cmp edx, eax
je 0x408579
mov edi, dword [esp + 0x15d8]
dec dword [esp + edi*4 + 0x3c]
mov esi, ecx
nop word cs:[eax + eax]
cmp edi, 2
jl 0x408870
dec edi
mov ebx, dword [esp + esi*2 + 0x38]
add esi, 0xfffffffe
test ebx, ebx
je 0x408890
dec ebx
mov dword [esp + esi*2 + 0x3c], ebx
and esi, 2
xor edi, 1
add edi, esi
add dword [esp + edi*4 + 0x3c], 2
jmp 0x408870