Function at 0x422dd0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x8c
mov ecx, 0xd
cld
mov edi, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x28], 0xffffff9d
mov dword [ebp - 0x2c], 1
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
mov eax, dword [edx]
fld xword [0x6566d0]
mov dword [ecx + 0x24], eax
mov ebx, dword [edx]
push ebx
fild dword [esp]
fmul dword [0x6566c8]
sub esp, 0xc
fld st(1)
fld dword [0x6566e0]
fxch st(2)
fyl2x
fld dword [0x6566dc]
fld st(3)
fxch st(1)
fyl2x
fld1
fxch st(4)
fstp xword [ebp - 0x68]
fdivp st(1)
fxch st(2)
fstp qword [ebp - 0x78]
fadd st(1), st(0)
fstp qword [ebp - 0x88]
fstp qword [esp]
call sub.msvcrt.dll_floor
add esp, 0x10
fild dword [ebp + 0x14]
fld qword [ebp - 0x78]
fnstcw word [ebp - 0x1e]
fsub st(2), st(0)
mov ax, word [ebp - 0x1e]
fdiv st(1)
fxch st(2)
mov ah, 0xc
mov word [ebp - 0x20], ax
mov eax, dword [ebp + 8]
fldcw word [ebp - 0x20]
fistp dword [ebp - 0x24]
fldcw word [ebp - 0x1e]
fild dword [ebp + 0x18]
fld qword [ebp - 0x88]
fxch st(1)
fst dword [ebp - 0x30]
fmul dword [0x6566e4]
mov ecx, dword [ebp - 0x24]
fld xword [ebp - 0x68]
fxch st(3)
fstp qword [ebp - 0x40]
fmul st(1)
mov dword [eax + 0x20], ecx
fld st(2)
fld dword [0x6566e8]
fxch st(2)
fmul st(5)
inc ecx
fld dword [0x6566ec]
fxch st(2)
fxch st(1)
mov eax, dword [ebp - 0x2c]
fyl2x
shl eax, cl
push eax
mov ecx, dword [ebp + 8]
fild dword [esp]
fxch st(1)
mov dword [esp], ebx
fmul st(3)
fild dword [esp]
fxch st(1)
sub esp, 8
fsub st(3)
fmul st(2)
fsubrp st(1)
fldcw word [ebp - 0x20]
fistp dword [ebp - 0x24]
fldcw word [ebp - 0x1e]
fild dword [ebp + 0x14]
fadd dword [0x6566e4]
mov edx, dword [ebp - 0x24]
mov dword [ecx + 0x1c], edx
fmul dword [ebp - 0x30]
fmul st(4)
fmulp st(6)
fxch st(5)
fxch st(1)
fxch st(4)
fxch st(1)
fyl2x
fmulp st(1)
fsubrp st(2)
fxch st(1)
fmulp st(2)
faddp st(1)
fldcw word [ebp - 0x20]
fistp dword [ebp - 0x24]
fldcw word [ebp - 0x1e]
mov eax, dword [ebp - 0x24]
sub eax, edx
mov ebx, dword [ebp + 0x14]
shl ebx, 2
inc eax
mov dword [ecx + 0x28], eax
push ebx
call sub.msvcrt.dll_malloc
mov ecx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], ecx
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
mov edx, dword [ebp + 8]
mov dword [edx + 0x14], eax
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x18]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
mov dword [ecx + 0x18], eax
mov eax, dword [ebp + 0x14]
add esp, 0x10
mov dword [ecx], eax
mov dword [ecx + 4], ebx
mov dword [ecx + 0x2c], edx
mov eax, 0
cmp edx, 0x658f
jle 0x422f81
cmp dword [ebp + 0x18], 0x946f
jg 0x423464
mov eax, 0x3f70a3d7
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x30], eax
fld dword [0x6566e0]
fild dword [ebp + 0x18]
fxch st(1)
fstp qword [ebp - 0x50]
fstp qword [ebp - 0x48]
xor esi, esi
xor ebx, ebx
fld1
nop
lea esi, [esi]
lea eax, [esi + 1]
sub esp, 0x10
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
fmul qword [0x656718]
fld xword [0x6566f0]
fld1
fxch st(2)
fsub qword [0x656720]
fxch st(3)
fst qword [ebp - 0x88]
fxch st(3)
fadd qword [0x656728]
fmul qword [0x656730]
fmulp st(1)
fld st(0)
frndint
fsub st(1), st(0)
fxch st(1)
f2xm1
faddp st(2)
fxch st(1)
fscale
fstp st(1)
fld qword [ebp - 0x48]
fdivp st(2)
fmul qword [ebp - 0x40]
fadd st(0)
fmulp st(1)
fadd qword [ebp - 0x50]
fstp qword [esp]
call sub.msvcrt.dll_floor
add esp, 0x10
fld dword [esi*4 + 0x5d5620]
fxch st(1)
fnstcw word [ebp - 0x1e]
mov ax, word [ebp - 0x1e]
mov ah, 0xc
mov word [ebp - 0x20], ax
fldcw word [ebp - 0x20]
fistp dword [ebp - 0x24]
fldcw word [ebp - 0x1e]
fld qword [ebp - 0x88]
mov edi, dword [ebp - 0x24]
cmp ebx, edi
jge 0x42308e
mov eax, edi
sub eax, ebx
push eax
fild dword [esp]
fld1
fdivrp st(1)
add esp, 4
cmp ebx, dword [ebp + 0x14]
fld dword [esi*4 + 0x5d5624]
fsub st(3)
fmulp st(1)
jge 0x42308c
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
mov edx, 0x42c80000
mov dword [ebp - 0x8c], edx
fld dword [ebp - 0x8c]
fld st(3)
fadd st(1)
fxch st(4)
fadd st(2)
fxch st(4)
fstp dword [ecx + ebx*4]
inc ebx
cmp ebx, edi
setl dl
cmp ebx, dword [ebp + 0x14]
setl al
and eax, 0xff
test eax, edx
jne 0x423068
fstp st(0)
fstp st(0)
fstp st(1)
mov esi, dword [ebp - 0x58]
cmp esi, 0x56
jle 0x422fa0
xor esi, esi
cmp esi, dword [ebp + 0x14]
jge 0x4232e1
mov ecx, dword [ebp + 0xc]
mov ebx, 0xff9c0000
fld dword [0x656700]
mov ecx, dword [ecx + 0x78]
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp + 0x14]
add ecx, ecx
fld dword [0x656708]
mov edi, ecx
mov edx, dword [ebp + 0x18]
mov eax, edx
sar edx, 0x1f
idiv ecx
imul eax, esi
push eax
imul eax, eax
fild dword [esp]
fld st(0)
fmul dword [0x6566fc]
mov dword [esp], eax
fld st(4)
fxch st(2)
fmul dword [0x65670c]
fild dword [esp]
fmul dword [0x656704]
fxch st(3)
fxch st(1)
fxch st(2)
fxch st(1)
add esp, 4
fpatan
fld st(5)
fxch st(1)
fxch st(3)
fxch st(1)
fpatan
fxch st(2)
fmul st(4)
fxch st(2)
fmul st(3)
faddp st(2)
faddp st(1)
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x1c]
jmp 0x4231a1
mov edx, dword [ebp + 0x18]
mov eax, edx
sar edx, 0x1f
idiv ecx
mov edx, dword [ebp - 0x28]
imul eax, edx
push eax
imul eax, eax
fild dword [esp]
fld st(0)
fmul dword [0x6566fc]
mov dword [esp], eax
fld st(5)
fxch st(2)
mov eax, dword [ebp + 0xc]
fmul dword [0x65670c]
fild dword [esp]
fmul dword [0x656704]
fxch st(3)
fxch st(1)
fxch st(2)
fxch st(1)
add esp, 4
fpatan
fld st(6)
fxch st(1)
fxch st(3)
fxch st(1)
fpatan
fxch st(2)
fmul st(5)
fxch st(2)
fmul st(4)
faddp st(2)
fld st(2)
fsub dword [eax + 0x70]
fxch st(2)
faddp st(1)
fcompp
fnstsw ax
test ah, 1
je 0x42323f
mov eax, dword [ebp - 0x28]
add ebx, 0x10000
inc eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x28]
add eax, edx
cmp eax, esi
jl 0x423125
mov edx, dword [ebp + 0x14]
cmp dword [ebp - 0x2c], edx
jg 0x42324b
lea esi, [esi]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x7c]
add eax, esi
cmp eax, dword [ebp - 0x2c]
jg 0x423238
mov edx, dword [ebp + 0x18]
mov eax, edx
sar edx, 0x1f
idiv edi
mov edx, dword [ebp - 0x2c]
imul eax, edx
push eax
imul eax, eax
fild dword [esp]
fld st(0)
fmul dword [0x6566fc]
mov dword [esp], eax
fld st(5)
fxch st(2)
mov eax, dword [ebp + 0xc]
fmul dword [0x65670c]
fild dword [esp]
fmul dword [0x656704]
fxch st(3)
fxch st(1)
fxch st(2)
fxch st(1)
add esp, 4
fpatan
fld st(6)
fxch st(1)
fxch st(3)
fxch st(1)
fpatan
fxch st(2)
fmul st(5)
fxch st(2)
fmul st(4)
faddp st(2)
fld dword [eax + 0x74]
fadd st(3)
fxch st(2)
faddp st(1)
fcompp
fnstsw ax
test ah, 1
je 0x42324b
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp + 0x14]
cmp dword [ebp - 0x2c], edx
jle 0x4231c0
fstp st(0)
mov edx, dword [ebp - 0x2c]
lea eax, [ebx + edx - 1]
mov edx, dword [ebp - 0x34]
mov dword [edx + esi*4], eax
inc esi
cmp esi, dword [ebp + 0x14]
jl 0x4230c8
fstp st(0)
fstp st(0)
xor esi, esi
cmp esi, dword [ebp + 0x14]
jge 0x4232e1
fld qword [ebp - 0x40]
fdivr st(1)
mov ecx, dword [ebp + 8]
mov edx, 1
mov eax, dword [ecx + 0x14]
fld xword [0x6566d0]
fld dword [0x6566e4]
fld dword [0x6566e8]
push esi
mov ebx, dword [ebp + 8]
fild dword [esp]
fadd st(2)
mov ecx, dword [ebx + 0x20]
fld qword [ebp - 0x48]
inc ecx
mov ebx, edx
fmulp st(1)
fld st(3)
fxch st(1)
shl ebx, cl
fmul qword [ebp - 0x50]
mov dword [esp], ebx
fmul st(5)
fyl2x
fild dword [esp]
fxch st(1)
add esp, 4
fmul st(2)
fsub qword [0x656728]
fmulp st(1)
fadd qword [ebp - 0x50]
fldcw word [ebp - 0x20]
fistp dword [eax + esi*4]
fldcw word [ebp - 0x1e]
inc esi
cmp esi, dword [ebp + 0x14]
jl 0x423291
fstp st(0)
fstp st(0)
fstp st(0)
fstp st(0)
fdiv qword [ebp - 0x40]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
add eax, 0x24
xor esi, esi
mov ebx, dword [edx + 0x1c]
push ebx
mov ecx, dword [edx + 0x18]
mov edx, dword [ebp + 0x14]
push ecx
push edx
fld qword [ebp - 0x48]
fmul qword [ebp - 0x50]
fmulp st(1)
fst dword [ebp - 0x1c]
mov edx, dword [ebp - 0x1c]
push edx
fstp qword [ebp - 0x50]
call fcn.00422040
mov edx, dword [ebp + 8]
mov dword [edx + 8], eax
mov dword [esp], 0xc
call sub.msvcrt.dll_malloc
mov ecx, dword [ebp + 8]
add esp, 0x10
mov edi, eax
sub esp, 0xc
mov dword [ecx + 0xc], eax
mov eax, dword [ebp + 0x14]
shl eax, 2
push eax
call sub.msvcrt.dll_malloc
add esp, 0x10
mov dword [edi + esi*4], eax
inc esi
cmp esi, 2
jg 0x42336b
sub esp, 0xc
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
shl eax, 2
mov edi, dword [ebx + 0xc]
push eax
call sub.msvcrt.dll_malloc
add esp, 0x10
mov dword [edi + esi*4], eax
inc esi
cmp esi, 2
jle 0x42334a
xor esi, esi
cmp esi, dword [ebp + 0x14]
jge 0x42345c
fld dword [0x6566e0]
fld1
fxch st(1)
fstp qword [ebp - 0x50]
fld qword [ebp - 0x40]
fadd st(0)
mov eax, dword [ebp + 8]
fld xword [0x6566d0]
fxch st(1)
mov ecx, dword [eax + 4]
mov edi, dword [eax + 0xc]
fnstcw word [ebp - 0x1e]
fdivr st(2)
mov ax, word [ebp - 0x1e]
mov ah, 0xc
mov word [ebp - 0x20], ax
fld dword [0x6566e8]
push esi
fild dword [esp]
fadd qword [ebp - 0x50]
add esp, 4
fld st(3)
fxch st(1)
fmul qword [ebp - 0x48]
fmul st(3)
fyl2x
fmul st(1)
fsub qword [0x656728]
fadd st(0)
fstp dword [ebp - 0x1c]
fldz
fld dword [ebp - 0x1c]
fcom st(1)
fnstsw ax
test ah, 5
je 0x423480
fstp st(0)
fcom dword [0x656710]
fnstsw ax
test ah, 1
jne 0x423404
fstp st(0)
mov edx, 0x41800000
mov dword [ebp - 0x8c], edx
fld dword [ebp - 0x8c]
fldcw word [ebp - 0x20]
fist dword [ebp - 0x24]
fldcw word [ebp - 0x1e]
xor ebx, ebx
fld st(4)
mov eax, dword [ebp - 0x24]
push eax
mov edx, eax
fild dword [esp]
fsubp st(2)
add esp, 4
fsub st(1)
fld dword [ecx + edx*4 + 0x88]
fld st(1)
fmul dword [ecx + edx*4 + 0x84]
fxch st(1)
mov eax, dword [edi + ebx*4]
inc ebx
add edx, 0x11
fmul st(3)
cmp ebx, 2
faddp st(1)
fstp dword [eax + esi*4]
jle 0x423421
fstp st(0)
fstp st(0)
inc esi
cmp esi, dword [ebp + 0x14]
jl 0x4233ae
fstp st(0)
fstp st(0)
fstp st(0)
fstp st(0)
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [ebp + 0x18], 0xb3b0
jle 0x423487
mov ebx, dword [ebp + 8]
mov eax, 0x3fa33333
mov dword [ebx + 0x30], eax
jmp 0x422f84
fstp st(1)
jmp 0x4233e4
mov eax, dword [ebp + 8]
mov dword [eax + 0x30], 0x3f800000
jmp 0x422f84