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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf0
xor eax, eax
push esi
xor esi, esi
push edi
mov ecx, 0x31bd
mov edi, 0x6bb4
mov dword [ebp - 0x64], 0x63cd
mov dword [ebp - 0x44], 0x5526
mov dword [ebp - 0x5c], 0x471b
mov dword [ebp - 0x40], 0x204d
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x3c], 0x190
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0x2db6
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x68], 0x52f6
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x38], 0x397d
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x48], 0xc5d
mov dword [ebp - 0x50], 0x3540
mov dword [ebp - 0x58], 0x3a3c
cmp dword [ebp + 8], eax
je 0x4025a7
cmp dword [ebp + 0xc], eax
je 0x4025a7
mov edx, dword [ebp + 0x10]
push ebx
mov eax, dword [edx + 0x358]
xor eax, dword [edx + 0x200]
lea ebx, [edx + 0x200]
cmp dword [ebp + 0xc], eax
jl 0x4025a6
nop
mov eax, 0x8b70344b
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401e30
mov eax, 0x2aaaaaab
imul edi
sar edx, 1
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x401e45
call fcn.00403330
mov edx, dword [ebp + 0x10]
mov dword [edx + 0x36c], eax
mov eax, dword [ebx]
xor dword [edx + 0x1e0], eax
mov ecx, dword [edx + 0x1e0]
mov eax, dword [ebp + 0xc]
mov dword [edx + 0x234], ebx
xor edx, edx
div ecx
mov edx, dword [ebp + 0x10]
mov edi, eax
mov dword [edx + 0x34c], edi
jmp 0x401e90
inc esi
mov eax, esi
and eax, 0x80000001
jns 0x401e9f
dec eax
or eax, 0xfffffffe
inc eax
jne 0x401ea2
inc esi
cmp esi, 0x533d
jl 0x401e90
imul edi, ecx
mov dword [edx + 0x1fc], edi
mov ecx, 0x7ee6
jmp 0x401ec0
mov eax, 0xb21642c9
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401ec0
xor esi, esi
test edi, edi
mov edi, dword [ebp + 0x10]
je 0x401f30
mov ebx, dword [ebp + 8]
mov eax, dword [edi + 0x234]
inc esi
mov al, byte [eax]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x234]
mov dl, byte [eax + 1]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x234]
mov cl, byte [eax + 2]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x234]
mov al, byte [eax + 3]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x1fc]
jb 0x401ee1
jmp 0x401f30
mov eax, 0x10624dd3
imul dword [ebp - 0x64]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x64], eax
jne 0x401f30
jmp 0x401f50
mov eax, 0x621b97c3
imul dword [ebp - 0x44]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x44], eax
jne 0x401f50
jmp 0x401f70
mov eax, 0xdbeb61f
imul dword [ebp - 0x5c]
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x5c], eax
jne 0x401f70
mov eax, 0x4253
mov edx, 0x96
mov ecx, 0x89
cmp ecx, edx
cmovl ecx, edx
dec eax
jne 0x401f96
mov eax, dword [edi + 0x1e0]
xor esi, esi
dec eax
je 0x40208d
lea ecx, [ecx]
mov eax, dword [edi + 0x1e0]
dec eax
push eax
push 1
push edi
call fcn.004031c0
mov ecx, dword [ebp - 0x40]
add esp, 0xc
mov bl, al
test ecx, ecx
je 0x401fe8
lea esp, [esp]
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x401fd0
mov dword [ebp - 0x40], ecx
xor eax, eax
lea ebx, [ebx]
cmp bl, byte [eax + edi + 0x23c]
je 0x402000
inc eax
cmp eax, esi
jbe 0x401ff0
jmp 0x402002
xor bl, bl
mov edi, dword [ebp - 0x60]
cmp edi, 0x7a2a
jge 0x402029
mov ecx, 0x7a29
sub ecx, edi
mov eax, 0x38e38e39
mul ecx
shr edx, 1
lea eax, [edx + edi]
lea eax, [eax + edx*8]
add eax, 9
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x402048
mov eax, 0x8c08c08d
imul ecx
add edx, ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402030
mov dword [ebp - 0x3c], ecx
mov edi, dword [ebp + 0x10]
test bl, bl
je 0x402057
mov byte [esi + edi + 0x23c], bl
inc esi
mov ebx, dword [ebp - 4]
cmp ebx, 0x903
jge 0x40207e
mov ecx, 0x902
sub ecx, ebx
mov eax, 0x38e38e39
mul ecx
shr edx, 1
lea eax, [edx + ebx]
lea eax, [eax + edx*8]
add eax, 9
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x1e0]
dec eax
cmp esi, eax
jb 0x401fb0
push 0x42
lea eax, [ebp - 0xab]
push 0
push eax
mov byte [ebp - 0xac], 0
call fcn.00403050
lea eax, [ebp - 0xac]
push eax
call fcn.00402c10
xor esi, esi
add esp, 0x10
mov dword [ebp - 0x30], 0x933e919c
mov dword [ebp - 0x2c], 0x3fdecfe4
mov dword [ebp - 0x28], 0x4d947730
mov dword [ebp - 0x24], 0x8ad23c7f
mov dword [ebp - 0x20], 0x71cecad5
mov dword [ebp - 0x1c], esi
xor ebx, ebx
lea ecx, [ecx]
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 0x4020fd
add ebx, 2
cmp ebx, 0x2d96
jl 0x4020e0
mov eax, 0x654b
lea ebx, [ebx]
dec eax
jne 0x402110
mov eax, 0x51eb851f
imul dword [ebp - 8]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 8], eax
jne 0x402113
movq xmm0, qword [ebp - 0x30]
add edi, 0xb8
mov dword [ebp - 4], edi
movq qword [edi], xmm0
movq xmm0, qword [ebp - 0x28]
movq qword [edi + 8], xmm0
movq xmm0, qword [ebp - 0x20]
movq qword [edi + 0x10], xmm0
mov word [edi + 0x18], si
xor eax, eax
jmp 0x402160
xor byte [ebp + eax - 0xac], 0xc8
inc eax
cmp eax, 0x41
jb 0x402160
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 0x402189
inc ebx
cmp ebx, 0x247f
jl 0x402170
mov ecx, 0x690f
mov eax, 0x939a85c5
imul ecx
add edx, ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402196
xor ebx, ebx
lea ecx, [ecx]
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 0x4021cb
add ebx, 5
cmp ebx, 0x64d9
jl 0x4021b0
mov ebx, dword [ebp + 0x10]
xor eax, eax
mov dword [ebp - 8], eax
cmp dword [ebx + 0x1e0], eax
jbe 0x4023eb
mov edi, ebx
lea esp, [esp]
movzx ebx, byte [eax + edi + 0x23c]
imul ebx, dword [edi + 0x34c]
add ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x34]
inc eax
cmp eax, 0x264
jl 0x402205
mov esi, dword [ebp - 0x4c]
mov dword [ebp - 0x34], eax
cmp esi, 0x534e
jge 0x402237
mov ecx, 0x534d
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 - 0x4c], eax
mov ecx, dword [ebp - 0x68]
mov dword [edi + 0xb0], ebx
test ecx, ecx
je 0x40225a
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402244
mov dword [ebp - 0x68], ecx
mov esi, dword [ebp - 0x14]
cmp esi, 0x7155
jge 0x40228e
inc esi
mov eax, 0x66666667
imul esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*4]
add ecx, ecx
mov eax, esi
sub eax, ecx
jne 0x402283
inc esi
cmp esi, 0x7155
jl 0x402265
mov dword [ebp - 0x14], esi
push 0x42
lea eax, [ebp - 0xef]
push 0
push eax
mov byte [ebp - 0xf0], 0
call fcn.00403050
push 0x42
lea eax, [ebp - 0xf0]
push ebx
push eax
call fcn.00403020
mov esi, dword [ebp - 0x54]
add esp, 0x18
cmp esi, 0x92c
jge 0x4022de
mov ecx, 0x92b
sub ecx, esi
mov eax, 0x38e38e39
mul ecx
shr edx, 1
lea eax, [edx + esi]
lea eax, [eax + edx*8]
add eax, 9
mov dword [ebp - 0x54], eax
mov ecx, 0x10
lea esi, [ebp - 0xac]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x10]
mov eax, dword [edi + 0xb0]
call eax
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x402316
mov eax, 0x13e22cbd
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402300
mov dword [ebp - 0x38], ecx
push 0x42
lea eax, [ebp - 0xf0]
push eax
push ebx
call fcn.00403020
xor esi, esi
add esp, 0xc
cmp dword [edi + 0x34c], esi
jbe 0x402379
mov eax, dword [edi + 0x234]
inc esi
mov al, byte [eax + 3]
xor byte [esi + ebx - 1], al
movzx ecx, byte [esi + ebx - 1]
mov eax, dword [edi + 0x234]
mov dl, byte [eax + 2]
xor dl, cl
mov byte [esi + ebx - 1], dl
mov eax, dword [edi + 0x234]
mov cl, byte [eax + 1]
xor cl, dl
mov byte [esi + ebx - 1], cl
mov eax, dword [edi + 0x234]
mov al, byte [eax]
xor al, cl
mov byte [esi + ebx - 1], al
cmp esi, dword [edi + 0x34c]
jb 0x402332
mov ebx, dword [ebp - 0x10]
cmp ebx, 0x64a4
jge 0x4023aa
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 0x40239f
inc ebx
cmp ebx, 0x64a4
jl 0x402384
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp - 0xc]
cmp ebx, 0x3b28
jge 0x4023d2
mov ecx, 0x3b27
sub ecx, ebx
mov eax, 0xaaaaaaab
mul ecx
shr edx, 2
lea eax, [edx + edx*2]
lea ebx, [ebx + eax*2]
add ebx, 6
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [edi + 0x1e0]
jb 0x4021f0
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 0x10]
mov eax, 0x67cb
mov edx, 0xef
mov ecx, 0x52
lea ebx, [ebx]
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x402400
call fcn.00403330
mov dword [ebx + 0x340], eax
add eax, 0xfffffffe
push eax
push dword [ebx + 0x36c]
call fcn.00401090
add esp, 8
mov eax, 0x256f
mov edx, 0x79
mov ecx, 0x46
cmp ecx, edx
cmovg ecx, edx
dec eax
jne 0x402434
xor ebx, ebx
mov edi, edi
inc ebx
mov eax, 0x92492493
imul ebx
add edx, ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
mov eax, ebx
sub eax, ecx
jne 0x402466
add ebx, 2
cmp ebx, 0x704c
jl 0x402440
push 0x1b30d67e
push edi
call fcn.00401ce0
add esp, 8
mov ecx, 0x6289
mov edx, 0x2b
mov eax, 0x85
jmp 0x402490
cmp eax, 0x2b
cmovg eax, edx
dec ecx
jne 0x402490
mov eax, dword [ebp + 0xc]
cdq
and edx, 0xff
lea esi, [edx + eax]
sar esi, 8
mov dword [ebp - 0xc], esi
mov esi, 0xe1b
mov eax, 0x473c1ab7
imul esi
sar edx, 6
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x4024b1
mov esi, dword [ebp - 0xc]
mov edi, 0x6e13
lea esp, [esp]
mov eax, 0x22b63cbf
imul edi
sar edx, 3
mov edi, edx
shr edi, 0x1f
add edi, edx
jne 0x4024d0
mov edi, dword [ebp - 4]
test esi, esi
je 0x402508
mov ebx, dword [ebp + 8]
lea ecx, [ecx]
push edi
push 0x100
push ebx
call fcn.004030b0
add esp, 0xc
add ebx, 0x100
dec esi
jne 0x4024f0
mov eax, 0x64aa
mov edx, 0xec
mov ecx, 0x7d
cmp ecx, edx
cmovl ecx, edx
dec eax
jne 0x402517
mov ecx, 0x544c
mov eax, 0xb81702e1
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x402524
mov eax, 0x62a
mov edx, 0xac
mov ecx, 0x35
cmp ecx, edx
cmovl ecx, edx
dec eax
jne 0x402548
mov eax, 0x288df0cb
imul dword [ebp - 0x48]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x48], eax
jne 0x402550
jmp 0x402570
mov eax, 0x6bca1af3
imul dword [ebp - 0x50]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x50], eax
jne 0x402570
jmp 0x402590
mov eax, 0x94f2095
imul dword [ebp - 0x58]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x58], eax
jne 0x402590
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret