Function at 0x4305b0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x38
mov eax, dword [esp + 0x3c]
xor edx, edx
push ebx
push ebp
mov ecx, dword [eax + 8]
mov dx, word [eax + 0xe]
mov ebp, dword [eax + 4]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x4c]
push esi
mov eax, edx
xor esi, esi
mov si, word [ecx + 0xe]
imul eax, ebp
imul esi, dword [ecx + 4]
add eax, 0x1f
add esi, 0x1f
sar eax, 3
and al, 0xfc
xor edx, edx
sar esi, 3
mov dword [esp + 0x20], eax
and esi, 0xfffffffc
xor eax, eax
push edi
mov dword [esp + 0x10], esi
add ecx, 0x29
mov byte [ecx + 1], al
mov byte [ecx], al
mov byte [ecx - 1], al
mov byte [ecx + 2], dl
inc eax
add ecx, 4
cmp eax, 0x100
jl 0x4305fe
fild dword [esp + 0x5c]
fmul qword [0x45d9c0]
fild dword [esp + 0x60]
fmul qword [0x45d9c0]
fst qword [esp + 0x38]
fcos
fld st(1)
fcos
fmul st(1)
fmul qword [0x45d9b8]
call fcn.00437fa8
fxch st(1)
fsin
mov dword [esp + 0x2c], eax
fmul st(1)
fmul qword [0x45d9b8]
call fcn.00437fa8
fstp st(0)
fld qword [esp + 0x38]
fsin
mov dword [esp + 0x28], eax
fmul qword [0x45d9b8]
call fcn.00437fa8
mov ecx, eax
mov eax, 0x5fa
cdq
idiv dword [esp + 0x64]
mov edi, dword [esp + 0x58]
mov dword [esp + 0x54], ecx
mov edx, eax
imul edx, eax
imul eax, ecx
mov dword [esp + 0x34], edx
mov edx, ecx
and edx, 0xff
mov dword [esp + 0x30], eax
mov al, dl
mov ecx, esi
mov bl, al
mov bh, bl
mov eax, ebx
shl eax, 0x10
mov ax, bx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x10]
lea esi, [eax - 1]
mov al, dl
mov edi, esi
mov edx, dword [esp + 0x58]
imul edi, ecx
mov eax, ebx
add edi, edx
mov edx, ecx
shl eax, 0x10
mov ax, bx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, 1
cmp esi, ecx
mov dword [esp + 0x1c], ecx
jle 0x43086f
lea ebx, [ebp - 1]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x38], ebx
mov edi, ecx
mov ebp, dword [esp + 0x58]
imul edi, dword [esp + 0x10]
mov al, byte [esp + 0x54]
mov edx, dword [esp + 0x24]
add edi, ebp
mov esi, dword [esp + 0x50]
mov dword [esp + 0x14], 1
mov byte [edi], al
lea eax, [ecx - 1]
imul eax, edx
inc edi
cmp ebx, 1
lea esi, [eax + esi + 1]
lea eax, [esi + edx]
lea ebp, [eax + edx]
mov dword [esp + 0x4c], ebp
jle 0x43082d
dec eax
mov dword [esp + 0x18], eax
xor ecx, ecx
xor ebx, ebx
mov cl, byte [ebp + 1]
mov bl, byte [eax]
mov dword [esp + 0x64], ecx
xor ecx, ecx
mov cl, byte [esi + 1]
xor edx, edx
mov dword [esp + 0x60], ecx
xor ecx, ecx
mov cl, byte [esi - 1]
mov dl, byte [ebp - 1]
mov dword [esp + 0x5c], ecx
xor ecx, ecx
mov cl, byte [eax + 2]
mov eax, ebx
mov ebx, dword [esp + 0x60]
sub eax, ecx
mov ecx, dword [esp + 0x64]
sub eax, ebx
mov ebx, dword [esp + 0x5c]
sub eax, ecx
add eax, ebx
xor ecx, ecx
mov cl, byte [ebp]
xor ebx, ebx
mov bl, byte [esi]
add eax, edx
sub ecx, ebx
mov ebx, dword [esp + 0x5c]
sub ecx, ebx
mov ebx, dword [esp + 0x60]
sub ecx, ebx
mov ebx, dword [esp + 0x64]
add ecx, ebx
add ecx, edx
test eax, eax
jne 0x4307b1
test ecx, ecx
jne 0x4307b1
mov al, byte [esp + 0x54]
jmp 0x4307fc
mov edx, ecx
mov ebx, eax
imul edx, dword [esp + 0x28]
imul ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x30]
add ebp, edx
add ebx, ebp
mov dword [esp + 0x5c], ebx
jns 0x4307d1
xor al, al
jmp 0x4307f8
mov edx, ecx
imul edx, ecx
fild dword [esp + 0x5c]
mov ecx, eax
imul ecx, eax
mov eax, dword [esp + 0x34]
add eax, edx
add ecx, eax
mov dword [esp + 0x5c], ecx
fild dword [esp + 0x5c]
fsqrt
fdivp st(1)
call fcn.00437fa8
mov ebp, dword [esp + 0x4c]
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x38]
mov byte [edi], al
mov eax, dword [esp + 0x18]
inc edi
inc ecx
mov dword [esp + 0x14], ecx
inc esi
inc eax
and ecx, 0xffff
inc ebp
cmp ecx, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x4c], ebp
jl 0x430743
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x68]
mov dl, byte [esp + 0x54]
test eax, eax
mov byte [edi], dl
je 0x43084d
mov edx, dword [esp + 0x44]
inc ecx
push edx
push ecx
mov ecx, dword [esp + 0x74]
push ecx
call eax
test eax, eax
je 0x43087c
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x44]
inc ecx
mov dword [esp + 0x1c], ecx
and ecx, 0xffff
lea eax, [edx - 1]
mov dword [esp + 0x20], ecx
cmp ecx, eax
jl 0x4306fd
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x38
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x38
ret