Function at 0x825330
Capabilities:
Encrypt data using rc4 ksa
Encrypt data using speck

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x184
push esi
push edi
call fcn.0083a23c
cdq
mov ecx, 0x1a
idiv ecx
mov esi, edx
mov dword [ebp - 0x4c], esi
call fcn.0083a23c
cdq
mov ecx, 0x1a
idiv ecx
mov edi, edx
push edi
push esi
mov dword [ebp - 0x44], edi
call fcn.00825310
fld qword [0x88b578]
fld qword [0x88b578]
add esp, 8
mov dword [ebp - 0x48], eax
fld st(0)
fmul st(1)
fld st(0)
fmul qword [0x8ac988]
fsub st(1)
fxch st(1)
fmul qword [0x89a718]
fadd qword [0x89a2c0]
add eax, 0x89a2c0
fdivp st(1)
faddp st(2)
fld st(1)
fcomp qword [0x89c238]
fnstsw ax
test ah, 0x41
jne 0x8253b1
fld st(0)
fmul qword [0x8ac980]
fsubp st(2)
fadd qword [0x892488]
fcom qword [0x8ac978]
fnstsw ax
test ah, 1
jne 0x825378
fxch st(1)
fst qword [ebp - 0x40]
fxch st(1)
fstp st(0)
fcomp qword [0x88b578]
fnstsw ax
test ah, 1
je 0x825430
xor eax, 0x5c52736c
sub dword [eax + 0x35], eax
imul esi, dword [esi + ebp], 0x5b514072
dec edi
jo 0x825444
dec edx
sub dword [edx + 0x7a], eax
cmp ebp, dword [eax]
jne 0x82538f
inc esi
lcall 0x994c, 0x92458f46
dec esp
invalid
mov dword [ebp - 0x34], 0x8253f5
mov dword [ebp - 0x30], 0x8253da
xor eax, eax
mov byte [ebp + eax - 0x14c], al
inc eax
cmp eax, 0x100
jb 0x825440
invalid
fld qword [ebp - 0x40]
mov byte [ebp - 8], 0
mov eax, 0xff
mov esi, dword [ebp - 8]
push ebx
xor edi, edi
mov dword [ebp - 0x14], eax
mov ebx, 1
mov dword [ebp - 0x1c], 0
cmp eax, ebx
jbe 0x82547c
lea ebx, [ebx + ebx + 1]
cmp ebx, eax
jb 0x825474
cmp edi, 3
ja case.default.0x825481
jmp dword [edi*4 + 0x825cd8]
fld st(0)
and esi, 0xff
call fcn.008397f4
mov cl, byte [ebp + esi - 0x14c]
jmp 0x8254fd
fld st(0)
and esi, 0xff
call fcn.008397f4
mov cl, byte [ebp + esi - 0x14c]
shr eax, 8
jmp 0x8254fd
fld st(0)
and esi, 0xff
call fcn.008397f4
mov cl, byte [ebp + esi - 0x14c]
shr eax, 0x10
jmp 0x8254fd
fld st(0)
and esi, 0xff
call fcn.008397f4
mov cl, byte [ebp + esi - 0x14c]
shr eax, 0x18
jmp 0x8254fd
mov edx, dword [ebp - 0x30]
and esi, 0xff
mov cl, byte [edx + edi - 4]
mov al, byte [ebp + esi - 0x14c]
add cl, al
inc edi
cmp edi, 0x1f
mov byte [ebp - 8], cl
jb 0x825510
xor edi, edi
add cl, 0x1f
mov byte [ebp - 8], cl
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov edx, esi
and edx, 0xff
and edx, ebx
inc eax
cmp eax, 0xb
mov dword [ebp - 0x1c], eax
jbe 0x825530
mov eax, edx
xor edx, edx
div dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, edx
jb 0x82547c
je 0x825568
mov bl, byte [ebp + eax - 0x14c]
lea edx, [ebp + edx - 0x14c]
lea ecx, [ebp + eax - 0x14c]
mov al, byte [edx]
xor bl, al
mov byte [ecx], bl
mov al, bl
mov bl, byte [edx]
xor bl, al
mov byte [edx], bl
mov al, byte [ecx]
mov dl, bl
xor al, dl
mov byte [ecx], al
mov eax, dword [ebp - 0x14]
dec eax
mov dword [ebp - 0x14], eax
jne 0x825464
mov edi, dword [ebp - 0x34]
mov dl, byte [ebp - 0x145]
and esi, 0xff
mov byte [ebp - 0x28], dl
mov dl, byte [edi + 1]
mov bl, byte [ebp - 0x149]
mov al, byte [ebp + esi - 0x14c]
sub dl, 0x43
mov byte [ebp - 0x2c], al
mov al, byte [edi]
add al, 5
xor esi, esi
shl al, 4
or al, dl
mov cl, byte [ebp - 0x147]
mov byte [ebp - 0x1c], al
mov eax, dword [ebp - 0x2c]
and eax, 0xff
fstp st(0)
mov dl, byte [ebp + eax - 0x14c]
lea edi, [ebp + eax - 0x14c]
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x14b]
mov eax, edx
and eax, 0xff
mov al, byte [ebp + eax - 0x14c]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
lea edx, [ebp + edx - 0x14c]
mov byte [edi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 8], edx
lea ebx, [ebp + ebx - 0x14c]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x14c]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
mov edx, dword [ebp - 0xc]
and edx, 0xff
mov dword [ebp - 0x20], edx
mov bl, byte [ebp + edx - 0x14c]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x14], cl
mov edx, dword [ebp - 0x14]
and edx, 0xff
mov dl, byte [ebp + edx - 0x14c]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
mov edi, dword [ebp - 0x20]
and edx, 0xff
xor ebx, ebx
mov bl, byte [ebp + edx - 0x14c]
mov edx, dword [ebp - 8]
mov dl, byte [edx]
mov bl, byte [ebp + ebx - 0x14c]
add edx, edi
mov edi, dword [ebp - 0x34]
and edx, 0xff
xor bl, byte [ebp + edx - 0x14c]
mov dl, byte [ebp - 0x1c]
mov byte [ebp - 0x2c], dl
xor bl, dl
mov byte [ebp - 0x28], bl
lea edx, [ebp - 0x184]
mov dword [ebp - 0x38], 0xb
sub edx, 2
jmp 0x8256c2
mov edi, dword [ebp - 0x3c]
mov bl, byte [edi + 2]
add edi, 2
add edx, 2
add bl, 5
mov dword [ebp - 0x30], edx
mov dl, byte [edi + 1]
sub dl, 0x43
mov dword [ebp - 0x3c], edi
shl bl, 4
or dl, bl
inc esi
mov byte [ebp - 0x1c], dl
mov edx, dword [ebp - 0x2c]
and edx, 0xff
lea edi, [ebp + edx - 0x14c]
mov dl, byte [ebp + edx - 0x14c]
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x18]
mov bl, byte [edx]
mov dl, byte [ebp - 4]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
lea edx, [ebp + edx - 0x14c]
mov byte [edi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 8], edx
lea ebx, [ebp + ebx - 0x14c]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x14c]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
mov edx, dword [ebp - 0xc]
and edx, 0xff
mov dword [ebp - 0x20], edx
mov bl, byte [ebp + edx - 0x14c]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x14], cl
mov edx, dword [ebp - 0x14]
and edx, 0xff
mov dl, byte [ebp + edx - 0x14c]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
mov edx, dword [ebp - 8]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x20]
add ebx, edx
mov dl, byte [ebp + edi - 0x14c]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x14c]
mov bl, byte [ebp - 0x1c]
mov byte [ebp - 0x2c], bl
xor dl, bl
test esi, esi
mov byte [ebp - 0x28], dl
jbe 0x8257e1
movsx di, dl
mov edx, dword [ebp - 0x30]
mov word [edx], di
jmp 0x8257e4
mov edx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x38]
dec edi
mov dword [ebp - 0x38], edi
jne 0x8256bf
mov edi, dword [ebp - 0x34]
inc esi
mov bl, byte [edi + esi*2]
mov dl, byte [edi + esi*2 + 1]
add bl, 5
sub dl, 0x43
shl bl, 4
or dl, bl
mov byte [ebp - 0x1c], dl
mov edx, dword [ebp - 0x2c]
and edx, 0xff
lea edi, [ebp + edx - 0x14c]
mov dl, byte [ebp + edx - 0x14c]
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 4]
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
mov dl, byte [ebp - 4]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
lea edx, [ebp + edx - 0x14c]
mov byte [edi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 8], edx
lea ebx, [ebp + ebx - 0x14c]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x14c]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
mov edx, dword [ebp - 0xc]
and edx, 0xff
mov dword [ebp - 0x20], edx
mov bl, byte [ebp + edx - 0x14c]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x14], cl
mov edx, dword [ebp - 0x14]
and edx, 0xff
mov dl, byte [ebp + edx - 0x14c]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
mov edx, dword [ebp - 8]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x20]
add ebx, edx
mov dl, byte [ebp + edi - 0x14c]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x14c]
mov bl, byte [ebp - 0x1c]
mov byte [ebp - 0x2c], bl
xor dl, bl
test esi, esi
mov byte [ebp - 0x28], dl
jbe 0x825913
movsx dx, dl
mov word [ebp + esi*2 - 0x186], dx
mov edx, dword [ebp - 0x34]
inc esi
mov bl, byte [edx + esi*2]
lea edi, [edx + esi*2]
add bl, 5
mov dl, byte [edi + 1]
sub dl, 0x43
shl bl, 4
or dl, bl
mov byte [ebp - 0x1c], dl
mov edx, dword [ebp - 0x2c]
and edx, 0xff
lea edi, [ebp + edx - 0x14c]
mov dl, byte [ebp + edx - 0x14c]
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x18]
mov bl, byte [edx]
mov dl, byte [ebp - 4]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
lea edx, [ebp + edx - 0x14c]
mov byte [edi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 8], edx
lea ebx, [ebp + ebx - 0x14c]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x14c]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
mov edx, dword [ebp - 0xc]
and edx, 0xff
mov dword [ebp - 0x20], edx
mov bl, byte [ebp + edx - 0x14c]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x14], cl
mov edx, dword [ebp - 0x14]
and edx, 0xff
mov dl, byte [ebp + edx - 0x14c]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
mov edx, dword [ebp - 8]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x20]
add ebx, edx
mov dl, byte [ebp + edi - 0x14c]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x14c]
mov bl, byte [ebp - 0x1c]
mov byte [ebp - 0x2c], bl
xor dl, bl
test esi, esi
mov byte [ebp - 0x28], dl
jbe 0x825a2c
movsx dx, dl
mov word [ebp + esi*2 - 0x186], dx
lea ebx, [esi + 1]
cmp ebx, 0x1b
jge 0x825b84
mov edx, dword [ebp - 0x34]
lea edi, [edx + esi*2]
lea edx, [ebp + esi*2 - 0x186]
mov dword [ebp - 0x30], edx
mov edx, 0x1b
sub edx, ebx
mov dword [ebp - 0x38], edx
jmp 0x825a57
mov edi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x30]
mov bl, byte [edi + 2]
add edi, 2
add edx, 2
mov dword [ebp - 0x30], edx
add bl, 5
mov dl, byte [edi + 1]
mov dword [ebp - 0x3c], edi
sub dl, 0x43
inc esi
shl bl, 4
or dl, bl
mov byte [ebp - 0x1c], dl
mov edx, dword [ebp - 0x2c]
and edx, 0xff
lea edi, [ebp + edx - 0x14c]
mov dl, byte [ebp + edx - 0x14c]
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x18]
mov bl, byte [edx]
mov dl, byte [ebp - 4]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
lea edx, [ebp + edx - 0x14c]
mov byte [edi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 8], edx
lea ebx, [ebp + ebx - 0x14c]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x14c]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
mov edx, dword [ebp - 0xc]
and edx, 0xff
mov dword [ebp - 0x20], edx
mov bl, byte [ebp + edx - 0x14c]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x14], cl
mov edx, dword [ebp - 0x14]
and edx, 0xff
mov dl, byte [ebp + edx - 0x14c]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
mov edx, dword [ebp - 8]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x20]
add ebx, edx
mov dl, byte [ebp + edi - 0x14c]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x14c]
mov bl, byte [ebp - 0x1c]
mov byte [ebp - 0x2c], bl
xor dl, bl
test esi, esi
mov byte [ebp - 0x28], dl
jbe 0x825b77
mov edi, dword [ebp - 0x30]
movsx dx, dl
mov word [edi], dx
mov edx, dword [ebp - 0x38]
dec edx
mov dword [ebp - 0x38], edx
jne 0x825a54
mov edx, dword [ebp - 0x1c]
inc esi
and edx, 0xff
lea edi, [ebp + edx - 0x14c]
mov dl, byte [ebp + edx - 0x14c]
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 4]
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
add al, bl
mov bl, byte [ebp - 4]
mov byte [ebp - 0x24], al
inc bl
mov eax, dword [ebp - 0x24]
mov byte [ebp - 4], bl
and eax, 0xff
mov dl, byte [ebp + eax - 0x14c]
lea eax, [ebp + eax - 0x14c]
mov byte [edi], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
mov bl, byte [ebp + edx - 0x14c]
lea edx, [ebp + edx - 0x14c]
mov byte [eax], bl
mov ebx, dword [ebp - 4]
and ebx, 0xff
mov dword [ebp - 0x10], edx
test esi, esi
lea ebx, [ebp + ebx - 0x14c]
mov dword [ebp - 0x18], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
jbe 0x825c91
mov edx, dword [ebp - 0xc]
mov al, byte [eax]
and edx, 0xff
mov dword [ebp - 0x20], edx
mov edx, dword [ebp - 0x34]
mov bl, byte [edx + esi*2 + 1]
mov dl, byte [edx + esi*2]
add dl, 5
sub bl, 0x43
shl dl, 4
or bl, dl
mov edx, dword [ebp - 0x20]
mov dl, byte [ebp + edx - 0x14c]
add dl, cl
and edx, 0xff
mov cl, byte [ebp + edx - 0x14c]
mov dl, byte [edi]
add ecx, edx
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x20]
mov dl, byte [edx]
add eax, edi
add ecx, edx
xor edx, edx
and ecx, 0xff
and eax, 0xff
mov dl, byte [ebp + ecx - 0x14c]
mov cl, byte [ebp + edx - 0x14c]
xor bl, cl
mov cl, byte [ebp + eax - 0x14c]
xor bl, cl
movsx cx, bl
mov word [ebp + esi*2 - 0x186], cx
mov edi, dword [ebp - 0x44]
mov esi, dword [ebp - 0x4c]
mov word [ebp - 0x150], 0
pop ebx
mov eax, dword [ebp + 8]
mov dx, word [ebp + esi*2 - 0x184]
mov ecx, dword [ebp - 0x48]
mov word [eax], dx
mov word [eax + 6], 0
mov dx, word [ebp + ecx*2 - 0x184]
mov cx, word [ebp + edi*2 - 0x184]
pop edi
mov word [eax + 4], dx
mov word [eax + 2], cx
pop esi
mov esp, ebp
pop ebp
ret