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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
cmp dword [ebp + 8], 0
push ebx
push esi
push edi
mov ecx, 0x275b
mov edi, 0x31fa
mov esi, 0xfee
mov dword [ebp - 0x34], 0x68cf
mov dword [ebp - 0x3c], 0x619d
mov dword [ebp - 0x38], 0x5c95
mov dword [ebp - 0x2c], 0x1700
mov dword [ebp - 4], 0x5808
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x28], 0x1d7a
mov dword [ebp - 0x30], 0x2ecb
je 0x4023c0
cmp dword [ebp + 0xc], 0
je 0x4023c0
mov eax, dword [ebp + 0x10]
lea edx, [eax + 0x2c4]
mov eax, dword [eax + 0x68]
xor eax, dword [edx]
cmp dword [ebp + 0xc], eax
jl 0x4023c0
mov eax, 0x63e7063f
imul edi
sar edx, 5
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x401e25
jmp 0x401e40
mov eax, 0x84210843
imul esi
add edx, esi
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x401e40
call fcn.00403530
mov edi, dword [ebp + 0x10]
mov ebx, 0x59be
lea edx, [edi + 0x2c4]
mov dword [edi + 0x58], eax
mov eax, dword [edx]
xor dword [edi + 0xe0], eax
mov ecx, dword [edi + 0xe0]
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x2cc], edx
xor edx, edx
div ecx
imul ecx, eax
mov dword [edi + 0x10c], eax
mov dword [edi + 0x354], ecx
mov eax, 0x17ad2209
imul ebx
sar edx, 4
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x401e95
xor esi, esi
mov ebx, 0x59dc
test ecx, ecx
je 0x401f02
mov ebx, dword [ebp + 8]
mov eax, dword [edi + 0x2cc]
inc esi
mov al, byte [eax]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x2cc]
mov dl, byte [eax + 1]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x2cc]
mov cl, byte [eax + 2]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x2cc]
mov al, byte [eax + 3]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x354]
jb 0x401eb6
mov ebx, 0x59dc
mov eax, 0x13e22cbd
imul ebx
sar edx, 3
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jne 0x401f02
mov eax, dword [edi + 0xe0]
xor esi, esi
dec eax
je 0x402017
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x401f46
jmp 0x401f30
mov eax, 0x38e38e39
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401f30
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x401f68
lea ecx, [ecx]
mov eax, 0xb21642c9
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401f50
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x401f88
nop
mov eax, 0xe6c2b449
imul ecx
add edx, ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401f70
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x401fa8
nop
mov eax, 0x86d90545
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401f90
mov dword [ebp - 0x2c], ecx
mov eax, dword [edi + 0xe0]
dec eax
push eax
push 1
push edi
call fcn.004033c0
add esp, 0xc
mov dl, al
xor ecx, ecx
nop
cmp dl, byte [edi + ecx + 0x110]
je 0x401fd0
inc ecx
cmp ecx, esi
jbe 0x401fc0
jmp 0x401fd2
xor dl, dl
mov eax, 0x166
dec eax
jne 0x401fd7
test dl, dl
je 0x401fe6
mov byte [edi + esi + 0x110], dl
inc esi
cmp ebx, 0x7fde
jge 0x402008
mov ecx, 0x7fdd
sub ecx, ebx
mov eax, 0xcccccccd
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
lea ebx, [ebx + eax*2]
add ebx, 0xa
mov eax, dword [edi + 0xe0]
dec eax
cmp esi, eax
jb 0x401f24
mov edi, 0x984
lea esp, [esp]
mov eax, 0x67b23a55
imul edi
sar edx, 5
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x402020
mov edi, dword [ebp + 0x10]
jmp 0x402040
mov eax, 0x2f149903
imul dword [ebp - 4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 4], eax
jne 0x402040
push 0x3e
lea eax, [ebp - 0x7f]
push 0
push eax
mov byte [ebp - 0x80], 0
call fcn.00403280
lea eax, [ebp - 0x80]
push eax
call fcn.00402af0
lea ebx, [edi + 0x30]
mov dword [ebp - 0x20], 0xd4707a59
mov dword [ebp - 0x1c], 0x6a9309b5
movq xmm0, qword [ebp - 0x20]
movq qword [ebx], xmm0
mov dword [ebp - 0x18], 0x83472bbe
mov dword [ebp - 0x14], 0xd965efe1
movq xmm0, qword [ebp - 0x18]
movq qword [ebx + 8], xmm0
mov dword [ebp - 0x10], 0xe440ea9b
mov dword [ebp - 0xc], 0
movq xmm0, qword [ebp - 0x10]
add esp, 0x10
movq qword [ebx + 0x10], xmm0
mov byte [ebx + 0x18], 0
xor eax, eax
xor byte [ebp + eax - 0x80], 0xcb
inc eax
cmp eax, 0x3d
jb 0x4020c4
mov eax, 0x1a41
mov edx, 0xdb
mov ecx, 0xce
mov edi, edi
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x4020e0
mov ecx, 0x5fcb
lea ecx, [ecx]
mov eax, 0xad602b59
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4020f0
mov edi, 0x2b4d
lea ebx, [ebx]
mov eax, 0x51eb851f
imul edi
sar edx, 3
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x402110
mov edi, dword [ebp + 0x10]
mov eax, 0x6798
mov edx, 0x9a
mov ecx, 0xbe
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x402135
mov dword [ebp - 4], eax
cmp dword [edi + 0xe0], eax
jbe 0x402273
lea esp, [esp]
movzx ebx, byte [edi + eax + 0x110]
imul ebx, dword [edi + 0x10c]
mov esi, dword [ebp - 0x24]
add ebx, dword [ebp + 8]
cmp esi, 0x5117
jge 0x40218a
mov ecx, 0x5116
sub ecx, esi
mov eax, 0xcccccccd
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
lea esi, [esi + eax*2]
add esi, 0xa
mov dword [ebp - 0x24], esi
push 0x3e
lea eax, [ebp - 0xbf]
push 0
push eax
mov dword [edi + 0x18], ebx
mov byte [ebp - 0xc0], 0
call fcn.00403280
push 0x3e
lea eax, [ebp - 0xc0]
push ebx
push eax
call fcn.00403250
mov ecx, 0xf
lea esi, [ebp - 0x80]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x10]
add esp, 0x18
mov eax, dword [edi + 0x18]
call eax
mov eax, dword [ebp - 0x40]
mov edi, edi
inc eax
cmp eax, 0x643a
jl 0x4021d0
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x40], eax
test ecx, ecx
je 0x4021fa
mov eax, 0x84a9f9c9
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4021e2
mov dword [ebp - 0x28], ecx
push 0x3e
lea eax, [ebp - 0xc0]
push eax
push ebx
call fcn.00403250
xor esi, esi
add esp, 0xc
cmp dword [edi + 0x10c], esi
jbe 0x40225d
mov eax, dword [edi + 0x2cc]
inc esi
mov al, byte [eax + 3]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x2cc]
mov dl, byte [eax + 2]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x2cc]
mov cl, byte [eax + 1]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x2cc]
mov al, byte [eax]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x10c]
jb 0x402216
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp eax, dword [edi + 0xe0]
jb 0x402150
lea ebx, [edi + 0x30]
mov edi, 0x1e9b
jmp 0x402280
mov eax, 0x78787879
imul edi
sar edx, 6
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x402280
mov edi, dword [ebp + 0x10]
mov eax, 0x6470
mov edx, 0x61
mov ecx, 0xa
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x4022a5
call fcn.00403530
mov dword [edi + 0x5c], eax
add eax, 0xfffffffe
push eax
push dword [edi + 0x58]
call fcn.00401150
add esp, 8
mov ecx, 0x2c45
lea esp, [esp]
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4022d0
xor esi, esi
mov ecx, 0x6dda
xor edi, edi
mov edi, edi
test ecx, ecx
je 0x402307
mov eax, 0x4bda12f7
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4022f4
xor dword [ebx + edi*4], 0x4ca745c
mov edi, edi
inc esi
cmp esi, 0x479f
jl 0x402310
inc edi
cmp edi, 5
jb 0x4022f0
mov eax, dword [ebp + 0xc]
cdq
and edx, 0xff
mov ecx, 0x610f
lea esi, [edx + eax]
sar esi, 8
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402334
xor edi, edi
jmp 0x402350
inc edi
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
mov eax, edi
sub eax, ecx
jne 0x402374
inc edi
cmp edi, 0x3f70
jl 0x402350
test esi, esi
je 0x4023a0
mov edi, dword [ebp + 8]
push ebx
push 0x100
push edi
call fcn.004032b0
add esp, 0xc
add edi, 0x100
dec esi
jne 0x402383
jmp 0x4023a0
mov eax, 0x2aaaaaab
imul dword [ebp - 0x30]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x30], eax
jne 0x4023a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x81848da9
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x4023c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret