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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd4
push ebx
push esi
xor ebx, ebx
push edi
mov eax, 0xbe
mov ecx, 0x53e5
mov edi, 0x3add
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0xc], 0x25e8
xor esi, esi
mov dword [ebp - 0x30], 0x1ee5
mov dword [ebp - 0x38], 0x1136
mov dword [ebp - 0x3c], 0x7708
mov edx, 0x57b7
mov dword [ebp - 8], 0x46
lea ebx, [ebx]
cmp eax, 0x46
cmovg eax, dword [ebp - 8]
dec edx
jne 0x401ba0
cmp dword [ebp + 8], ebx
je 0x402128
cmp dword [ebp + 0xc], ebx
je 0x402128
mov eax, dword [ebp + 0x10]
lea edx, [eax + 0x8c]
mov eax, dword [eax + 0x88]
xor eax, dword [edx]
cmp dword [ebp + 0xc], eax
jl 0x402128
mov eax, 0x10624dd3
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401bd6
call fcn.00403110
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 0xa8], eax
jmp 0x401c00
mov eax, 0x78787879
imul edi
sar edx, 4
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x401c00
mov edx, ecx
mov esi, 0x6850
mov eax, dword [edx + 0x8c]
xor dword [edx + 0x178], eax
mov edi, dword [edx + 0x178]
lea ecx, [edx + 0x8c]
mov eax, 0x67b23a55
imul esi
sar edx, 6
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x401c32
mov eax, dword [ebp + 0xc]
xor edx, edx
div edi
mov esi, dword [ebp + 0x10]
mov dword [esi + 0x60], ecx
mov ecx, eax
mov dword [esi + 0x304], ecx
imul ecx, edi
mov dword [esi + 0x100], ecx
mov eax, 0x1685
xor esi, esi
lea ebx, [ebx]
dec eax
jne 0x401c70
xor edi, edi
test ecx, ecx
je 0x401cbf
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
nop
mov eax, dword [ebx + 0x60]
inc edi
mov al, byte [eax]
xor byte [edi + esi - 1], al
movzx ecx, byte [edi + esi - 1]
mov eax, dword [ebx + 0x60]
mov dl, byte [eax + 1]
xor dl, cl
mov byte [edi + esi - 1], dl
mov eax, dword [ebx + 0x60]
mov cl, byte [eax + 2]
xor cl, dl
mov byte [edi + esi - 1], cl
mov eax, dword [ebx + 0x60]
mov al, byte [eax + 3]
xor al, cl
mov byte [edi + esi - 1], al
cmp edi, dword [ebx + 0x100]
jb 0x401c80
xor esi, esi
xor ebx, ebx
mov ecx, 0x403a
mov eax, 0x84a9f9c9
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401cc4
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
mov eax, dword [edi + 0x178]
dec eax
je 0x401db3
lea esp, [esp]
cmp ebx, 0x13b0
jge 0x401d1b
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 0x401d13
inc ebx
cmp ebx, 0x13b0
jl 0x401cf8
mov eax, dword [edi + 0x178]
dec eax
push eax
push 1
push edi
call fcn.00402fa0
mov edx, dword [ebp - 8]
add esp, 0xc
mov cl, al
xor eax, eax
cmp cl, byte [eax + edi + 0x1fc]
je 0x401d52
inc eax
cmp eax, edx
jbe 0x401d35
test cl, cl
je 0x401d52
mov byte [edx + edi + 0x1fc], cl
inc edx
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x34]
inc eax
cmp eax, 0x2e9e
jl 0x401d55
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x34], eax
test ecx, ecx
je 0x401d7f
mov eax, 0x94458095
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401d67
mov dword [ebp - 0xc], ecx
cmp esi, 0x6e41
jge 0x401da1
inc esi
mov eax, esi
and eax, 0x80000001
jns 0x401d96
dec eax
or eax, 0xfffffffe
inc eax
jne 0x401d99
inc esi
cmp esi, 0x6e41
jl 0x401d87
mov eax, dword [edi + 0x178]
mov ecx, dword [ebp - 8]
dec eax
cmp ecx, eax
jb 0x401cf0
push 0x49
lea eax, [ebp - 0x87]
push 0
push eax
mov byte [ebp - 0x88], 0
call fcn.00402e30
lea eax, [ebp - 0x88]
push eax
call fcn.004027d0
add esp, 0x10
mov edi, 0x14e8
mov edi, edi
mov eax, 0x3531dec1
imul edi
sar edx, 5
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x401de0
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 0x401e10
add ebx, 2
cmp ebx, 0x1c86
jl 0x401df5
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0x70fd6ccf
mov dword [ebp - 0x28], 0xe953f840
mov dword [ebp - 0x24], 0xb1933635
mov dword [ebp - 0x20], 0xfc0aaaf9
mov dword [ebp - 0x1c], 0x1cfda5a5
movq qword [ebp - 0x18], xmm0
mov byte [ebp - 1], 0
mov edi, 0x7790
lea esp, [esp]
mov eax, 0x473c1ab7
imul edi
sar edx, 5
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x401e50
mov edi, dword [ebp + 0x10]
mov ecx, 0x4d24
jmp 0x401e70
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401e70
movq xmm0, qword [ebp - 0x2c]
mov eax, dword [ebp - 0x14]
lea ebx, [edi + 0x18c]
movq qword [ebx], xmm0
movq xmm0, qword [ebp - 0x24]
movq qword [ebx + 8], xmm0
movq xmm0, qword [ebp - 0x1c]
movq qword [ebx + 0x10], xmm0
mov dword [ebx + 0x18], eax
mov al, byte [ebp - 1]
mov byte [ebx + 0x1c], al
xor eax, eax
jmp 0x401ec0
xor byte [ebp + eax - 0x88], 0xea
inc eax
cmp eax, 0x48
jb 0x401ec0
xor eax, eax
mov dword [ebp - 0xc], eax
cmp dword [edi + 0x178], eax
jbe 0x402004
nop
movzx ebx, byte [eax + edi + 0x1fc]
imul ebx, dword [edi + 0x304]
mov ecx, dword [ebp - 0x30]
add ebx, dword [ebp + 8]
test ecx, ecx
je 0x401f18
lea esp, [esp]
mov eax, 0xac769185
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401f00
mov dword [ebp - 0x30], ecx
push 0x49
lea eax, [ebp - 0xd3]
push 0
push eax
mov dword [edi + 0x1b0], ebx
mov byte [ebp - 0xd4], 0
call fcn.00402e30
push 0x49
lea eax, [ebp - 0xd4]
push ebx
push eax
call fcn.00402e00
mov ecx, dword [ebp - 0x38]
add esp, 0x18
test ecx, ecx
je 0x401f68
mov edi, edi
mov eax, 0x8d3dcb09
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401f50
mov dword [ebp - 0x38], ecx
mov ecx, 0x12
lea esi, [ebp - 0x88]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x10]
mov eax, dword [edi + 0x1b0]
call eax
push 0x49
lea eax, [ebp - 0xd4]
push eax
push ebx
call fcn.00402e00
add esp, 0xc
mov eax, 0x6049
lea esp, [esp]
dec eax
jne 0x401fa0
xor esi, esi
cmp dword [edi + 0x304], esi
jbe 0x401feb
lea ecx, [ecx]
mov eax, dword [edi + 0x60]
inc esi
mov al, byte [eax + 3]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x60]
mov dl, byte [eax + 2]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x60]
mov cl, byte [eax + 1]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x60]
mov al, byte [eax]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x304]
jb 0x401fb0
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [edi + 0x178]
jb 0x401ee0
lea ebx, [edi + 0x18c]
call fcn.00403110
mov dword [edi + 0xa0], eax
add eax, 0xfffffffe
push eax
push dword [edi + 0xa8]
call fcn.004010e0
add esp, 8
mov eax, 0x27e
mov edx, 0xc9
mov ecx, 0xcb
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x402030
push 0x22dc6cb5
push ebx
call fcn.00401ac0
add esp, 8
mov eax, 0x70ec
mov edx, 0xdb
mov ecx, 0x85
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x402055
mov eax, dword [ebp + 0xc]
cdq
and edx, 0xff
lea esi, [edx + eax]
sar esi, 8
mov eax, 0x4d8b
dec eax
jne 0x402072
mov ecx, 0x6e85
lea ebx, [ebx]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402080
test esi, esi
je 0x4020c0
mov edi, dword [ebp + 8]
lea esp, [esp]
push ebx
push 0x100
push edi
call fcn.00402e90
add esp, 0xc
add edi, 0x100
dec esi
jne 0x4020a0
jmp 0x4020c0
mov eax, 0x66666667
imul dword [ebp - 0x3c]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x3c], eax
jne 0x4020c0
mov ecx, 0x3303
mov edx, 0x99
mov eax, 0x11
cmp eax, 0x99
cmovg eax, edx
dec ecx
jne 0x4020e6
mov eax, 0x601e
cdq
and edx, 3
add eax, edx
sar eax, 2
test eax, eax
jne 0x4020f6
xor ebx, ebx
inc ebx
mov eax, 0x66666667
imul ebx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, ebx
lea eax, [eax + eax*4]
sub ecx, eax
jne 0x402120
inc ebx
cmp ebx, 0x629e
jl 0x402105
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret