Function at 0x5d0ea0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [eax]
mov ecx, dword [ecx + 0x18]
mov edx, esi
xor ebx, ebx
and edx, 0xf
mov dword [ebp - 0x5c], esi
push edi
mov edi, dword [eax + 4]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x60], edx
sub esi, edx
mov edx, dword [ecx]
mov dword [ebp - 0x68], ecx
mov ecx, dword [ecx + 4]
inc esi
cmp edi, ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x2c], ebx
jle 0x5d1535
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x2c]
mov esi, dword [ecx + 0x24]
mov edi, dword [ecx + 0x10]
mov ecx, esi
imul ecx, edx
add ecx, edi
dec edx
mov ebx, edx
mov dword [ebp - 0x4c], ecx
imul ebx, esi
mov ecx, dword [eax + 0xc]
add ebx, edi
mov dword [ebp - 0x44], edx
mov edi, dword [ecx + 0x24]
mov esi, dword [ecx + 0x24]
imul edi, dword [ebp - 0x2c]
imul esi, edx
mov edx, dword [ebp - 0x64]
add edi, dword [ecx + 0x10]
add esi, dword [ecx + 0x10]
dec edx
cmp dword [ebp - 0x2c], edx
jne 0x5d0f34
mov edx, dword [ecx + 0x10]
sub edx, dword [ecx + 0x24]
jmp 0x5d0f41
mov edx, dword [ebp - 0x44]
add edx, 2
imul edx, dword [ecx + 0x24]
add edx, dword [ecx + 0x10]
mov dword [ebp - 8], edx
mov dl, byte [ebx]
mov cl, dl
and dword [ebp - 0x40], 0
and cl, 0x80
and byte [ebp - 1], 0
movzx cx, cl
shl ecx, 3
mov dword [ebp - 0x24], ecx
mov cl, byte [esi]
shr cl, 1
and cl, 0x60
and dword [ebp - 0x28], 0
movzx cx, cl
mov word [ebp - 0x30], cx
mov cl, byte [edi]
shr cl, 4
and cl, 0xc
mov dword [ebp - 0x3c], 0x1e
movzx cx, cl
mov word [ebp - 0x34], cx
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x38], 0x1e
mov cl, byte [ecx]
shr cl, 7
movzx cx, cl
mov word [ebp - 0x44], cx
movzx ecx, dl
movzx edx, byte [ebx + 1]
shl ecx, 0x18
inc ebx
shl edx, 0x10
or ecx, edx
inc ebx
xor edx, edx
mov dh, byte [ebx]
or ecx, edx
inc ebx
movzx edx, byte [ebx]
or ecx, edx
inc ebx
mov dword [ebp - 0x18], ecx
movzx ecx, byte [edi]
movzx edx, byte [edi + 1]
shl ecx, 0x18
inc edi
shl edx, 0x10
or ecx, edx
inc edi
xor edx, edx
mov dh, byte [edi]
or ecx, edx
inc edi
movzx edx, byte [edi]
or ecx, edx
inc edi
mov dword [ebp - 0x20], ecx
movzx ecx, byte [esi]
movzx edx, byte [esi + 1]
shl ecx, 0x18
inc esi
shl edx, 0x10
or ecx, edx
inc esi
xor edx, edx
mov dh, byte [esi]
or ecx, edx
inc esi
movzx edx, byte [esi]
or ecx, edx
mov edx, dword [ebp - 8]
mov dword [ebp - 0x1c], ecx
inc esi
movzx ecx, byte [edx]
shl ecx, 0x18
inc edx
mov dword [ebp - 8], edx
movzx edx, byte [edx]
shl edx, 0x10
or ecx, edx
mov dword [ebp - 0xc], ecx
inc dword [ebp - 8]
xor ecx, ecx
mov edx, dword [ebp - 8]
mov ch, byte [edx]
or dword [ebp - 0xc], ecx
inc dword [ebp - 8]
mov ecx, dword [ebp - 8]
movzx ecx, byte [ecx]
or dword [ebp - 0xc], ecx
inc dword [ebp - 8]
cmp byte [eax + 0x18], 0
je 0x5d105f
mov ecx, dword [ebp - 0x68]
mov eax, 0x100
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
add edx, eax
add ecx, eax
push edx
push ecx
mov ecx, dword [ebp + 8]
call fcn.005cec4a
movzx eax, al
xor dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
push 1
pop ecx
cmp dword [ebp - 0x50], ecx
mov dword [ebp - 0x10], ecx
jle 0x5d134c
mov cl, byte [ebp - 1]
xor edx, edx
and cl, 0x7d
mov dh, cl
mov ecx, dword [ebp - 0x40]
and ecx, 0xfdff
or edx, ecx
mov ecx, dword [ebp - 0x3c]
shl edx, 1
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x18]
shr edx, cl
and edx, 1
shl edx, 9
or dword [ebp - 0x24], edx
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
and ecx, 0xefff
shl ecx, 1
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x3c]
dec ecx
and ecx, 0x1f
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x38]
shr edx, cl
mov ecx, dword [ebp - 0x30]
and ecx, 0xfeff
and edx, 1
shl edx, 5
or edx, ecx
mov ecx, dword [ebp - 0x38]
shl edx, 1
mov dword [ebp - 0x30], edx
mov edx, dword [ebp - 0x20]
shr edx, cl
mov ecx, dword [ebp - 0x34]
and ecx, 0xffdf
and edx, 1
shl edx, 2
or edx, ecx
mov ecx, dword [ebp - 0x38]
shl edx, 1
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0xc]
shr edx, cl
mov ecx, dword [ebp - 0x44]
add ecx, ecx
and edx, 1
or ecx, edx
mov edx, dword [ebp - 0x38]
and ecx, 0xfff7
dec edx
and edx, 0x1f
cmp dword [ebp - 0x48], 1
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x38], edx
jne 0x5d1147
cmp byte [eax + 0x18], 0
je 0x5d153c
mov edx, ecx
or edx, dword [ebp - 0x30]
or edx, dword [ebp - 0x34]
test dx, dx
jne 0x5d1137
and byte [ebp - 1], dl
jmp 0x5d1216
cmp dx, 0x1ff
jne 0x5d1147
mov byte [ebp - 1], 1
jmp 0x5d1216
mov edx, dword [ebp - 0x24]
or ecx, dword [ebp - 0x30]
or edx, dword [ebp - 0x40]
or ecx, dword [ebp - 0x34]
shr edx, 9
shl ecx, 4
and edx, 0x77
or ecx, edx
mov dword [ebp - 0x14], ecx
mov cl, byte [eax + 0x1b]
test cl, cl
mov byte [ebp - 1], cl
jne 0x5d1199
mov ecx, dword [ebp - 0x10]
and ecx, 0xf
jne 0x5d1176
push 0x10
pop ecx
movsx edx, byte [eax + 0x19]
neg ecx
cmp edx, ecx
jle 0x5d1199
or cx, 0xffff
sub cx, dx
mov edx, dword [ebp - 0x28]
shr dx, cl
and edx, 1
shl edx, 3
or dword [ebp - 0x14], edx
jmp 0x5d11c7
movsx eax, byte [eax + 0x19]
mov ecx, dword [ebp - 0x10]
lea eax, [eax + ecx - 1]
mov ecx, dword [ebp + 0x10]
push eax
movsx eax, byte [ebp - 1]
add eax, dword [ebp - 0x2c]
push eax
call fcn.005c1043
push eax
lea eax, [ebp - 0x14]
push 3
push eax
call fcn.005cf688
mov eax, dword [ebp + 0xc]
add esp, 0xc
movsx ecx, byte [eax + 0x1a]
sub ecx, dword [eax + 0x10]
mov edx, dword [ebp - 0x10]
lea ecx, [ecx + edx - 1]
push ecx
movsx ecx, byte [eax + 0x1c]
sub ecx, dword [eax + 0x14]
add ecx, dword [ebp - 0x2c]
push ecx
mov ecx, dword [eax + 0xc]
call fcn.005c1043
push eax
lea eax, [ebp - 0x14]
push 0xc
push eax
call fcn.005cf688
movzx eax, word [ebp - 0x14]
mov ecx, dword [ebp - 0x54]
add esp, 0xc
add ecx, eax
push ecx
mov ecx, dword [ebp - 0x58]
add eax, ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.005cec4a
mov byte [ebp - 1], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x28]
movzx dx, byte [ebp - 1]
add ecx, ecx
or ecx, edx
test byte [ebp - 0x10], 0xf
mov dword [ebp - 0x28], ecx
jne 0x5d133d
mov ecx, dword [ebp - 0x4c]
xor edx, edx
mov dl, byte [ebp - 0x27]
mov byte [ecx], dl
mov dl, byte [ebp - 0x28]
and dword [ebp - 0x28], 0
inc ecx
mov byte [ecx], dl
inc ecx
cmp dword [ebp - 0x3c], 0x10
mov dword [ebp - 0x4c], ecx
jge 0x5d12d3
movzx ecx, byte [ebx]
mov edx, dword [ebp - 0x18]
shl ecx, 0x18
and edx, 0xffff
or ecx, edx
inc ebx
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x20]
movzx ecx, byte [ebx]
shl ecx, 0x10
or dword [ebp - 0x18], ecx
and edx, 0xffff
movzx ecx, byte [edi]
shl ecx, 0x18
inc ebx
or ecx, edx
inc edi
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x1c]
movzx ecx, byte [edi]
shl ecx, 0x10
or dword [ebp - 0x20], ecx
and edx, 0xffff
movzx ecx, byte [esi]
shl ecx, 0x18
inc edi
or ecx, edx
inc esi
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0xc]
movzx ecx, byte [esi]
shl ecx, 0x10
or dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 8]
and edx, 0xffff
inc esi
movzx ecx, byte [ecx]
shl ecx, 0x18
or ecx, edx
inc dword [ebp - 8]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 8]
movzx ecx, byte [ecx]
shl ecx, 0x10
jmp 0x5d1337
mov edx, dword [ebp - 0x18]
xor ecx, ecx
mov ch, byte [ebx]
and dx, 0
or ecx, edx
inc ebx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
movzx ecx, byte [ebx]
or dword [ebp - 0x18], ecx
xor ecx, ecx
mov ch, byte [esi]
and dx, 0
inc ebx
or ecx, edx
inc esi
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
and dx, 0
movzx ecx, byte [esi]
or dword [ebp - 0x1c], ecx
xor ecx, ecx
mov ch, byte [edi]
inc esi
or ecx, edx
mov edx, dword [ebp - 8]
inc edi
mov dword [ebp - 0x20], ecx
movzx ecx, byte [edi]
or dword [ebp - 0x20], ecx
xor ecx, ecx
mov ch, byte [edx]
mov edx, dword [ebp - 0xc]
and dx, 0
inc edi
or ecx, edx
inc dword [ebp - 8]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 8]
movzx ecx, byte [ecx]
or dword [ebp - 0xc], ecx
inc dword [ebp - 8]
inc dword [ebp - 0x10]
mov ecx, dword [ebp - 0x50]
cmp dword [ebp - 0x10], ecx
jl 0x5d106e
mov edi, dword [ebp - 0x10]
cmp edi, dword [ebp - 0x5c]
jg 0x5d150a
mov cl, byte [ebp - 1]
xor edx, edx
and cl, 0x7d
mov esi, dword [ebp - 0x18]
mov dh, cl
mov ecx, dword [ebp - 0x40]
and ecx, 0xfdff
push 1
or edx, ecx
mov ecx, dword [ebp - 0x3c]
shl edx, 1
shr esi, cl
mov dword [ebp - 0x40], edx
pop edx
mov ebx, dword [ebp - 0x30]
and ebx, 0xfeff
and esi, edx
shl esi, 9
or dword [ebp - 0x24], esi
mov esi, dword [ebp - 0x24]
and esi, 0xefff
shl esi, 1
dec ecx
mov dword [ebp - 0x24], esi
mov esi, dword [ebp - 0x1c]
and ecx, 0x1f
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x38]
shr esi, cl
and esi, edx
shl esi, 5
or esi, ebx
mov ebx, dword [ebp - 0x34]
shl esi, 1
mov dword [ebp - 0x30], esi
mov esi, dword [ebp - 0x20]
shr esi, cl
and ebx, 0xffdf
and esi, edx
shl esi, 2
or esi, ebx
mov ebx, dword [ebp - 0x44]
shl esi, 1
mov dword [ebp - 0x34], esi
mov esi, dword [ebp - 0xc]
shr esi, cl
add ebx, ebx
and esi, edx
or esi, ebx
and esi, 0xfff7
dec ecx
and ecx, 0x1f
cmp dword [ebp - 0x48], edx
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x38], ecx
jne 0x5d1423
cmp byte [eax + 0x18], 0
je 0x5d153c
mov ecx, esi
or ecx, dword [ebp - 0x30]
or ecx, dword [ebp - 0x34]
test cx, cx
jne 0x5d1413
and byte [ebp - 1], cl
jmp 0x5d14ef
cmp cx, 0x1ff
jne 0x5d1423
mov byte [ebp - 1], 1
jmp 0x5d14ef
mov ecx, dword [ebp - 0x24]
or esi, dword [ebp - 0x30]
or ecx, dword [ebp - 0x40]
or esi, dword [ebp - 0x34]
shr ecx, 9
shl esi, 4
and ecx, 0x77
or esi, ecx
mov cl, byte [eax + 0x1b]
test cl, cl
mov dword [ebp - 0x14], esi
jne 0x5d1473
mov edx, edi
and edx, 0xf
jne 0x5d144e
push 0x10
pop edx
movsx edi, byte [eax + 0x19]
neg edx
cmp edi, edx
jle 0x5d1473
mov edx, dword [ebp - 0x28]
or cx, 0xffff
sub cx, di
shr dx, cl
and edx, 1
shl edx, 3
or esi, edx
mov dword [ebp - 0x14], esi
jmp 0x5d14a0
movsx eax, byte [eax + 0x19]
mov edx, dword [ebp - 0x10]
lea eax, [eax + edx - 1]
push eax
movsx eax, cl
add eax, dword [ebp - 0x2c]
mov ecx, dword [ebp + 0x10]
push eax
call fcn.005c1043
push eax
lea eax, [ebp - 0x14]
push 3
push eax
call fcn.005cf688
mov eax, dword [ebp + 0xc]
add esp, 0xc
movsx ecx, byte [eax + 0x1a]
sub ecx, dword [eax + 0x10]
mov edx, dword [ebp - 0x10]
lea ecx, [ecx + edx - 1]
push ecx
movsx ecx, byte [eax + 0x1c]
sub ecx, dword [eax + 0x14]
add ecx, dword [ebp - 0x2c]
push ecx
mov ecx, dword [eax + 0xc]
call fcn.005c1043
push eax
lea eax, [ebp - 0x14]
push 0xc
push eax
call fcn.005cf688
movzx eax, word [ebp - 0x14]
mov ecx, dword [ebp - 0x54]
add esp, 0xc
add ecx, eax
push ecx
mov ecx, dword [ebp - 0x58]
add eax, ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.005cec4a
mov byte [ebp - 1], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x10]
movzx dx, byte [ebp - 1]
add ecx, ecx
or ecx, edx
inc edi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x10], edi
jmp 0x5d134f
cmp dword [ebp - 0x60], 0
je 0x5d1526
mov edx, dword [ebp - 0x28]
mov cl, 0x10
sub cl, byte [ebp - 0x60]
mov esi, dword [ebp - 0x4c]
shl edx, cl
xor ecx, ecx
mov cl, dh
mov byte [esi], cl
mov byte [esi + 1], dl
inc dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x64]
jl 0x5d0eec
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push 0xd
pop eax
jmp 0x5d1537