Function at 0x640145b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0xc], 0
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 8]
cdq
xor eax, edx
mov dword [ebp - 0x20], ecx
sub eax, edx
mov dword [ebp - 0x10], eax
mov eax, ecx
mov ecx, dword [esi + 0xb8fc]
mov edx, dword [ebp - 0x10]
cmp ecx, 1
jle 0x64014621
mov eax, edx
cdq
idiv ecx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], edx
cdq
idiv ecx
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0xc]
mov ebx, edx
cdq
idiv ecx
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x20]
sub eax, ebx
cdq
idiv ecx
mov edx, dword [ebp + 8]
cmp edx, 1
jl 0x640148e3
cmp eax, 1
jl 0x640148e3
push edx
push eax
mov ecx, esi
call fcn.64015390
test eax, eax
jne 0x640148e5
push dword [ebp - 0xc]
mov ecx, esi
push ebx
push edi
call fcn.640148f0
test eax, eax
jne 0x640148e5
lea eax, [ebp - 0x5c]
mov ecx, edi
push eax
call fcn.6400cc10
mov ebx, dword [ebp - 0xc]
cmp ebx, dword [ebp - 0x10]
jge 0x640148dc
movsd xmm1, qword [0x64072f50]
mov eax, 8
movsd xmm2, qword [0x64072fd0]
mov dword [ebp + 8], eax
mov ecx, dword [esi + 0xb8fc]
xor edi, edi
cmp ecx, 1
jle 0x6401468c
mov eax, ebx
cdq
idiv ecx
mov eax, dword [ebp + 8]
jmp 0x6401468e
xor edx, edx
mov dword [ebp - 0x28], edx
cmp edx, dword [ebp - 0x20]
jge 0x640148c6
mov eax, dword [ebp - 0x44]
imul eax, ebx
add eax, dword [ebp - 0x58]
mov dword [ebp - 0x2c], eax
mov ecx, eax
mov eax, dword [ebp - 0x30]
imul eax, edx
add ecx, eax
mov eax, dword [ebp - 0x3c]
mov bh, byte [eax + ecx]
mov eax, dword [ebp - 0x38]
mov bl, byte [eax + ecx]
mov eax, dword [ebp - 0x34]
mov cl, byte [eax + ecx]
movzx eax, bh
mov dword [ebp - 0x14], eax
movzx ecx, cl
mov dword [ebp - 0x1c], ecx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movzx eax, bl
mov dword [ebp - 0x18], eax
mulsd xmm0, xmm1
addsd xmm0, xmm2
cvttsd2si edx, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
addsd xmm0, xmm2
cvttsd2si eax, xmm0
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
lea eax, [eax + edx*8]
add eax, edx
mov dword [ebp - 0x24], eax
mulsd xmm0, xmm1
addsd xmm0, xmm2
cvttsd2si ecx, xmm0
lea edx, [ecx + eax*8]
add edx, eax
mov eax, 1
shl ax, cl
shl edx, 2
movzx ecx, ax
mov dword [ebp - 8], ecx
cmp bl, bh
ja 0x64014800
mov eax, dword [esi + 0xb900]
cmp eax, 0xffffffff
je 0x64014746
cmp eax, 1
jne 0x6401479d
mov ebx, dword [ebp - 0x24]
movzx eax, word [ebx*2 + 0x64071de0]
test ax, ax
je 0x640147a0
and eax, ecx
test ax, ax
je 0x640147a0
mov eax, dword [esi + 0xb908]
mov ecx, dword [eax]
imul ecx, dword [ebp + 8]
add ecx, dword [eax + 8]
cmp byte [ecx + edi + 8], 0
mov ecx, dword [ebp - 8]
je 0x640147a0
mov eax, dword [ebp - 0x14]
add dword [esi + edx*4 + 0x3044], eax
mov eax, dword [ebp - 0x18]
add dword [esi + edx*4 + 0x3048], eax
inc dword [esi + edx*4 + 0x3040]
mov eax, dword [ebp - 0x1c]
add dword [esi + edx*4 + 0x304c], eax
jmp 0x640147a0
mov ebx, dword [ebp - 0x24]
mov eax, dword [esi + 0xb900]
cmp eax, 0xffffffff
je 0x640147af
test eax, eax
jne 0x64014803
movzx eax, word [ebx*2 + 0x64071be0]
test ax, ax
je 0x64014803
and eax, ecx
test ax, ax
je 0x64014803
mov eax, dword [esi + 0xb904]
mov ecx, dword [eax]
imul ecx, dword [ebp + 8]
add ecx, dword [eax + 8]
cmp byte [ecx + edi + 8], 0
je 0x64014803
mov eax, dword [ebp - 0x14]
add dword [esi + edx*4 + 0x2b4], eax
mov eax, dword [ebp - 0x18]
add dword [esi + edx*4 + 0x2b8], eax
inc dword [esi + edx*4 + 0x2b0]
mov eax, dword [ebp - 0x1c]
add dword [esi + edx*4 + 0x2bc], eax
jmp 0x64014803
mov ebx, dword [ebp - 0x24]
movzx eax, word [ebx*2 + 0x64071f50]
mov ecx, dword [ebp - 8]
test ax, ax
je 0x64014858
and eax, ecx
test ax, ax
je 0x64014858
mov eax, dword [esi + 0xb90c]
mov ecx, dword [eax]
imul ecx, dword [ebp + 8]
add ecx, dword [eax + 8]
cmp byte [ecx + edi + 8], 0
mov ecx, dword [ebp - 8]
je 0x64014858
mov eax, dword [ebp - 0x14]
add dword [esi + edx*4 + 0x5dd4], eax
mov eax, dword [ebp - 0x18]
add dword [esi + edx*4 + 0x5dd8], eax
inc dword [esi + edx*4 + 0x5dd0]
mov eax, dword [ebp - 0x1c]
add dword [esi + edx*4 + 0x5ddc], eax
movzx eax, word [ebx*2 + 0x64071d30]
test ax, ax
je 0x640148a7
and eax, ecx
test ax, ax
je 0x640148a7
mov eax, dword [esi + 0xb910]
mov ecx, dword [eax]
imul ecx, dword [ebp + 8]
add ecx, dword [eax + 8]
cmp byte [ecx + edi + 8], 0
je 0x640148a7
mov eax, dword [ebp - 0x14]
add dword [esi + edx*4 + 0x8b64], eax
mov eax, dword [ebp - 0x18]
add dword [esi + edx*4 + 0x8b68], eax
inc dword [esi + edx*4 + 0x8b60]
mov eax, dword [ebp - 0x1c]
add dword [esi + edx*4 + 0x8b6c], eax
mov edx, dword [ebp - 0x28]
inc edi
add edx, dword [esi + 0xb8fc]
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], edx
cmp edx, dword [ebp - 0x20]
jl 0x640146a6
mov eax, dword [ebp + 8]
mov ebx, dword [ebp - 0xc]
add ebx, dword [esi + 0xb8fc]
inc eax
mov dword [ebp + 8], eax
mov dword [ebp - 0xc], ebx
cmp ebx, dword [ebp - 0x10]
jl 0x64014675
mov ecx, esi
call fcn.64015620
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4