Function at 0x100051b1
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0xb8
lea edx, [eax + 0xf0]
push ebx
mov ecx, eax
push edi
mov dword [esp + 0x98], ecx
mov dword [esp + 0xb0], edx
cmp eax, edx
ja 0x100051ab
fld qword [esp + 0x40]
mov edi, dword [esp + 0x80]
fld qword [esp + 0x68]
mov ebx, dword [esp + 0x90]
fld qword [esp + 0x70]
fld qword [esp + 0x60]
fld qword [esp + 0x50]
fld qword [esp + 0x58]
jmp 0x100050db
mov ecx, dword [esp + 0x98]
cmp ecx, 0x7847
ja 0x100056ad
je 0x10005696
lea eax, [ecx - 0x1f7f]
cmp eax, 0xc8
ja case.0x10005105.8064
movzx eax, byte [eax + 0x100059d0]
jmp dword [eax*4 + 0x100059b8]
fstp st(0)
push 0
fstp st(3)
lea edi, [esi + 4]
fstp st(2)
push 0
fstp st(1)
push edi
fstp st(1)
fstp st(0)
call fcn.100061b0
mov ecx, dword [esi + 0x18]
add esp, 0xc
lea edx, [eax + ecx*8]
push edi
mov dword [esp + 0xb0], edx
call fcn.1001df00
sub eax, dword [esi + 0x1c]
add esp, 4
test eax, eax
jle 0x10005153
push edi
call fcn.1001df00
add esp, 4
sub eax, dword [esi + 0x1c]
jmp 0x10005155
xor eax, eax
fld qword [esp + 0x70]
mov edi, dword [esp + 0x80]
fld qword [esp + 0x68]
mov dword [esp + 0x84], eax
fld qword [esp + 0x40]
fld qword [esp + 0x60]
fld qword [esp + 0x50]
fld qword [esp + 0x58]
fxch st(3)
fxch st(5)
fxch st(3)
mov eax, dword [esp + 0x98]
add eax, 0x28
mov dword [esp + 0x98], eax
cmp eax, dword [esp + 0xb0]
jbe 0x100050d4
fstp st(0)
fstp st(3)
fstp st(2)
fstp st(1)
fstp st(1)
fstp st(0)
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x48], 0
je 0x1000542e
mov dword [esp + 0x2c], 0
mov dword [esp + 0x3c], 4
cmp dword [esp + 0x2c], 0xbd
ja case.0x100051e4.1
mov eax, dword [esp + 0x2c]
movzx ecx, byte [eax + 0x10005ab0]
jmp dword [ecx*4 + 0x10005a9c]
fstp st(5)
fld qword [esi + 0x38]
fst qword [esp + 0x40]
fxch st(5)
jmp case.0x100051e4.1
fld st(5)
call fcn.100305b0
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fsubr st(6)
fstp qword [esi + 0x38]
jmp case.0x100051e4.1
fstp st(0)
push 0
fstp st(3)
fnstcw word [esp + 0x50]
movzx eax, word [esp + 0x50]
fstp st(2)
or eax, 0xc00
fstp st(1)
mov dword [esp + 0x2c], eax
fstp st(0)
lea eax, [esi + 4]
fldcw word [esp + 0x2c]
fistp qword [esp + 0x8c]
mov edx, dword [esp + 0x8c]
push edx
push eax
fldcw word [esp + 0x58]
call fcn.100061b0
add esp, 0xc
fld qword [esp + 0x70]
fld qword [esp + 0x68]
fld qword [esp + 0x40]
fld qword [esp + 0x60]
fld qword [esp + 0x50]
fld qword [esp + 0x58]
fxch st(3)
fxch st(5)
jmp 0x1000539c
fld st(5)
mov dword [esp + 0x38], 0
call fcn.100305b0
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x84]
jge case.0x100051e4.1
jmp 0x1000529a
fxch st(5)
mov dword [esp + 0x4c], 0x5e33
mov eax, dword [esp + 0x4c]
cmp eax, 0x5f38
ja 0x100053b2
je 0x10005338
sub eax, 0x5e33
je 0x10005321
sub eax, 0x57
je 0x100052ef
sub eax, 0x57
jne 0x1000533e
mov ecx, dword [esi + 0x5c]
fstp st(2)
mov edx, 1
shl edx, cl
mov dword [esp + 0x88], edx
fild dword [esp + 0x88]
fmul st(3)
fisub dword [esp + 0xa8]
fxch st(2)
jmp 0x1000533e
mov ecx, dword [esi + 0x5c]
fstp st(3)
fild dword [esp + 0x28]
mov eax, 1
shl eax, cl
fsubr st(5)
mov dword [esp + 0x88], eax
fild dword [esp + 0x88]
fmul st(1)
call fcn.100305b0
fxch st(3)
mov dword [esp + 0xa8], eax
jmp 0x1000533e
mov ecx, dword [esp + 0xac]
mov edx, dword [esp + 0x28]
lea eax, [ecx + edx*8]
mov dword [esp + 0xb4], eax
jmp 0x1000533e
fstp st(4)
fldz
fxch st(4)
mov eax, dword [esp + 0x4c]
add eax, 0x57
mov dword [esp + 0x4c], eax
cmp eax, 0x5fe6
jbe 0x100052a2
inc dword [esp + 0x38]
fxch st(5)
fadd qword [esi + 0x40]
fld st(0)
call fcn.100305b0
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x84]
jl 0x10005298
mov edi, dword [esp + 0x80]
fst qword [esp + 0x40]
fxch st(4)
fst qword [esp + 0x68]
fxch st(3)
fst qword [esp + 0x70]
fxch st(2)
fst qword [esp + 0x60]
fxch st(4)
fxch st(5)
fxch st(3)
fxch st(4)
fxch st(2)
fxch st(3)
add dword [esp + 0x2c], 0x3f
dec dword [esp + 0x3c]
jne 0x100051cb
jmp case.0x10005105.8064
sub eax, 0x5f8f
je 0x100053d3
sub eax, 0x57
jne 0x1000533e
mov ecx, dword [esp + 0xa0]
fxch st(4)
mov edx, dword [esp + 0x38]
fst qword [ecx + edx*8]
jmp 0x1000533c
mov edi, dword [esi + 0x58]
xor ecx, ecx
test edi, edi
jle 0x1000533e
mov edx, 0x769c
cmp edx, edx
jne 0x1000541a
mov ebx, dword [esi + 0x30]
fld st(2)
mov ebx, dword [ebx]
mov eax, edi
imul eax, dword [esp + 0xa8]
add eax, ecx
add eax, eax
inc ecx
fmul qword [ebx + eax*8]
fadd qword [ebx + eax*8 + 8]
mov eax, dword [esp + 0xb4]
mov ebx, dword [esp + 0x90]
fmul qword [eax + ecx*8 - 8]
faddp st(5)
add edx, 0x5a
cmp edx, 0x769c
jbe 0x100053e7
cmp ecx, edi
jl 0x100053e0
jmp 0x1000533e
mov dword [esp + 0x28], 0x6917
mov eax, dword [esp + 0x28]
sub eax, 0x6917
je 0x100054aa
sub eax, 0x3f
je 0x10005450
sub eax, 0x3f
jne 0x1000548c
mov dword [esi + 0x3c], eax
jmp 0x1000548c
mov ecx, dword [esi + 0x3c]
fstp st(0)
fstp st(3)
push 0
fstp st(2)
push ecx
fstp st(1)
lea edx, [esi + 4]
fstp st(1)
push edx
fstp st(0)
call fcn.100061b0
fld qword [esp + 0x7c]
add esp, 0xc
fld qword [esp + 0x68]
fld qword [esp + 0x40]
fld qword [esp + 0x60]
fld qword [esp + 0x50]
fld qword [esp + 0x58]
fxch st(3)
fxch st(5)
fxch st(3)
mov eax, dword [esp + 0x28]
add eax, 0x3f
mov dword [esp + 0x28], eax
cmp eax, 0x6995
jbe 0x10005436
mov dword [esp + 0x90], ebx
jmp case.0x10005105.8064
mov eax, dword [esp + 0x84]
mov dword [esp + 0x38], 0
cmp dword [esi + 0x3c], eax
jge 0x1000548c
mov dword [esp + 0x2c], 0
mov dword [esp + 0x3c], 7
cmp dword [esp + 0x2c], 0x66
ja case.0x100054e4.1
mov ecx, dword [esp + 0x2c]
movzx edx, byte [ecx + 0x10005b90]
jmp dword [edx*4 + 0x10005b70]
mov eax, dword [esp + 0x9c]
fstp st(0)
mov ecx, dword [esi + 0x5c]
fstp st(0)
shl eax, cl
mov dword [esp + 0x88], eax
fild dword [esp + 0x88]
test eax, eax
jns 0x10005513
fadd qword [0x10039428]
fmul qword [0x100394a0]
fldz
jmp case.0x100054e4.1
mov edi, dword [esp + 0x9c]
mov ecx, 0x20
sub ecx, dword [esi + 0x5c]
shr edi, cl
mov dword [esp + 0x80], edi
jmp case.0x100054e4.1
xor ebx, ebx
jmp case.0x100054e4.1
mov ecx, dword [esi + 0x38]
mov dword [esp + 0x9c], ecx
jmp case.0x100054e4.1
mov edx, dword [esi + 0x3c]
mov eax, dword [esp + 0xac]
lea ecx, [eax + edx*8]
mov dword [esp + 0xbc], ecx
jmp case.0x100054e4.1
mov edx, dword [esp + 0xa0]
mov eax, dword [esp + 0x38]
fst qword [edx + eax*8]
jmp case.0x100054e4.1
mov edx, dword [esi + 0x58]
cmp ebx, edx
jge case.0x100054e4.1
mov ecx, 0x4f06
mov eax, ecx
sub eax, 0x4f06
je 0x10005593
sub eax, 0x20
jne 0x100055bd
inc ebx
jmp 0x100055bd
mov eax, edx
imul eax, edi
mov edi, dword [esi + 0x30]
mov edi, dword [edi]
add eax, ebx
add eax, eax
fld qword [edi + eax*8]
fmul st(2)
fadd qword [edi + eax*8 + 8]
mov eax, dword [esp + 0xbc]
mov edi, dword [esp + 0x80]
fmul qword [eax + ebx*8]
faddp st(1)
add ecx, 0x20
cmp ecx, 0x4f26
jbe 0x10005582
cmp ebx, edx
jl 0x1000557d
add dword [esp + 0x2c], 0x11
dec dword [esp + 0x3c]
jne 0x100054ce
inc dword [esp + 0x38]
mov ecx, dword [esi + 0x40]
add dword [esi + 0x38], ecx
mov edx, dword [esi + 0x44]
mov eax, dword [esp + 0x84]
adc dword [esi + 0x3c], edx
cmp dword [esi + 0x3c], eax
jl 0x100054be
fst qword [esp + 0x58]
fxch st(1)
fst qword [esp + 0x50]
fxch st(1)
jmp 0x1000548c
fild dword [esp + 0x84]
fmul qword [esi + 0x28]
fadd qword [0x10039430]
call fcn.100305b0
mov dword [esp + 0xa4], eax
jmp case.0x10005105.8064
mov ecx, dword [esp + 0xa4]
fstp st(0)
mov edx, dword [ebp + 0x24]
fstp st(3)
fstp st(2)
push ecx
fstp st(1)
push edx
fstp st(1)
fstp st(0)
call fcn.1001b4a0
add esp, 8
mov dword [esp + 0xa0], eax
jmp 0x10005679
mov eax, dword [esp + 0xa4]
fstp st(0)
sub eax, dword [esp + 0x38]
fstp st(3)
fstp st(2)
fstp st(1)
push eax
mov eax, dword [ebp + 0x24]
fstp st(1)
fstp st(0)
call fcn.10018780
add esp, 4
fld qword [esp + 0x70]
fld qword [esp + 0x68]
fld qword [esp + 0x40]
fld qword [esp + 0x60]
fld qword [esp + 0x50]
fld qword [esp + 0x58]
jmp 0x1000517b
mov ecx, dword [esi]
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + 0x30]
add ecx, ecx
lea ecx, [eax + ecx*8 + 4]
mov dword [esp + 0x30], ecx
jmp case.0x10005105.8064
lea eax, [ecx - 0x786f]
cmp eax, 0xa0
ja case.0x10005105.8064
movzx edx, byte [eax + 0x10005c10]
jmp dword [edx*4 + 0x10005bf8]
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 8]
mov ecx, dword [ebp + 8]
cdq
idiv dword [ecx]
mov edx, dword [ebp + 0x14]
mov dword [edx + 0x20], eax
jmp case.0x10005105.8064
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax]
mov eax, 3
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 1
jne 0x1000571e
mov edx, dword [ebp + 0x1c]
fld qword [edx]
fld1
fucompp
fnstsw ax
test ah, 0x44
jp 0x1000571e
mov eax, ecx
mov ecx, dword [ebp + 0x14]
cdq
sub eax, edx
sar eax, 1
neg eax
mov dword [ecx + 0x44], eax
jmp case.0x10005105.8064
mov eax, ecx
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 0x44], eax
jmp case.0x10005105.8064
mov edx, dword [esi]
mov eax, dword [ebp + 0x14]
mov dword [eax + 0x34], edx
jmp case.0x10005105.8064
mov ecx, dword [esp + 0x30]
cmp dword [ecx + 4], 0
jne 0x1000592c
xor edi, edi
mov dword [esp + 0x3c], 7
cmp edi, 0x24
ja case.0x10005760.1
movzx edx, byte [edi + 0x10005cd4]
jmp dword [edx*4 + 0x10005cb4]
mov eax, dword [esp + 0x7c]
fstp st(0)
mov ecx, dword [esp + 0x30]
fstp st(3)
mov edx, dword [ebp + 0x28]
fstp st(2)
push edx
fstp st(1)
mov dword [ecx], eax
fstp st(1)
mov ecx, dword [ecx + 0xc]
fstp st(0)
push ecx
push 1
push eax
call fcn.1000fd90
add esp, 0x10
jmp 0x10005901
mov edx, dword [esp + 0xb8]
fstp st(0)
mov ecx, dword [ebp + 0xc]
fstp st(3)
fstp st(2)
sub esp, 8
fstp st(1)
neg edx
fstp st(1)
lea eax, [esp + 0x3c]
fstp st(0)
fld qword [0x10039298]
fstp qword [esp]
push edx
fld qword [ecx]
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x24]
push eax
mov eax, dword [ebp + 0x1c]
sub esp, 0x20
fstp qword [esp + 0x18]
fld qword [edx]
fstp qword [esp + 0x10]
fld qword [eax]
fstp qword [esp + 8]
fld qword [ecx]
fstp qword [esp]
call sym.Neskowin.dll_lsx_design_lpf
mov edx, dword [ebp + 0x10]
fld qword [edx]
mov dword [esp + 0xc4], eax
fld qword [0x100393e0]
add esp, 0x30
fucompp
fnstsw ax
test ah, 0x44
jnp 0x10005832
mov ecx, dword [esp + 0x30]
mov eax, edx
fld qword [eax]
sub esp, 8
add ecx, 8
fstp qword [esp]
push ecx
mov ecx, dword [ebp + 0x28]
lea edx, [esp + 0x40]
lea eax, [esp + 0xa0]
call fcn.1001e7a0
add esp, 0xc
jmp 0x10005901
mov eax, dword [esp + 0x34]
cdq
sub eax, edx
mov edx, dword [esp + 0x30]
sar eax, 1
mov dword [edx + 8], eax
jmp 0x10005901
fstp st(0)
xor eax, eax
fstp st(3)
fstp st(2)
fstp st(1)
fstp st(1)
fstp st(0)
cmp dword [esp + 0x34], eax
jle 0x100058a1
mov ecx, dword [esp + 0x7c]
fild dword [esp + 0x7c]
dec ecx
mov edx, dword [esp + 0x94]
fld qword [edx + eax*8]
mov edx, dword [ebp + 8]
fdiv st(1)
mov ebx, dword [esp + 0x7c]
fadd st(0), st(0)
fimul dword [edx]
mov edx, eax
sub edx, dword [esp + 0x34]
inc eax
lea edx, [edx + ebx + 1]
mov ebx, dword [esp + 0x30]
mov ebx, dword [ebx + 0xc]
and edx, ecx
fstp qword [ebx + edx*8]
cmp eax, dword [esp + 0x34]
jl 0x10005864
mov ebx, dword [esp + 0x90]
fstp st(0)
mov eax, dword [esp + 0x94]
push eax
call fcn.10025dec
add esp, 4
jmp 0x10005901
mov ecx, dword [esp + 0x34]
fstp st(0)
fstp st(3)
push ecx
fstp st(2)
fstp st(1)
fstp st(1)
fstp st(0)
call fcn.1001c680
add esp, 4
mov dword [esp + 0x7c], eax
jmp 0x10005901
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov dword [eax + 4], edx
jmp case.0x10005760.1
mov ecx, dword [esp + 0x7c]
fstp st(0)
fstp st(3)
push 8
fstp st(2)
push ecx
fstp st(1)
fstp st(1)
fstp st(0)
call fcn.10025e26
mov edx, dword [esp + 0x38]
add esp, 8
mov dword [edx + 0xc], eax
fld qword [esp + 0x70]
fld qword [esp + 0x68]
fld qword [esp + 0x40]
fld qword [esp + 0x60]
fld qword [esp + 0x50]
fld qword [esp + 0x58]
fxch st(3)
fxch st(5)
fxch st(3)
add edi, 6
dec dword [esp + 0x3c]
jne 0x10005750
mov ecx, dword [ebp + 0x14]
mov edi, dword [esp + 0x80]
mov dword [ecx], 0x1000d3c0
jmp case.0x10005105.8064
mov eax, dword [ebp + 0x10]
fld qword [eax]
mov dword [esp + 0x34], 0
fld qword [0x100393e0]
fucompp
fnstsw ax
test ah, 0x44
jp 0x1000598d
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
mov dword [esp + 0x88], ecx
cmp ecx, 2
jl 0x1000598d
lea edx, [ecx - 1]
test ecx, edx
jne 0x1000598d
mov eax, dword [ebp + 0x18]
fild dword [esp + 0x88]
fld qword [eax]
fucompp
fnstsw ax
test ah, 0x44
lea eax, [ecx + ecx]
jnp 0x10005992
mov eax, 4
mov dword [esp + 0xb8], eax
jmp case.0x10005760.1
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 8]
mov ecx, dword [ebp + 8]
cdq
idiv dword [ecx]
mov eax, dword [ebp + 0x14]
mov dword [eax + 0x50], edx
mov ecx, dword [ecx]
mov dword [eax + 0x4c], ecx
jmp case.0x10005105.8064