Function at 0x407880
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x174
push ebx
xor eax, eax
push esi
xor esi, esi
push edi
xor edi, edi
mov ebx, 0x706d
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x58], 0x6f3b
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x74], 0x4e5a
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x50], 0x3e4f
mov dword [ebp - 4], 0x514b
mov dword [ebp - 0x48], 0x164d
mov dword [ebp - 8], 0x65ff
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x60], 0x30
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], 0x6d9f
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x4c], 0x5767
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x54], 0x6bd5
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x64], 0x819
cmp dword [ebp + 8], eax
je 0x408115
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x408115
mov eax, dword [ebp + 0x10]
lea ecx, [eax + 0x68]
mov eax, dword [eax + 0x32c]
xor eax, dword [ecx]
cmp edx, eax
jl 0x408115
nop
inc esi
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, esi
lea eax, [eax + eax*4]
sub ecx, eax
jne 0x40794b
inc esi
cmp esi, 0x6bcf
jl 0x407930
call fcn.004091a0
mov edx, dword [ebp + 0x10]
lea ecx, [edx + 0x68]
mov dword [edx + 0x74], eax
mov eax, dword [ecx]
xor dword [edx + 0x494], eax
mov esi, dword [edx + 0x494]
mov dword [edx + 0x488], ecx
inc edi
mov eax, 0x55555556
imul edi
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, edi
lea eax, [eax + eax*2]
sub ecx, eax
jne 0x40798e
inc edi
cmp edi, 0x2055
jl 0x407975
mov eax, 0x2fa0be83
imul ebx
sar edx, 5
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x407996
mov eax, 0x386c
mov edi, edi
dec eax
jne 0x4079b0
mov ecx, 0x14e5
jmp 0x4079c0
mov eax, 0x83993053
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4079c0
mov eax, dword [ebp + 0xc]
xor edx, edx
div esi
mov edi, dword [ebp + 0x10]
imul esi, eax
mov dword [ebp - 0x7c], esi
mov dword [edi + 0x27c], esi
xor esi, esi
mov dword [edi + 0x47c], eax
cmp dword [ebp - 0x7c], esi
jbe 0x407a47
mov ebx, dword [ebp + 8]
jmp 0x407a00
mov eax, dword [edi + 0x488]
inc esi
mov al, byte [eax]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x488]
mov dl, byte [eax + 1]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x488]
mov cl, byte [eax + 2]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x488]
mov al, byte [eax + 3]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x27c]
jb 0x407a00
mov ecx, 0x79e0
lea esp, [esp]
mov eax, 0xe6c2b449
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x407a50
xor ebx, ebx
inc ebx
mov eax, 0x38e38e39
imul ebx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, ebx
lea eax, [eax + eax*8]
sub ecx, eax
jne 0x407a82
inc ebx
cmp ebx, 0xcd6
jl 0x407a67
mov eax, dword [edi + 0x494]
xor esi, esi
dec eax
je 0x407c17
xor edi, edi
jmp 0x407aa0
mov eax, dword [ebp - 0x70]
inc eax
cmp eax, 5
jl 0x407aa3
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x70], eax
test ecx, ecx
je 0x407ac9
mov eax, 0x3159721f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x407ab3
mov dword [ebp - 0x58], ecx
mov eax, dword [ebp - 0x78]
lea esp, [esp]
inc eax
cmp eax, 0x254e
jl 0x407ad0
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x78], eax
cmp ebx, 0xb9a
jge 0x407b0e
inc ebx
mov eax, 0x38e38e39
imul ebx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, ebx
lea eax, [eax + eax*8]
sub ecx, eax
jne 0x407b03
add ebx, 2
cmp ebx, 0xb9a
jl 0x407ae6
mov dword [ebp - 0x18], ebx
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 0x494]
dec eax
push eax
push 1
push ecx
call fcn.00409020
mov ecx, dword [ebp - 0x74]
add esp, 0xc
mov bl, al
test ecx, ecx
je 0x407b46
lea ecx, [ecx]
mov eax, 0x78787879
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x407b30
mov dword [ebp - 0x74], ecx
cmp edi, 0x7157
jge 0x407b68
mov ecx, 0x7156
sub ecx, edi
mov eax, 0xcccccccd
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
lea edi, [edi + eax*2]
add edi, 0xa
mov ecx, dword [ebp + 0x10]
xor eax, eax
lea ecx, [ecx]
cmp bl, byte [ecx + eax + 0x124]
je 0x407b80
inc eax
cmp eax, esi
jbe 0x407b70
jmp 0x407b82
xor bl, bl
mov edx, dword [ebp - 0x24]
cmp edx, 0x18a4
jge 0x407bad
mov ecx, 0x18a3
sub ecx, edx
mov eax, 0xaaaaaaab
mul ecx
shr edx, 2
lea eax, [edx + edx*2]
mov edx, dword [ebp - 0x24]
lea edx, [edx + eax*2]
add edx, 6
mov dword [ebp - 0x24], edx
mov ecx, dword [ebp - 0x20]
cmp ecx, 0x7c66
jge 0x407bd5
inc ecx
mov eax, ecx
and eax, 0x80000007
jns 0x407bc7
dec eax
or eax, 0xfffffff8
inc eax
jne 0x407bca
inc ecx
cmp ecx, 0x7c66
jl 0x407bb8
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x50]
test ecx, ecx
je 0x407bf6
lea esp, [esp]
mov eax, 0x3e0f83e1
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x407be0
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp + 0x10]
test bl, bl
je 0x407c05
mov byte [eax + esi + 0x124], bl
inc esi
mov eax, dword [eax + 0x494]
dec eax
cmp esi, eax
jb 0x407aa0
mov edi, dword [ebp + 0x10]
push 0x78
lea eax, [ebp - 0xf7]
push 0
push eax
mov byte [ebp - 0xf8], 0
call fcn.00408ea0
lea eax, [ebp - 0xf8]
push eax
call fcn.00408840
add esp, 0x10
lea ecx, [ecx]
mov eax, 0x487ede05
imul dword [ebp - 4]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 4], eax
jne 0x407c40
xorps xmm0, xmm0
mov dword [ebp - 0x44], 0x4b538712
mov dword [ebp - 0x40], 0xe05c285d
mov dword [ebp - 0x3c], 0xa98aa908
mov dword [ebp - 0x38], 0x3fa2306b
mov dword [ebp - 0x34], 0x7845cc3d
movq qword [ebp - 0x30], xmm0
xor bl, bl
mov eax, 0x359
mov edx, 6
mov ecx, 0xd3
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x407c93
movq xmm0, qword [ebp - 0x44]
mov eax, dword [ebp - 0x2c]
movq qword [edi + 0x390], xmm0
movq xmm0, qword [ebp - 0x3c]
movq qword [edi + 0x398], xmm0
movq xmm0, qword [ebp - 0x34]
movq qword [edi + 0x3a0], xmm0
mov dword [edi + 0x3a8], eax
mov byte [edi + 0x3ac], bl
mov eax, 0x44d72045
imul dword [ebp - 0x48]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x48], eax
jne 0x407cd1
mov eax, 0x5113
mov edx, 0x64
mov ecx, 0x85
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x407cf7
nop
mov eax, 0x342da7f3
imul dword [ebp - 8]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 8], eax
jne 0x407d00
xor eax, eax
lea esp, [esp]
xor byte [ebp + eax - 0xf8], 0xb6
inc eax
cmp eax, 0x77
jb 0x407d20
xor ebx, ebx
inc ebx
mov eax, 0x55555556
imul ebx
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, ebx
lea eax, [eax + eax*2]
sub ecx, eax
jne 0x407d49
inc ebx
cmp ebx, 0x5e96
jl 0x407d30
mov edi, 0x243d
mov eax, 0x3e0f83e1
imul edi
sar edx, 3
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x407d56
mov ebx, dword [ebp + 0x10]
xor ecx, ecx
mov dword [ebp - 8], ecx
cmp dword [ebx + 0x494], ecx
jbe 0x407ff6
mov edx, 0xa2
mov edi, ebx
mov eax, 0x7752
lea esp, [esp]
dec eax
jne 0x407d90
movzx ebx, byte [edi + ecx + 0x124]
imul ebx, dword [edi + 0x47c]
mov ecx, dword [ebp - 0x14]
add ebx, dword [ebp + 8]
cmp ecx, 0xe8c
jge 0x407dcd
inc ecx
mov eax, ecx
and eax, 0x80000001
jns 0x407dbf
dec eax
or eax, 0xfffffffe
inc eax
jne 0x407dc2
inc ecx
cmp ecx, 0xe8c
jl 0x407db0
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x60]
mov dword [edi + 0x70], ebx
mov eax, 0x49fd
jmp 0x407de0
cmp ecx, 0xa2
cmovl ecx, edx
dec eax
jne 0x407de0
push 0x78
push eax
mov byte [ebp - 0x174], al
lea eax, [ebp - 0x173]
push eax
mov dword [ebp - 0x60], ecx
call fcn.00408ea0
push 0x78
lea eax, [ebp - 0x174]
push ebx
push eax
call fcn.00408e70
mov esi, dword [ebp - 0x6c]
add esp, 0x18
cmp esi, 0x4501
jge 0x407e3d
mov ecx, 0x4500
sub ecx, esi
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
lea eax, [edx + esi]
lea eax, [eax + edx*2]
add eax, 3
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x68]
test ecx, ecx
je 0x407e5a
mov eax, 0x7a44c6b
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x407e44
mov dword [ebp - 0x68], ecx
mov ecx, 0x1d
lea esi, [ebp - 0xf8]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x10]
mov eax, dword [edi + 0x70]
call eax
mov esi, dword [ebp - 0x1c]
cmp esi, 0x5d54
jge 0x407ea8
nop
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, esi
lea eax, [eax + eax*2]
sub ecx, eax
jne 0x407e9c
add esi, 3
jmp 0x407e9d
inc esi
cmp esi, 0x5d54
jl 0x407e80
mov dword [ebp - 0x1c], esi
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
je 0x407ec8
nop
mov eax, 0x92f11385
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x407eb0
mov dword [ebp - 0x4c], ecx
mov esi, dword [ebp - 0xc]
cmp esi, 0x36f5
jge 0x407f04
inc esi
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
mov eax, esi
sub eax, ecx
jne 0x407ef9
add esi, 2
cmp esi, 0x36f5
jl 0x407ed3
mov dword [ebp - 0xc], esi
mov esi, dword [ebp - 0x10]
cmp esi, 0xc42
jge 0x407f42
nop
inc esi
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, esi
lea eax, [eax + eax*4]
sub ecx, eax
jne 0x407f2e
add esi, esi
jmp 0x407f37
mov eax, esi
cdq
sub eax, edx
sar eax, 1
add esi, eax
cmp esi, 0xc42
jl 0x407f10
mov dword [ebp - 0x10], esi
push 0x78
lea eax, [ebp - 0x174]
push eax
push ebx
call fcn.00408e70
mov ecx, dword [ebp - 0x54]
add esp, 0xc
test ecx, ecx
je 0x407f78
jmp 0x407f60
mov eax, 0xae4c415d
imul ecx
add edx, ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x407f60
mov dword [ebp - 0x54], ecx
mov eax, dword [ebp - 0x5c]
jmp 0x407f80
inc eax
cmp eax, 0x6f8e
jl 0x407f80
xor esi, esi
mov dword [ebp - 0x5c], eax
cmp dword [edi + 0x47c], esi
jbe 0x407fdc
mov eax, dword [edi + 0x488]
inc esi
mov al, byte [eax + 3]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x488]
mov dl, byte [eax + 2]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x488]
mov cl, byte [eax + 1]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x488]
mov al, byte [eax]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x47c]
jb 0x407f95
mov ecx, dword [ebp - 8]
inc ecx
mov dword [ebp - 8], ecx
mov edx, 0xa2
cmp ecx, dword [edi + 0x494]
jb 0x407d84
mov ebx, edi
mov eax, 0x73eb
mov edx, 0x4d
mov ecx, 0x4f
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x408005
xor ecx, ecx
nop
inc ecx
mov eax, ecx
and eax, 0x80000001
jns 0x40801f
dec eax
or eax, 0xfffffffe
inc eax
jne 0x408023
add ecx, ecx
cmp ecx, 0x6e97
jl 0x408010
call fcn.004091a0
mov dword [ebx + 0x108], eax
add eax, 0xfffffffe
push eax
push dword [ebx + 0x74]
call fcn.00406bc0
add esp, 8
mov edi, 0x6378
lea ebx, [ebx]
mov eax, 0x487ede05
imul edi
sar edx, 6
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x408050
push 0x834b2d4
lea edi, [ebx + 0x390]
push edi
call fcn.00407770
add esp, 8
mov edi, 0x607a
lea esp, [esp]
mov eax, 0x151d07eb
imul edi
sar edx, 4
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x408080
mov eax, dword [ebp + 0xc]
cdq
and edx, 0xff
lea edi, [ebx + 0x390]
lea esi, [edx + eax]
sar esi, 8
test esi, esi
je 0x4080d0
mov ebx, dword [ebp + 8]
push edi
push 0x100
push ebx
call fcn.00408f00
add esp, 0xc
add ebx, 0x100
dec esi
jne 0x4080b0
jmp 0x4080d0
mov eax, 0x30c30c31
imul dword [ebp - 0x64]
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x64], eax
jne 0x4080d0
mov eax, 0x57d4
lea esp, [esp]
dec eax
jne 0x4080f0
mov ecx, 0x4b2f
jmp 0x408100
mov eax, 0xa16b312f
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x408100
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret