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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c8
push ebx
push esi
mov esi, dword [0x44d480]
xor eax, eax
imul ebx, esi, 0xc5cdab29
mov dword [ebp - 0x6c], ecx
mov ecx, 0x2d0
push edi
mov dword [ebp - 0x50], 0x61
mov dword [ebp - 0x4c], 0x5e
mov dword [ebp - 0x48], 0x1e1
mov dword [ebp - 0x28], ebx
sub ecx, dword [ebp + eax*4 - 0x50]
inc eax
cmp eax, 3
jl 0x40d22c
movzx edi, byte [str.kk_KZ]
mov dword [ebp - 0x60], ecx
mov ecx, edi
mov dword [ebp - 0x24], 0x1873d839
mov dword [ebp - 0x20], 0x1184dc2f
mov dword [ebp - 0x1c], 0xebdaa5bb
mov word [ebp - 0x18], 0xdb9f
mov byte [ebp - 0x16], 0x9e
mov dword [ebp - 0x13], 0x4f0fe03c
mov word [ebp - 0xf], 0x1640
mov byte [ebp - 0xd], 0x7e
mov dword [ebp - 0x30], edi
push 0x15
pop eax
mov byte [ebp - 0x15], al
push 0xa
pop eax
mov dword [ebp - 0x5c], eax
mov byte [ebp - 0x14], al
mov eax, str.kk_KZ
push 0x1b
pop edx
test edi, edi
je 0x40d2ad
add edx, ecx
inc eax
cmp edx, 0x16b1
ja 0x40d2a4
movzx ecx, byte [eax]
test ecx, ecx
jne 0x40d290
jmp 0x40d2ad
imul ebx, esi, 0x284b04fd
mov dword [ebp - 0x28], ebx
mov esi, 0x4015e4
lea edi, [ebp - 0x50]
or ebx, 0x6c92b095
xor ecx, ecx
mov dword [ebp - 0xc], ebx
mov eax, ecx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov edi, ecx
mov byte [ebp + eax - 0x174], al
inc eax
cmp eax, 0x100
jb 0x40d2c9
mov esi, ecx
xor edx, edx
mov bl, byte [ebp + esi - 0x174]
push 0xa
mov eax, esi
pop ecx
div ecx
movzx ecx, bl
movzx eax, byte [ebp + edx - 0x50]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x174]
mov byte [ebp + esi - 0x174], al
inc esi
mov byte [ebp + edi - 0x174], bl
cmp esi, 0x100
jb 0x40d2da
xor eax, eax
mov ebx, eax
mov edi, eax
mov esi, eax
lea eax, [edi + 1]
movzx edi, al
mov cl, byte [ebp + edi - 0x174]
movzx edx, cl
lea eax, [ebx + edx]
movzx ebx, al
mov al, byte [ebp + ebx - 0x174]
mov byte [ebp + edi - 0x174], al
mov byte [ebp + ebx - 0x174], cl
movzx eax, byte [ebp + edi - 0x174]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x174]
xor al, byte [ebp + esi - 0x24]
mov byte [ebp + esi - 0x190], al
inc esi
cmp esi, 0x18
jb 0x40d31f
push 0x62
xor eax, eax
mov dword [ebp - 0x40], 0x1260cd87
pop edx
mov byte [ebp - 0x178], al
mov eax, 0x401990
push 9
mov word [ebp - 0x3c], 0xdb3
mov ecx, eax
mov dword [ebp - 0x64], eax
pop ebx
lea eax, [edx - 0x30]
cmp ax, bx
ja 0x40d3ae
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x40d394
mov eax, dword [ebp - 0xc]
jmp 0x40d3b6
mov eax, dword [ebp - 0x28]
xor eax, 0x5d80ea0f
imul ebx, eax, 0x72af31a3
lea edi, [ebp - 0x58]
push 5
pop eax
mov ecx, eax
mov esi, 0x4015f0
rep movsd dword es:[edi], dword [esi]
xor edx, edx
mov ecx, 0x401990
mov eax, edx
movsw word es:[edi], word [esi]
inc eax
lea ecx, [ecx + 2]
cmp eax, 0x145f
jl 0x40d5e6
cmp word [ecx], dx
jne 0x40d3d6
cmp eax, 0x179c
jle 0x40d3f6
call fcn.0040cdc3
mov eax, dword [ebp - 0x28]
xor eax, 0xd19bcb03
mov dword [ebp - 0x28], eax
add ebx, 0x5d2d4661
mov dword [ebp - 8], ebx
call fcn.0040cc68
xor ecx, ecx
mov edi, ecx
mov eax, ecx
mov byte [ebp + eax - 0x174], al
inc eax
cmp eax, 0x100
jb 0x40d415
mov esi, ecx
xor edx, edx
mov bl, byte [ebp + esi - 0x174]
push 0x15
mov eax, esi
pop ecx
div ecx
movzx ecx, bl
movzx eax, byte [ebp + edx - 0x58]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x174]
mov byte [ebp + esi - 0x174], al
inc esi
mov byte [ebp + edi - 0x174], bl
cmp esi, 0x100
jb 0x40d426
mov edx, dword [ebp - 0x28]
xor eax, eax
mov ecx, eax
mov esi, eax
mov edi, eax
lea eax, [esi + 1]
movzx esi, al
mov al, byte [ebp + esi - 0x174]
mov byte [ebp - 1], al
movzx eax, al
mov dword [ebp - 0x38], eax
add eax, ecx
movzx ecx, al
xor eax, eax
mov dword [ebp - 0xc], ecx
cmp byte [str.kk_KZ], al
je 0x40d4ab
inc eax
cmp eax, 0x626
jg 0x40d5fb
cmp byte [eax + str.kk_KZ], 0
jne 0x40d496
mov ebx, dword [ebp - 8]
mov al, byte [ebp + ecx - 0x174]
and edx, 0xf8b5931b
mov byte [ebp + esi - 0x174], al
mov al, byte [ebp - 1]
mov byte [ebp + ecx - 0x174], al
movzx eax, byte [ebp + esi - 0x174]
add eax, dword [ebp - 0x38]
movzx eax, al
imul edx, edx, 0x8f9d724e
mov al, byte [ebp + eax - 0x174]
xor al, byte [ebp + edi - 0x40]
mov byte [ebp + edi - 0x74], al
inc edi
mov dword [ebp - 0x28], edx
cmp edi, 6
jb 0x40d46e
xor edx, edx
mov dword [ebp - 0x50], 0x1f
mov byte [ebp - 0x6e], dl
mov ecx, edx
mov dword [ebp - 0x4c], 0x46
mov eax, edx
mov dword [ebp - 0x48], 0xffffff9b
sub ecx, dword [ebp + eax*4 - 0x50]
inc eax
cmp eax, 3
jl 0x40d51a
mov dword [ebp - 0x40], ecx
mov eax, edx
mov ecx, edx
mov dword [ebp - 0x50], 0x56
mov dword [ebp - 0x4c], 0x27
mov dword [ebp - 0x48], 0xffffff83
sub ecx, dword [ebp + eax*4 - 0x50]
inc eax
cmp eax, 3
jl 0x40d540
mov esi, 0x401608
mov dword [ebp - 0x68], ecx
lea edi, [ebp - 0x4c]
mov dword [ebp - 0x24], 0xeda0c5f4
mov dword [ebp - 0x20], 0xd6a40b94
mov eax, edx
mov dword [ebp - 0x1c], 0xe284e350
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x18], 0x2c2db6b7
mov dword [ebp - 0x14], 0xd34d2270
mov dword [ebp - 0x10], 0x28cac9e7
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, edx
mov byte [ebp + eax - 0x174], al
inc eax
cmp eax, 0x100
jb 0x40d586
mov esi, edx
mov dl, byte [ebp + esi - 0x174]
mov eax, esi
and eax, 7
movzx ecx, dl
mov byte [ebp - 1], dl
movzx eax, byte [ebp + eax - 0x4c]
add eax, edi
add ecx, eax
xor eax, eax
movzx edi, cl
mov ecx, 0x401990
mov dword [ebp - 0x38], edi
inc eax
lea ecx, [ecx + 2]
cmp eax, 0x1383
je 0x40d617
xor edi, edi
cmp word [ecx], di
mov edi, dword [ebp - 0x38]
jne 0x40d5bf
cmp eax, 0x25b2
jle 0x40d625
lea eax, [ebx + 0x785a9cdc]
mov dword [ebp - 0x28], eax
jmp 0x40d62b
call fcn.0040cc68
mov eax, dword [ebp - 0x28]
mov ebx, eax
xor ebx, 0xdace2790
jmp 0x40d3f9
call fcn.0040cc17
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
sub ebx, 0x5d49409d
mov edx, dword [ebp - 0x28]
mov dword [ebp - 8], ebx
jmp 0x40d4ae
call fcn.0040cc68
mov dl, byte [ebp - 1]
add ebx, 0x7db34e03
add ebx, 0x6cf4599c
mov al, byte [ebp + edi - 0x174]
xor ebx, 0x80c0c46
mov byte [ebp + esi - 0x174], al
inc esi
mov byte [ebp + edi - 0x174], dl
cmp esi, 0x100
jb 0x40d597
xor eax, eax
mov dword [ebp - 8], ebx
mov ebx, dword [ebp - 0x28]
mov edi, eax
mov dword [ebp - 0xc], eax
mov esi, eax
lea eax, [edi + 1]
xor ebx, 0x6fece78c
movzx edi, al
mov eax, dword [ebp - 0xc]
mov cl, byte [ebp + edi - 0x174]
movzx edx, cl
add eax, edx
movzx eax, al
mov dword [ebp - 0xc], eax
mov al, byte [ebp + eax - 0x174]
mov byte [ebp + edi - 0x174], al
mov eax, dword [ebp - 0xc]
mov byte [ebp + eax - 0x174], cl
movzx eax, byte [ebp + edi - 0x174]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x174]
xor al, byte [ebp + esi - 0x24]
mov byte [ebp + esi - 0x1ac], al
inc esi
cmp esi, 0x18
jb 0x40d662
mov ecx, dword [ebp - 0x30]
xor eax, eax
mov ebx, dword [ebp - 8]
mov byte [ebp - 0x194], al
mov dword [ebp - 0x24], 0x86511c7e
mov dword [ebp - 0x20], 0xd2c247f3
mov dword [ebp - 0x1c], 0x6400f267
mov dword [ebp - 0x18], 0x3974e6ef
mov dword [ebp - 0x14], 0xa4aaf30c
mov word [ebp - 0x10], 0x170f
mov byte [ebp - 0xe], 0x84
push 5
pop eax
mov byte [ebp - 0xd], al
mov eax, dword [0x401614]
mov dword [ebp - 0x38], eax
mov ax, word [0x401618]
mov word [ebp - 0x34], ax
mov eax, 0x1bf5
test ecx, ecx
je 0x40d739
mov edx, str.kk_KZ
add eax, ecx
inc edx
cmp eax, 0xc80
ja 0x40d734
movzx ecx, byte [edx]
test ecx, ecx
jne 0x40d721
jmp 0x40d739
call fcn.0040cdc3
call fcn.0040cc17
lea esi, [ebx - 0x493d71d1]
or esi, 0x16443dc6
xor ecx, ecx
mov dword [ebp - 8], esi
mov eax, ecx
mov byte [ebp + eax - 0x174], al
inc eax
cmp eax, 0x100
jb 0x40d751
mov edi, ecx
mov esi, ecx
xor edx, edx
mov bl, byte [ebp + edi - 0x174]
push 5
mov eax, edi
pop ecx
div ecx
movzx ecx, bl
movzx eax, byte [ebp + edx - 0x38]
add eax, esi
add ecx, eax
movzx esi, cl
mov al, byte [ebp + esi - 0x174]
mov byte [ebp + edi - 0x174], al
inc edi
mov byte [ebp + esi - 0x174], bl
cmp edi, 0x100
jb 0x40d764
mov esi, dword [ebp - 8]
xor ecx, ecx
mov edx, ecx
mov dword [ebp - 0xc], ecx
mov edi, ecx
lea eax, [edi + 1]
movzx edi, al
mov al, byte [ebp + edi - 0x174]
mov byte [ebp - 1], al
movzx eax, al
add eax, edx
cmp byte [str.kk_KZ], 0
movzx eax, al
mov dword [ebp - 0x30], eax
mov eax, ecx
je 0x40d7f6
inc eax
cmp eax, 0xedb
jg 0x40d7e4
cmp byte [eax + str.kk_KZ], 0
jne 0x40d7d3
cmp eax, 0x62
jle 0x40d7f6
call fcn.0040cdc3
and esi, 0x32b4b679
jmp 0x40d7fc
imul esi, esi, 0x6a3cb36b
mov ebx, esi
imul esi, esi, 0x1894a5cb
call fcn.0040cdc3
mov edx, dword [ebp - 0x30]
push 0
mov al, byte [ebp + edx - 0x174]
mov byte [ebp + edi - 0x174], al
mov al, byte [ebp - 1]
movzx ecx, al
mov byte [ebp + edx - 0x174], al
movzx eax, byte [ebp + edi - 0x174]
add ecx, eax
movzx eax, cl
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp + eax - 0x174]
xor al, byte [ebp + ecx - 0x24]
mov byte [ebp + ecx - 0x1c8], al
inc ecx
mov dword [ebp - 0xc], ecx
cmp ecx, 0x18
pop ecx
jb 0x40d7ad
mov dword [ebp - 8], esi
lea edi, [ebp - 0x50]
mov esi, 0x40161c
mov byte [ebp - 0x1b0], cl
push 5
pop eax
mov byte [ebp - 0x2d], al
mov eax, ecx
movsd dword es:[edi], dword [esi]
mov word [ebp - 0x30], 0x8d2
mov byte [ebp - 0x2e], 0xea
mov byte [ebp - 0x2c], 0x3b
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0xc], ecx
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov byte [ebp + eax - 0x174], al
inc eax
cmp eax, 0x100
jb 0x40d888
mov esi, dword [ebp - 8]
mov edi, ecx
xor edx, edx
mov cl, byte [ebp + edi - 0x174]
mov eax, edi
mov byte [ebp - 1], cl
div dword [ebp - 0x5c]
movzx ecx, cl
movzx eax, byte [ebp + edx - 0x50]
add eax, dword [ebp - 0xc]
add ecx, eax
xor eax, eax
movzx edx, cl
mov ecx, eax
mov dword [ebp - 0xc], edx
mov eax, 0x401990
inc ecx
lea eax, [eax + 2]
cmp ecx, 0x25fd
je 0x40d8e1
xor esi, esi
cmp word [eax], si
mov esi, dword [ebp - 8]
jne 0x40d8c9
jmp 0x40d8e7
xor ebx, 0x56afb060
sub esi, 0x5589f76d
mov dword [ebp - 8], esi
mov al, byte [ebp + edx - 0x174]
or ebx, 0xbaf6c8cb
mov byte [ebp + edi - 0x174], al
inc edi
mov al, byte [ebp - 1]
mov dword [0x44d480], ebx
mov byte [ebp + edx - 0x174], al
cmp edi, 0x100
jb 0x40d89c
xor eax, eax
mov dword [ebp - 0x5c], ebx
mov esi, eax
mov ebx, eax
mov edi, eax
lea eax, [ebx + 1]
movzx ebx, al
push 5
mov cl, byte [ebp + ebx - 0x174]
movzx edx, cl
lea eax, [edx + esi]
movzx esi, al
mov al, byte [ebp + esi - 0x174]
mov byte [ebp + ebx - 0x174], al
mov byte [ebp + esi - 0x174], cl
movzx eax, byte [ebp + ebx - 0x174]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x174]
xor al, byte [ebp + edi - 0x30]
mov byte [ebp + edi - 0x38], al
inc edi
pop eax
cmp edi, eax
jb 0x40d92c
mov esi, dword [ebp - 8]
xorps xmm1, xmm1
mov ebx, dword [ebp - 0x5c]
xor eax, eax
mov dword [ebp - 0x54], 0x5a
mov dword [ebp - 0x50], 0x4a
mov dword [ebp - 0x4c], 0x5f
mov dword [ebp - 0x48], 0xfffffefd
movups xmm0, xmmword [ebp - 0x54]
push 0x62
pop ecx
psubd xmm1, xmm0
mov byte [ebp - 0x33], al
movaps xmm0, xmm1
psrldq xmm0, 8
paddd xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 4
paddd xmm1, xmm0
push 9
movd edi, xmm1
pop edx
lea eax, [ecx - 0x30]
cmp ax, dx
ja 0x40d9ec
mov eax, dword [ebp - 0x64]
add eax, 2
mov dword [ebp - 0x64], eax
movzx eax, word [eax]
mov ecx, eax
test ax, ax
jne 0x40d9cf
jmp 0x40d9f8
lea ebx, [esi + 0x588e035a]
mov dword [0x44d480], ebx
imul eax, ebx, 0x2348bf90
mov dword [0x44d4d4], eax
call fcn.0040cdc3
mov eax, dword [ebp - 0x60]
lea ecx, [ebp - 0x60]
push ecx
push dword [ebp - 0x68]
lea ecx, [ebp - 0x74]
mov eax, dword fs:[eax]
push dword [ebp - 0x40]
push dword [eax + 0xa8]
push dword [eax + 0xa4]
call fcn.0041e657
mov edx, eax
lea ecx, [ebp - 0x190]
call fcn.0041e636
call eax
lea ecx, [ebp - 0x1ac]
call fcn.004361ab
push dword [ebp - 0x60]
mov esi, eax
lea ecx, [ebp - 0x38]
push esi
push dword [ebp - 0x6c]
call fcn.0041e657
mov edx, eax
lea ecx, [ebp - 0x1c8]
call fcn.0041e636
call eax
mov ecx, esi
call fcn.004369fb
push eax
push edi
push esi
call fcn.004360de
add esp, 0x18
mov ecx, esi
call fcn.0041e600
pop edi
pop esi
pop ebx
leave
ret