Function at 0x40f4e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x42afa3
push eax
mov eax, 0x114c
mov dword fs:[0], esp
call fcn.004224d0
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x24], esi
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 8]
mov dword [esi + 0x14], eax
lea eax, [esi + 0x18]
mov edx, dword [ecx]
xor ebx, ebx
push 0x80
push eax
mov dword [ebp - 4], ebx
mov dword [esi], 0x42c290
mov word [esi + 0xa8], bx
mov dword [esi + 4], ebx
mov dword [esi + 0x1ac], ebx
mov dword [esi + 0xa4], ebx
mov dword [esi + 8], ecx
call dword [edx + 0x14]
cmp dword [esi + 0x14], ebx
jne 0x40f55d
mov ecx, dword [esi + 8]
mov edx, dword [ecx]
call dword [edx + 0x28]
test eax, eax
jne 0x40f55d
mov dword [esi + 4], 1
mov edi, dword [esi + 8]
mov dword [esi + 0x11bc], ebx
mov dword [esi + 0x11b4], ebx
mov dword [esi + 0x11b0], ebx
mov eax, dword [edi + 8]
mov dword [esi + 0x11b8], eax
mov eax, dword [esi + 4]
cmp eax, 1
je 0x40f9bf
mov eax, dword [edi]
lea ecx, [ebp - 0x58]
push 0x32
push ecx
mov ecx, edi
call dword [eax + 0x38]
lea edx, [ebp - 0x58]
push 0x24
push edx
push str.Messages_file__c__SS_International:
call fcn.00422490
add esp, 0xc
test eax, eax
je 0x40f5c9
mov eax, dword [esi + 0x14]
mov dword [esi + 4], 2
cmp eax, ebx
jne 0x40f9bf
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x34]
jmp 0x40f9bf
mov eax, dword [ebp - 0x28]
xor edi, edi
mov dword [ebp - 0x14], eax
mov word [esi + 0x1aa], ax
mov cx, word [esi + 0x1aa]
inc cx
mov eax, ecx
shl eax, 6
add eax, ecx
mov ecx, 0x101
and eax, 0xffff
cdq
idiv ecx
dec edx
inc edi
mov word [esi + 0x1aa], dx
mov byte [esi + edi + 0xa9], dl
cmp edi, 0x100
jl 0x40f5d8
mov eax, dword [esi + 0x11bc]
mov ecx, dword [esi + 0x11b8]
mov dword [ebp + 8], eax
mov eax, 0x32
xor edi, edi
cmp ecx, eax
mov dword [esi + 0x11bc], eax
jle 0x40f668
push 0x1000
lea ecx, [ebp - 0x1158]
push 1
push ecx
mov ecx, esi
call fcn.0040fca0
xor ecx, ecx
cmp eax, ebx
jle 0x40f658
movzx dx, byte [ebp + ecx - 0x1158]
add edi, edx
inc ecx
cmp ecx, eax
jl 0x40f648
mov eax, dword [esi + 0x11bc]
mov ecx, dword [esi + 0x11b8]
cmp eax, ecx
jl 0x40f62d
mov ecx, dword [ebp + 8]
push ebx
push ecx
mov ecx, esi
call fcn.0040fc50
cmp word [ebp - 0x14], di
je 0x40f691
mov eax, dword [esi + 0x14]
mov dword [esi + 4], 3
cmp eax, ebx
jne 0x40f9bf
jmp 0x40f9b7
push 2
lea eax, [ebp - 0x18]
push 2
push eax
mov ecx, esi
mov dword [esi + 0x11bc], 0x40
call fcn.0040fca0
mov cx, word [ebp - 0x18]
mov dx, word [ebp - 0x16]
push 2
lea eax, [ebp + 0x1a]
mov word [esi + 0xc], cx
push 1
push eax
mov ecx, esi
mov word [esi + 0xe], dx
call fcn.0040fca0
mov cx, word [ebp + 0x1a]
xor ax, ax
mov al, cl
push 2
push 4
mov dword [esi + 0x11bc], 0x80
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
xor ax, ax
mov al, ch
lea ecx, [eax + edx*4]
lea edx, [ebp - 0x20]
mov word [esi + 0x10], cx
push edx
mov ecx, esi
call fcn.0040fca0
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
push 1
lea edx, [ebp - 0x14]
mov dword [esi + 0x11bc], ecx
push 6
push edx
mov ecx, esi
mov dword [esi + 0xa0], eax
mov dword [esi + 0x98], ebx
mov dword [esi + 0x9c], ebx
call fcn.0040fca0
cmp eax, 6
jne 0x40f77e
mov di, word [ebp + 0xc]
mov ax, word [ebp - 0x14]
cmp ax, 0xffff
je 0x40f78a
mov ecx, dword [esi + 0x11bc]
mov edx, dword [esi + 0x11b8]
cmp ecx, edx
jge 0x40f9a9
mov ecx, dword [ebp - 0x12]
cmp ax, bx
jne 0x40f75f
mov dword [esi + 0x98], ecx
cmp ax, di
jne 0x40f76a
mov dword [esi + 0x9c], ecx
push 1
lea edx, [ebp - 0x14]
push 6
push edx
mov ecx, esi
call fcn.0040fca0
cmp eax, 6
je 0x40f733
mov dword [esi + 4], 3
jmp 0x40f99a
cmp dword [esi + 0x9c], ebx
je 0x40f993
cmp dword [esi + 0x98], ebx
je 0x40f993
mov edi, dword [ebp + 0x10]
mov dword [esi + 0xa4], ebx
cmp di, bx
mov word [esi + 0xa8], di
je 0x40f986
push 0x14
call fcn.0041d240
add esp, 4
mov dword [ebp + 0xc], eax
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x40f7e0
and edi, 0xffff
mov ecx, eax
push edi
call fcn.0040d4d0
jmp 0x40f7e2
xor eax, eax
cmp eax, ebx
mov byte [ebp - 4], 0
mov dword [esi + 0xa4], eax
jne 0x40f807
mov eax, dword [esi + 0x14]
mov dword [esi + 4], 6
cmp eax, ebx
jne 0x40f9bf
jmp 0x40f9b7
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x40f986
mov eax, dword [esi + 0x98]
push 1
mov dword [esi + 0x11bc], eax
lea eax, [ebp + 0xc]
push 1
push eax
mov ecx, esi
mov ebx, 0x8000
mov byte [ebp + 0xc], 0
call fcn.0040fca0
cmp word [edi], 0xffff
je 0x40f8d2
mov eax, edi
mov dword [ebp + 8], eax
cmp byte [ebp + 0xc], 0xff
je 0x40f8d2
mov di, word [eax]
cmp di, 0x8000
jae 0x40f862
add eax, 2
mov dword [ebp + 8], eax
jmp 0x40f8c4
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x158]
and ecx, 0xff
push ecx
push 1
push edx
mov ecx, esi
call fcn.0040fca0
mov eax, dword [ebp + 0xc]
and edi, 0xffff
mov ecx, eax
and ecx, 0xff
cmp ebx, edi
mov byte [ebp + ecx - 0x158], 0
jne 0x40f8b1
mov ecx, dword [esi + 0xa4]
lea edx, [ebp - 0x158]
push eax
push edx
push ebx
call fcn.0040d630
add dword [ebp + 8], 2
push 1
lea eax, [ebp + 0xc]
push 1
push eax
mov ecx, esi
call fcn.0040fca0
mov eax, dword [ebp + 8]
inc ebx
cmp word [eax], 0xffff
mov edi, dword [ebp + 0x14]
jne 0x40f846
mov eax, dword [esi + 0x9c]
push 1
lea ecx, [ebp + 0xc]
push 1
push ecx
mov ecx, esi
mov dword [esi + 0x11bc], eax
xor ebx, ebx
call fcn.0040fca0
cmp word [edi], 0xffff
je 0x40f984
mov eax, edi
mov dword [ebp + 0x14], eax
cmp byte [ebp + 0xc], 0xff
je 0x40f984
mov di, word [eax]
cmp di, 0x8000
jbe 0x40f917
add eax, 2
mov dword [ebp + 0x14], eax
jmp 0x40f979
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0x158]
and edx, 0xff
mov ecx, esi
push edx
push 1
push eax
call fcn.0040fca0
mov eax, dword [ebp + 0xc]
and edi, 0xffff
mov ecx, eax
and ecx, 0xff
cmp ebx, edi
mov byte [ebp + ecx - 0x158], 0
jne 0x40f966
mov ecx, dword [esi + 0xa4]
lea edx, [ebp - 0x158]
push eax
push edx
push ebx
call fcn.0040d630
add dword [ebp + 0x14], 2
push 1
lea eax, [ebp + 0xc]
push 1
push eax
mov ecx, esi
call fcn.0040fca0
mov eax, dword [ebp + 0x14]
inc ebx
cmp word [eax], 0xffff
jne 0x40f8ff
xor ebx, ebx
cmp dword [esi + 0x14], ebx
jne 0x40f9bf
cmp dword [esi + 4], 1
je 0x40f9bf
jmp 0x40f9b7
mov dword [esi + 4], 4
cmp dword [esi + 0x14], ebx
jne 0x40f9bf
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
call dword [eax + 0x34]
jmp 0x40f9bf
mov eax, dword [esi + 0x14]
mov dword [esi + 4], 3
cmp eax, ebx
jne 0x40f9bf
mov ecx, dword [esi + 8]
mov edx, dword [ecx]
call dword [edx + 0x34]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x11bc], ebx
mov dword [esi + 0x11b4], ebx
mov dword [esi + 0x11b0], ebx
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x14